Problem In connection with crystal reports

Rachana

New Member
HI,

I'm a very new user of progress10A. Before that I haven't used progress. I'm trying to view crystal report Developer 11.5 through Progress 4GL programming code. I tried to view simple report with any database. But still it is not showing. Help me with the programming code.

i have trieds this>>

DEFINE VARIABLE ch-CRapplication AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE ch-CRreport AS COM-HANDLE NO-UNDO.

CREATE "CrystalRuntime.Application.11.5" ch-CRapplication NO-ERROR.
CREATE "CrystalRuntime.Report.11.5" ch-CRreport NO-ERROR.
ch-CRreport = ch-CRapplication:OpenReport("c:\report\abc.rpt").
ch-CRreport:printOut().
RELEASE OBJECT ch-CRapplication NO-ERROR.
RELEASE OBJECT ch-CRreport NO-ERROR.

It shows a blank report. I tried this code by seeing in the net.It shows print option and directly goes to the printer but the label I tried to show doesn't display.I also want to preview the report in progress application. And how to retrieve the ocx or dll name.
 

BONO

Member
Hello ,

you need to connect report to db before printout.
Add this line with good information after then openreport.
ch-CRreport:Database:Tables(1):SetLogOnInfo(pc-servername,pc-dbname,pc-userid,pc-password).
All the parameters are the same than parameters needed to ODBC connection.


For complex report with multiple DB you need to connect each subreport and each table of the report

HTH
 

Rachana

New Member
After sending That mail, I immediately tried this code>>


DEFINE VARIABLE CRComHdl AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE CRreportAS COM-HANDLE NO-UNDO.
DEFINE VARIABLE CRDtBs AS COM-HANDLE NO-UNDO.
CREATE "CrystalRuntime.Application" CRComHdl NO-ERROR.
CREATE "CrystalRuntime.Report" CRreport NO-ERROR.
CRreport= CRComHdl:eek:penReport("C:\report\abc.rpt").
CRreport:DATABASE:Tables(1):SetLogOnInfo("10.0.1.100","trdb","lp","").
CRreport:DATABASE:Tables(2):SetLogOnInfo("10.0.1.100","trdb","lp","").
CRreport:printout().

But this code is also not working as it says
Error occured while accessing component property/method:printout.
Failed to open the connection.
Error code: 0x80020009 c:\progress\wrk\p81547_Untitled1.ped(5890)
My questions are:
1.Please help me to find out what sort of error is this or what is the problem with the code??
2. how to know the name of the ocx file in progress (for example "CrystalRuntime.Application" and "CrystalRuntime.Report" are which dll or ocx files?? )
3. How to know the name of events or methods of the ocx or dll files??
4. In application Builder of progress when I tried to see the syntax those syntax are not showing flexibility with the programming code.
Important and necessary one for me is
I just want to preview the report from progress and send it to printer like we do from crystl32.ocx file in vb6. Couldn't it be possible to do exactly the same we use to do from vb??

Thanks. I would really admire the help u do.
 

BONO

Member
Hello,
- have you test the ODBC connection ? (User must have sql rigth. By default u have to create sysprogress user with sysprogress for passwd for example)

in order to use crystal reports you need to :
- create an odbc connection using datadirect progress odbc driver from your DB.
- Use a correct user with sql rigth(create sysprogress on progress db is sufficient to do a test)
- A sql92 broker have to be started on the DB, then u can refer to it on odbc connection management

If the test of odbc connection is succesfull then you can try your code.

For more information, with CR developer product, there is a developper folder where you can find a specific help file for RDC use of crystal report.


HTH
 

Rachana

New Member
Hi Thanks but the report itself is working perfectly alright as I have connected the report with the ODBC i.e connected with the database helpdesk and in control panel ->AdministrativeTool->DataSources(ODBC) it is working perfectly. Ofcourse I have configured the odbc with the database applying Host name, Port Number, database name and userId and test the connection it shows connection established and even in Crystal reports the data from the above ODBC is retrieving without any problem. My question is does I need to mention the ODBC name in the code of progress in place os the server name or what?

My connection

Crsytal report(CrossTabRep.rpt)->ODBC(Helpdesk)...shows data
Progress -> CrossTabRep.rpt doesn't show data.

please help me to know ..how to know the properties and the methods(Like openReport()) as ViewReport() is not working. Sometimes it says that the dll files are not registered and when I tried to register the dll files where they are located it denies to register but the same file when I kept in system32 then it accepts to register. What sort of problem is this.

I'm not comfortable with CR 11.5 but comfortable with CR 8.5.
Does anyone knows what is the subtitute file of Crystl32.ocx in 8.5 version for 11.5 version??

Please help me
 

BONO

Member
Hello,
Sorry for the time but i think you will find what you want on my sample.

HTH
 

Attachments

  • crystal-intreraction-sample.p
    11.8 KB · Views: 93

vdennis

Member
There is a required dll that needs to be moved, and others that need to be requistered. These are a must in order to make BOXI work with OE. These are referenced in the Progress KB. Changes were made in BOXI that no longer support direct transfer of the RDC options, these need to be 'installed' on each pc that might use the OCX. I may have a PDF on this somewhere as I gave a presentation to the VAPUG in October 05 on how to do all of this. And I have an install program that will install the needed files in order to run the RDC. I also have a sample program(s) that I can send that shows a 'viewer' within a progress application. I would like to say I wrote it all myself, but my good friend Youssif from Progress Tech had a big hand in helping me. If I dont have the PDF here, I am sure it is still on the VAPUG website, it would just take me some time to find. Let me know and I will get them off to you.
Email me directly if you want the files at Dennis_Voeg@BayCountryLawns.com

