Skip to main content

[Migrated content. Thread originally posted on 14 February 2003]

I try to load the viewer of crystal and i need some help


So far i am capable to create the viewer but i not capable to add the report.

DISPLAY crviewer9
LINE 1
POSITION 1
SIZE 80
LINES 25
HANDLE IS hx-viewer.

[Migrated content. Thread originally posted on 14 February 2003]

I try to load the viewer of crystal and i need some help


So far i am capable to create the viewer but i not capable to add the report.

DISPLAY crviewer9
LINE 1
POSITION 1
SIZE 80
LINES 25
HANDLE IS hx-viewer.
Use the handle returned, to set the file:

Modify HX-Viewer ReportFileName = "yournamegoeshere"


Here is a full example:

IDENTIFICATION DIVISION.
PROGRAM-ID. CRDemo.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
COPY "crviewer.def".
.
WORKING-STORAGE SECTION.
77 HX-Viewer HANDLE OF CrystalReport.

PROCEDURE DIVISION.
STARTIT SECTION.
01-1.
DISPLAY STANDARD GRAPHICAL WINDOW
LINES 32
SIZE 82
TITLE "Crystal Report Viewer Demo"
BACKGROUND-LOW.
DISPLAY CrystalReport LINE 2
COLUMN 5
SIZE 80
LINES 20
VISIBLE 0
HANDLE IN HX-Viewer.
MODIFY HX-Viewer ReportFilename = "Myrpt.rpt".
MODIFY HX-Viewer Destination = CRptToWindow.
MODIFY HX-Viewer Action = 1.
ACCEPT OMITTED.
DESTROY HX-Viewer.
GOBACK.

[Migrated content. Thread originally posted on 14 February 2003]

I try to load the viewer of crystal and i need some help


So far i am capable to create the viewer but i not capable to add the report.

DISPLAY crviewer9
LINE 1
POSITION 1
SIZE 80
LINES 25
HANDLE IS hx-viewer.
I try your program but it is not working for me.
crviewer.def i use crviewer9 to create crviewer.def and when i compiled the program he give error on invalid handle CrystalReport!

[Migrated content. Thread originally posted on 14 February 2003]

I try to load the viewer of crystal and i need some help


So far i am capable to create the viewer but i not capable to add the report.

DISPLAY crviewer9
LINE 1
POSITION 1
SIZE 80
LINES 25
HANDLE IS hx-viewer.
I try your program but it is not working for me.
crviewer.def i use crviewer9 to create crviewer.def and when i compiled the program he give error on invalid handle CrystalReport!

[Migrated content. Thread originally posted on 14 February 2003]

I try to load the viewer of crystal and i need some help


So far i am capable to create the viewer but i not capable to add the report.

DISPLAY crviewer9
LINE 1
POSITION 1
SIZE 80
LINES 25
HANDLE IS hx-viewer.
A quick look at the def file for crviewer 9, unveils that they have changed quite a bit. Apparently there is no such thing as a CrystalReports object anymore. Seems like Seagate doesn't give much for the benefit of backward compatibility...

However, the basics are pretty much the same, I challenge you to dig into the documentation of CrystalReports 9, find the differences from the version I supplied you with and make a sample that works with version 9.

With the example source you got from me, it shouldn't be that hard. Please post the results here.

[Migrated content. Thread originally posted on 14 February 2003]

I try to load the viewer of crystal and i need some help


So far i am capable to create the viewer but i not capable to add the report.

DISPLAY crviewer9
LINE 1
POSITION 1
SIZE 80
LINES 25
HANDLE IS hx-viewer.
A quick look at the def file for crviewer 9, unveils that they have changed quite a bit. Apparently there is no such thing as a CrystalReports object anymore. Seems like Seagate doesn't give much for the benefit of backward compatibility...

However, the basics are pretty much the same, I challenge you to dig into the documentation of CrystalReports 9, find the differences from the version I supplied you with and make a sample that works with version 9.

With the example source you got from me, it shouldn't be that hard. Please post the results here.

[Migrated content. Thread originally posted on 14 February 2003]

I try to load the viewer of crystal and i need some help


So far i am capable to create the viewer but i not capable to add the report.

DISPLAY crviewer9
LINE 1
POSITION 1
SIZE 80
LINES 25
HANDLE IS hx-viewer.
I try to created a preview crystal report 9 but the runtime give me a error
DISPLAY crviewer9
LINE 1
POSITION 1
SIZE 80
LINES 25
HANDLE IS hx-viewer.


MODIFY HX-Viewer ReportSource = ws-fileid.

and the runtime stop with a windows error.

[Migrated content. Thread originally posted on 14 February 2003]

I try to load the viewer of crystal and i need some help


So far i am capable to create the viewer but i not capable to add the report.

DISPLAY crviewer9
LINE 1
POSITION 1
SIZE 80
LINES 25
HANDLE IS hx-viewer.
Adding one more line to your original posting is like hoping for monsoon in Sahara, I am no wizard. And I am no good at riddles... If you want help, you got to do some research.

When I suggested to look at Crystal docs, it was because I am quite confident they have provided a sample or two, showing the basics of how to display a report with CRViewer9, even though this is most likely a sample in VB, VC or Delphi.

It should be of just a few lines, so doing a job together in this forum can be a good lesson of how to interpret and understand examples in other languages. I expect you to say that you don't want to learn other languages, but, problem is, unfortunately I doubt Seagate will ever open their eyes for the beauty of COBOL, hence, we have to live with it, and better learn to interpret, the sooner, the better.

Which, when you come to the next crossroad, will possibly make you able to help yourself. And with the example here, others will learn as well.

Hint: You assign ReportSource to a variable named ws-fileid, but what in the world is that? Tell me what it is, where it comes from, and find some demo code in the CRViewer9 help file and we should be able to move on

[Migrated content. Thread originally posted on 14 February 2003]

I try to load the viewer of crystal and i need some help


So far i am capable to create the viewer but i not capable to add the report.

DISPLAY crviewer9
LINE 1
POSITION 1
SIZE 80
LINES 25
HANDLE IS hx-viewer.
Adding one more line to your original posting is like hoping for monsoon in Sahara, I am no wizard. And I am no good at riddles... If you want help, you got to do some research.

When I suggested to look at Crystal docs, it was because I am quite confident they have provided a sample or two, showing the basics of how to display a report with CRViewer9, even though this is most likely a sample in VB, VC or Delphi.

It should be of just a few lines, so doing a job together in this forum can be a good lesson of how to interpret and understand examples in other languages. I expect you to say that you don't want to learn other languages, but, problem is, unfortunately I doubt Seagate will ever open their eyes for the beauty of COBOL, hence, we have to live with it, and better learn to interpret, the sooner, the better.

Which, when you come to the next crossroad, will possibly make you able to help yourself. And with the example here, others will learn as well.

Hint: You assign ReportSource to a variable named ws-fileid, but what in the world is that? Tell me what it is, where it comes from, and find some demo code in the CRViewer9 help file and we should be able to move on