cancel
Showing results for 
Search instead for 
Did you mean: 

Creating custom OLE controls for Crystal Reports

talbot_sk
Explorer
0 Kudos

Hi. I would like to create custom OLE controls for Crystal Reports. I do not see my OLE object in the "Object Type" list while inserting new OLE object into the report even I registered OLE object into the registry. Do I need some special registry keys? Is there any tutorial or documentation how to create custom OLE controls on the web? I am able to insert my OLE control into the new MS Word document. Thank you very much for the answer.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

Hi Branislav

What is the OLE Object are you trying to insert into the report?

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow me on Twitter

talbot_sk
Explorer
0 Kudos

Hi Luděk. It is my own simple control based on UserControl class written in C# for drawing diagonal line in reports. It accepts no input data. I will change only position and dimensions of it in the reports. I am programmer and I would like to program my own OLE control. I need to know what interfaces should I implement or what registry keys should I register during OLE registration into the Windows registry database. I would like to display my OLE object among objects in "Object Type" list. See previous attachment.

B.

former_member183750
Active Contributor
0 Kudos

Hi Branislav

I need to double check with you the following; essentially you are looking to fond out how to get your UserControl into the following dialog?

So, if that is the case, can you see the object if you try the same in MS Word? E.g.; the above dialog is a system dialog, used in MS Word, etc., and we just use it as well. Theoretically, if you can see the object in MS Word, then you should see it in CR.

- Ludek

talbot_sk
Explorer
0 Kudos

Hi Luděk,

I need to get my UserControl into the dialog I attached to my first post. It is very similar to the dialog that you attached to your most recent answer. May be it is little different due to localization and different Windows version. If it is as you wrote I do not know why I am not able to see my UserControl among the others...

B.

former_member183750
Active Contributor
0 Kudos

Well, what I was trying to ask is; can you see the UserControl in MS Word? If not, it is then a larger issue than just Crystal Reports(?). E.g.; in MS Word, open a new document. Go to the Inset menu and select "Object". Can you see the UserControl there?

- Ludek

talbot_sk
Explorer
0 Kudos

I am sorry, I forgot to explicitly answer you. Yes, I can see my control in MS Word. There is completely different dialog box containing more than 130 controls:

OLELib.DiagonalLine is my UserControl. I inserted it via MS Word Developer/Older system tools toolbar button/More controls button:

In CR I insert OLE control via this context menu:

and this dialog:

There is only about 24 controls. Do you think CR uses older version of OLE object selection dialog?

Here is version of my CR:

Here is my system info:

B.

former_member183750
Active Contributor
0 Kudos

Hi Branislav

Apologies for the slow uptake on my part. E.g.; I finally "get it".

Unfortunately, CR has no way to insert user controls. Perhaps the closest thing we have to what you are trying to do is AddIns, but that's not quite what you're after either. So, I have no good news for you.

As a by the by, why are you trying to do a diagonal line control. Why not just draw a diagonal line? I suspect the answer is that the control let's the user choose the angle?

- Ludek

talbot_sk
Explorer
0 Kudos

Hi Luděk

The reason why I started to develop my own UserControl was that I couldn't find the way how to draw diagonal line across the detail. I found that CR can draw only horizontal or vertical lines. Also I read it in some discussion. I would like to achieve something like this:

It will be good news if you could send me an example how to do it. Please, could you send me some short tutorial and an example report? Thank you very much. 🙂

B.