-Dennis-
 

Rachana

New Member
I have tried this code in application builder but it is not filtereing the record why?????It shows the report but it doesn't filters the record.what is wrong with this code.

DO:
DO:
DEFINE VARIABLE crApplication AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE crReport AS COM-HANDLE NO-UNDO.
DEF VAR i AS INTEGER NO-UNDO.
DEF VAR ipcFormula as CHARACTER NO-UNDO.
DEFINE VARIABLE i-crsubreport AS INTEGER NO-UNDO INITIAL 5.

CREATE "CrystalRuntime.Application" crApplication.
CREATE "CrystalRuntime.Report" crReport.
/* Set the report object */
crReport = crApplication:OpenReport("c:\report\report2.rpt").

/* Connect the viewer to the report (with the db connection ) */
DO i = 1 TO crReport:DATABASE:tables:COUNT:
crReport:DATABASE:Tables(i):SetLogOnInf("HelpDeskODBC","HelpDeskODBC","lp"," ").
END.
crReport:RecordSelectionFormula="{xhours.xusec}='Rachana'".
chCtrlFrame:CrystalActiveXReportViewer:ReportSource = crReport.

/* View the report */
chCtrlFrame:CrystalActiveXReportViewer:ViewReport().
crReport:RecordSelectionFormula=" ".

/* release object*/
RELEASE OBJECT crApplication.
RELEASE OBJECT crReport.

END.



Thanks for the help in advance.
Rachana.
 

Rachana

New Member
hi everybody!!

I have a problem. I installed crystal report developer 11.5.3.417 installed and deployed with openedge 10.A. It worked successfully.

my code has
DEF VAR chApplication AS COM-HANDLE NO-UNDO.
DEF VAR chReport AS COM-HANDLE NO-UNDO.
DEF VAR chConnProps AS COM-HANDLE NO-UNDO.
DEF VAR UIB_S AS LOGICAL NO-UNDO.
DEF VAR OCXFile AS CHARACTER NO-UNDO.
DEF VAR ch-CRsection AS COM-HANDLE NO-UNDO.
DEF VAR ch-CRReportObject AS COM-HANDLE NO-UNDO.
DEF VAR ch-CRSubReport AS COM-HANDLE NO-UNDO.
DEF VAR i-crsubreport AS INTEGER NO-UNDO INITIAL 5.
CREATE 'CrystalRuntime.Application' chApplication.
CREATE 'CrystalRuntime.Report' chReport.
/* Load Ocx File in the control Frame OCXFile = SEARCH( "MYc-win.wrx":U ).*/
/* **** Set the report Object ********** */
ASSIGN
chCtrlFrame = CtrlFrame:COM-HANDLE
UIB_S = chCtrlFrame:LoadControls( OCXFile, "CtrlFrame":U)
CtrlFrame:NAME = "CtrlFrame".

now I want to install in client computer but don want to install whole crystal report package. I just want the required files of crystal report to view the report and to install in the client computer. I don want them to give design portion and all.
I have found three reg files by seeing in registry by running regedit command in run and registered in client computer but still it is not showing the report . It says class
crystalruntime.application not found and so on.

I want to know what are the other files of crystal report to run the report in the client computer.

Please help me to know. It is very urgent for me.

Thank you.
Rachana.
 

Rachana

New Member
new problem!!

hi everybody!!

I have a problem. I installed crystal report developer 11.5.3.417 installed and deployed with openedge 10.A. It worked successfully.

my code has
DEF VAR chApplication AS COM-HANDLE NO-UNDO.
DEF VAR chReport AS COM-HANDLE NO-UNDO.
DEF VAR chConnProps AS COM-HANDLE NO-UNDO.
DEF VAR UIB_S AS LOGICAL NO-UNDO.
DEF VAR OCXFile AS CHARACTER NO-UNDO.
DEF VAR ch-CRsection AS COM-HANDLE NO-UNDO.
DEF VAR ch-CRReportObject AS COM-HANDLE NO-UNDO.
DEF VAR ch-CRSubReport AS COM-HANDLE NO-UNDO.
DEF VAR i-crsubreport AS INTEGER NO-UNDO INITIAL 5.
CREATE 'CrystalRuntime.Application' chApplication.
CREATE 'CrystalRuntime.Report' chReport.
/* Load Ocx File in the control Frame OCXFile = SEARCH( "MYc-win.wrx":U ).*/
/* **** Set the report Object ********** */
ASSIGN
chCtrlFrame = CtrlFrame:COM-HANDLE
UIB_S = chCtrlFrame:LoadControls( OCXFile, "CtrlFrame":U)
CtrlFrame:NAME = "CtrlFrame".

now I want to install in client computer but don want to install whole crystal report package. I just want the required files of crystal report to view the report and to install in the client computer. I don want them to give design portion and all.
I have found three reg files by seeing in registry by running regedit command in run and registered in client computer but still it is not showing the report . It says class
crystalruntime.application not found and so on.

I want to know what are the other files of crystal report to run the report in the client computer.

Please help me to know. It is very urgent for me.

Thank you.
Rachana.(u can even reply me in rach261@hotmail.com )
 
Top