PDA

Click to See Complete Forum and Search --> : Crystal Reports 8.5 & VB6


pietman
Aug 21st, 2003, 07:41 AM
I've got a main report with 3 subreports on it.
The 3 subreports run 3 different stored procedures all using the same reference number for lookup.
I have to write a Visual Basic 6 interface that ask for this reference number and then run the report with this number as input. I don't want the report to ask for a reference number 4 times (main report + 3 subreports) - this is what happen when you preview the crystal report from Crystal Reports.
How can I specify these parameter values from my VB code?
(How do you specify subreport parameter values)

This is the code I used to run one of the subreports with:
' CrystalReport1.StoredProcParam(0) = txtinputreport.Text
' CrystalReport1.WindowState = crptMaximized
' CrystalReport1.WindowShowGroupTree = True
' CrystalReport1.SelectionFormula = "{EDO_REPORT_OPERATORS;1.B_C_Invoice_group_code} <> 'special'"
' CrystalReport1.PrintReport

but I am now running all reports as subreports from a main report.