cancel
Showing results for 
Search instead for 
Did you mean: 

How to access OLE data via API?

Former Member
0 Kudos

I have an OLE object in my report and want to access its display data, e.g. as a bitmap. How would I go about this?

The "PictureData" attribute of the PictureObject I get is always null. Any thoughts?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

1)What version of Crystal reports are you using?

2) Do you see this issue in the CR designer? If so, please post to the Report Design forum:

[;

Note that if the issue exists in the CR designer, the issue will exist at runtime also and needs to be resolved in the designer 1st.

3) If this is only happening in a runtime application, specify the CR SDK used and the development language used as well as version of the development language.

Hope that helps!!

Regards

Amit

Former Member
0 Kudos

Sorry, should have given a lot more info.

1) I am using CR2008

2) No, the CR Designer works fine with OLE objects and images

3) I am using the RAS SDK (but would also be fine with the old CrystalReports.Engine API) under .NET with C#.

Former Member
0 Kudos

Hi,

would like to infrom that RAS SDK's has been dropped in CR 2008.

If you would like to use the RAS SDK's you need to be stick with the old CrystalReports.Engine API.

what is the version of the old Crystal report?

Amit

Former Member
0 Kudos

Oh, that's news! I thought the RAS SDK is the recommended way to go about programmatic access and design of reports?

The version of the CR report is 12.0, but I have a feeling I'd have the same problem with older reports as well.

Is there a way to access the data with the old API?

former_member208657
Active Contributor
0 Kudos

The information Amit posted above is wrong. We fully support the RAS SDK in .NET. I believe he was thinking about the RDC.

If you want to dynamically change an image at runtime your best option is to add it as a Picture Object. You can go into the properties of the picture object and change the Graphic Location formula to use any picture from a mapped path, UNC, or HTTP path.

Former Member
0 Kudos

Hey there, thanks...

What I want is not to change a picture dynamically but rather to access its picture data. The picture data member however returns null even though the object is showing a picture. With the old crpe32.dll I was able to extract the picture data but this of course is very tiresome to marshal calls to an unmanaged API from C#.

Any thoughts on how to access the picture data with the .NET API?

John Goering

former_member208657
Active Contributor
0 Kudos

You'll likely need to use the RAS .NET SDK then. You can access the ReportClientDocument through the ReportDocument object.

Check out the Report Application Server .NET SDK using the link below.

https://www.sdn.sap.com/irj/sdn/businessobjects-sdklibrary

Former Member
0 Kudos

Yes...and how do I access OLE data via the RAS API? I can't find anything in the SDK, other than the PictureData attribute in PictureObject, but it always returns null...

former_member184995
Active Contributor
0 Kudos

HI John,

As far as I know you cant really get any in depth information about the image itself.

You can get items that pertain to it in relation to the report (ie the height, width, etc).

something like

dim boPicObject as New PictureObject

boPicObject = myRasReport.ReportDefController.ReportDefinition.DetailArea.Sections(0).ReportObjects.Item("myPicture")

dim h as Integer = boPicObject.Height
dim w as Integer = boPicObject.Width

Jason

Former Member
0 Kudos

Too bad!

Thanks.

Answers (0)