Consultor Eletrônico



Kbase P51372: How to pass a parameter from Progress WebClient to a report
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   31/10/2003
Status: Unverified

GOAL:

How to pass a parameter from Progress WebClient to a report in Crystal Reports 9 ?

FIX:

/*Sample code to run a report from Progress WebClient
passing parameters to Crystal Reports */

DEFINE VARIABLE crApplication AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE crReport AS COM-HANDLE NO-UNDO.
CREATE "WebReportBroker9.WebReportBroker" crApplication.
CREATE "WebReportSource9.WebReportSource" crReport.

crReport:ReportSource = crApplication.
crReport:URL = "http://demoserver/crystal1/customer.rpt".
crReport:AddParameter("user0","Administrator").
crReport:AddParameter("password0","myadminpasswd").

crReport:AddParameter("prompt0","C*"). /* This is the actual parameter */
crReport:TITLE = "Sports2000 Clients".

chCtrlFrame:CRViewer9:ReportSource = crReport.
chCtrlFrame:CRViewer9:ViewReport().

RELEASE OBJECT crApplication.
RELEASE OBJECT crReport.