Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

Passing of Parameter values programatically to a stored Procedure used as a datasource in SubReport of cr.net(2003)

Last post 04-15-2008, 12:31 PM by dilip nagle. 0 replies.
Sort Posts: Previous Next
  •  04-15-2008, 12:31 PM 41393

    Passing of Parameter values programatically to a stored Procedure used as a datasource in SubReport of cr.net(2003)

    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

View as RSS news feed in XML