Highlighted
Absent Member.
Absent Member.
2044 views

[archive] Crystal Reports with AcuCobol

[Migrated content. Thread originally posted on 28 November 2002]

I am trying to call Crystal Reports from my AcuCobol program using the Active-x Control and odbc data source. I have been moderately successful but have several questions. Has anyone out there done this, have sampe code, etc.
0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Crystal Reports with AcuCobol

It is very difficult to provide a good example for something as extensive as Crystal Reports. But here is a sample of syntax:

create @Application of craxddrt handle is hx-crapp.

modify hx-crapp @OpenReport (ws-fileid)
returning hx-crreport.
MODIFY hx-crreport PrintOut(0).
inquire hx-crreport PrinterName in my-str.
destroy hx-crreport.
destroy hx-crapp.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Crystal Reports with AcuCobol

Thank you very much for your response. I have been using the active-x control crystl32.ocx. The Crystal Development manual suggest the better method is to use the RDC (Report Designer Component). One of those is the Report designer and Runtime component craxddrt.dll which you are describing. Their manual also lists craxdui.dll, craxdrt.dll, p2smon.dll, and one I'm most interested in, crviewer.dll, which would allow me to provide onscreen display of reports at runtime. Have you used any of these dlls.? Do you know of any AcuCorp clients who have made Crystal an integrated part of a third party solution? I want to offer it in my accounting package so I can provide more presentation style reporting. To do this I will need to dynamically change the data path or the data set name to access data which is mapped to different drives and directories at customer locations. Since I have a developer license I can even do this without my clients purchasing Crystal.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Crystal Reports with AcuCobol

craxdrt.dll is familiar, as is, probably the others as well. But, as you can figure by such an answer. I have not used CR for the purpose of "using" it. I have only used it to find solutions to problems users has had with it in conjunction with ACUCOBOL-GT. So I am probably no good source for evaluating the one versus the other.
Yes, we do have customers using CR, however, I don't have those names at hand. This forum is as a matter of fact what is intended to bridge this.
Hopefully, some of these guys that already use it read this thread, or else, you may make a call to the Tech Support and ask if they would mind try to hook you up with some of those we know of. This latter, of course dependent that the other party will accept such a request.

Gisle
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Crystal Reports with AcuCobol

:confused:
I'm using craxddrt20.dll to try to access Crystal Reports

The compiler accepts the line:
create @Application of craxddrt20 handle is hx-crysapp

but the next line:
modify hx-crysapp @OpenReport (ws-fileid)

gives me the error message:
undefined data item @OpenReport

there is an @OpenReport method in craxddrt20

does anyone have any ideas why this would happen?

Thanks!!
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Crystal Reports with AcuCobol

Difficult to be precise when we don't see the rest of your application...
However, this sounds a bit familiar. If you are using crviewer in the same application, chances are that you are hit by a known bug. (Which is fixed though, for a later version)
Some controls, does not flag themselves as embeddable controls, it may be discussed who is right and who is wrong in this. But at least, we don't recognize them as embeddable controls. Which is true for the crviewer control. If you have this control embedded in your application as well, you should look up the def file for this control, search for: CLASS @CRVIEWER
Three lines down you will find:

PRIMARY-INTERFACE
DEFAULT-INTERFACE, "ICrystalReportViewer4"

The number at the end may vary, that is not important, what is important is that there is a line missing here, in between these two lines there should be a line: ACTIVE-X-CONTROL, so that it should look like this:

PRIMARY-INTERFACE
ACTIVE-X-CONTROL
DEFAULT-INTERFACE, "ICrystalReportViewer4"

Now, if you do this change and recompile, I would expect your application to run. If not, you will have to contact Tech support for further investigation.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.