Crystal Reports and crviewer.dll

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Crystal Reports and crviewer.dll

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:36 pm

by Andrew >> Thu, 19 Aug 2004 21:16:02 GMT

I'm trying to move away from using the crystl32.ocx to preview generated Crystal report, and start using the crviewer.dll.

It all looks very simple:

1. Obtain the Report object - report := RTLActiveX.openReport ("C:\Report.rpt", 1)
2. Assign the report to the Viewer - CRViewer.reportSource := report;
3. View it - CRViewer.viewReport;

Here's my problem. If I import crviewer.dll as a control through painter Jade informs me that it will not import the reportSource reference as it is a reference to an ActiveXInterface class, so I have no idea how to link the report to the ocx.

If I import the crviewer.dll as an AutomationControl, the reportSource reference is there, however assigning the report object appears to have no effect, that is, after the assignment the crviewer.reportSource reference is null, so the viewReport call does nothing.

Any ideas?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Crystal Reports and crviewer.dll

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:37 pm

by bitsnz >> Thu, 26 Aug 2004 1:24:22 GMT

"If I import crviewer.dll as a control through painter..."

why not copy it to your bin directory as a normal file and work with it from there? The reference shouldn't be affected and the logic should still function

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Crystal Reports and crviewer.dll

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:37 pm

by Andrew >> Fri, 27 Aug 2004 0:06:35 GMT

You can't manipulate an ActiveX inside Jade without 'importing' it first. The location of the external file is not that important as long as it is registered, and the registered location is valid. The location can be read from registry.

The import options are:
1. Control Library.
2. Automation Library
3. A GUI control (through the Painter).

To be honest though, I'm not quite sure what dictates which import approach is most appropriate for a given ActiveX.

NOTE: Jades app.isActiveXClassIdRegistered method does not verify the registered location of the dll, ocx, you have to verify the location yourself.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 46 guests