passing stored proc parameters to crystal reports 
Author Message
 passing stored proc parameters to crystal reports

Using vb5 crystal 6 ocx

Has anyone got any sample code that works when passing stored proc
parameters to a subreport?

Am using the sample code in the developers help but keep getting prompted
for the parameters
I can pass parameters to the main report no problem but its the sub report
thats the problem.

heres my simple code :

'***************************************************************************
**********************
' calling the main report and passing params - this bit works ok
    frmCrystal.crReport.ReportFileName = vstrReportToPrint
    frmCrystal.crReport.Connect = "DSN=" & gconSQLServer.DataSourceName &
";uid=" & gconSQLServer.UserName & ";pwd=" & gconSQLServer.Password

    frmCrystal.crReport.StoredProcParam(0) = vdblUniqueId
    frmCrystal.crReport.StoredProcParam(1) = vstrDataView

'***************************************************************************
**********************

    frmCrystal.crReport.SubreportToChange = "Sup_Persis_1" ' pass in the

    frmCrystal.crReport.StoredProcParam(0) = vdblUniqueId
    frmCrystal.crReport.StoredProcParam(1) = vstrDataView

    frmCrystal.crReport.SubreportToChange = ""

Any help would really be appreciated - ive got a real problem with this, and
so has the client with me!



Wed, 19 Dec 2001 03:00:00 GMT  
 passing stored proc parameters to crystal reports
You can try to save your parameters in a table and then add that table to the
report, so, the parameters can be read

Andy escribi:

Quote:
> Using vb5 crystal 6 ocx

> Has anyone got any sample code that works when passing stored proc
> parameters to a subreport?

> Am using the sample code in the developers help but keep getting prompted
> for the parameters
> I can pass parameters to the main report no problem but its the sub report
> thats the problem.

> heres my simple code :

> '***************************************************************************
> **********************
> ' calling the main report and passing params - this bit works ok
>     frmCrystal.crReport.ReportFileName = vstrReportToPrint
>     frmCrystal.crReport.Connect = "DSN=" & gconSQLServer.DataSourceName &
> ";uid=" & gconSQLServer.UserName & ";pwd=" & gconSQLServer.Password

>     frmCrystal.crReport.StoredProcParam(0) = vdblUniqueId
>     frmCrystal.crReport.StoredProcParam(1) = vstrDataView

> '***************************************************************************
> **********************

>     frmCrystal.crReport.SubreportToChange = "Sup_Persis_1" ' pass in the

>     frmCrystal.crReport.StoredProcParam(0) = vdblUniqueId
>     frmCrystal.crReport.StoredProcParam(1) = vstrDataView

>     frmCrystal.crReport.SubreportToChange = ""

> Any help would really be appreciated - ive got a real problem with this, and
> so has the client with me!



Sat, 29 Dec 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing parameter from VB6 to a CRW report based on a Stored Proc

2. Stored proc parameters in crystal reports

3. Passing Parameters to Crystal Report 5.0 (Stored Procedure Query )

4. Problem with VB passing parameters to Crystal Report - Stored Procedure

5. Passing Stored Procedure parameters via VB6 into Crystal Report (ver 8)

6. passing Parameter from Vb to Stored Procedure In crystal reports

7. Passing parameter from Crystal OCX to a report that uses a stored procedure

8. Pass parameter to a MS SQL stored procedure from Crystal Report 6.0

9. How to pass parameter to DataEnvironment (stored proc)

10. Passing Parameters from C# to Crystal Report / Crystal Report Viewer

11. Problem passing parameters to MSSQL Svr stored proc using API

12. Passing DATETIME parameter to stored proc

 

 
Powered by phpBB® Forum Software