Background:
1. I have a Main Report whose Data source is a Stoted Procedure with two input Parameters @P_FMFINYEAR and @P_TOFINYEAR.
These are shown by CR in Parameter List.
2. I have a sub-report(embeded in Main Report), whose data source is also a Stored Procedure with two input Parameters @P_FMFINYEAR and @P_TOFINYEAR..
These are also shown by CR in parameter list of SubReport.
3. The Main and sub Reports are linked based on a Field of the Datasource viz. FINYEAR . This is also shown by CR as a parameter in subreport as
-Pm_SP_TAXBASE_SELECT;1.FINYEAR
4. I have been passing parameters to Main Reports as follows:
dim ocrListTax as crListTax ' (which is class for my rpt file)
dim intFmFinYear as Integer = 2006
dim intToFinYear as Integer = 2008
ocrListTax = New crListTaxocrListTax.SetDatabaseLogon('abc','pqr','NS-01','nsdb')
ocrListTax.SetParameterValue(@P_FMFINYEAR ", intFmFinYear)
ocrListTax.SetParameterValue(@P_TOFINYEAR ", intToFinYear)
ocrListTax.ExportToDisk(ExportFormatType.PortableDocFormat, "d:FinTax.pdf")
ocrListTax.Close()
The Problem
1. How do I pass parameters to the sub report programatically?
2.Today it gives me an error, missing parameter value,
3. How to filter records in a datasource of subreport based on FM - TO Parameters and then link it ro appropriate key (FINYEAR) of Main report
Regards,
Dilip Nagle