Re: using fujitsu power cobol and crystal reports

From: Hopeful (me_at_mynet.net)
Date: 10/07/03


Date: Tue, 7 Oct 2003 13:39:05 +0200


> Any special reason for using Crystal thru the COM interface ?
> You stated that you're able to put the "embedded designer control onto
> the form". Are you designing the report inside your program ?
>
> I'm asking this because if you have a pre-formated report, the normal
> path would be to embed the ActiveX control onto your form and then
> update the "ReportFileName" property, and probably, a few others like
> "SelectionFormula" and "Connect".

I'm using CR 9 and the CRViewer ActiveX control doesn't seem to have the
above mentioned
properties so I've been forced to go this route unfortunately. (unless i'm
really a sucker for punishment)

In the interim I have made some progress in that I've managed to create the
COM objects as follows.

01 WK PIC X(1024)
01 CApplication OBJECT REFERENCE COM.
01 CReport OBJECT REFERENCE COM.
01 CReportName PIC X(1024)

.....

Move "CrystalRuntimeApplication" TO WK.
INVOKE COM "CREATE-OBJECT" USING WK RETURNING CApplication.
Move "CrystalRuntimeReport" TO WK.
INVOKE COM "CREATE-OBJECT" USING WK RETURNING CReport.

Move "MyReport.rpt" TO CReportName.
INVOKE CApplication "OpenReport" USING CReportName RETURNING CReport.

.....

The above compiles and runs error free but I still need to assign the
CReport to the CRViewer9 control.
I am battling to figure our how to do the powercobol equivilent of the
following vb syntax.

CRDesignerCtrl1.ReportObject = m_Report (m_Report being the equivilent of
my CReport)

CRViewer1.ReportSource = m_Report

CRViewer1.ViewReport

The c++ syntax has a similar assignment

m_Report = m_Application->OpenReport(ReportPath, dummy);
m_Viewer.SetReportSource(m_Report);

but I can't seem to figure out how to assign CReport to ReportSource as the
compiler regards the following as illegal.

MOVE CReport TO "ReportSource" OF CRViewer91.

Nik

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 03/09/29


Relevant Pages

  • Architecture question...overthinking again :-)
    ... If I want a report on a database it creates a cData class to handle ... accessing a database and cReport to handle reporting on results. ... findings in a listview on a form(with the help of cListView) ... somethings happening so I have a frmProgBar to show a progress bar ...
    (microsoft.public.vb.general.discussion)
  • Re: Architecture question...overthinking again :-)
    ... If I want a report on a database it creates a cData class to handle ... accessing a database and cReport to handle reporting on results. ... cListView handles formatting headers and entering data into a listview on ...
    (microsoft.public.vb.general.discussion)
  • Re: uncleared code
    ... but i cant change the font directly in creport. ... right click the field and format but i cat reflect on report ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: uncleared code
    ... but i cant change the font directly in creport. ... right click the field and format but i cat reflect on report ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: uncleared code
    ... but i cant change the font directly in creport. ... right click the field and format but i cat reflect on report ...
    (microsoft.public.vb.general.discussion)

Loading