Home Datapipelines
New Blog Posts: Merging Reports - Part 1 and Part 2

SQL parameter value for a SubReport (RB 11.04)

edited May 2009 in Datapipelines
Hi,

In a Detail band, i have a subreport on a tppBDEpipeline with SQL manually
modified like "select a.name from mytable a where a.id = :P1"
I have create a parameter named "P1"

My Subreport alway fire a SQL with the same value of "P1" even if i change
it value on Detail.BeforeGenerate event with RAP:
Ex : Report.Parameters.Items['P1'].Value := 56;

How can i get un new SQL expression when my parameter "P1" had changed ?

Thanks !

Comments

  • edited May 2009
    Hi Julien,

    I believe the DetailBand.BeforeGenerate fires too late to alter the dataset.
    Try using a different event such as Report.OnIntializeParameters.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2009

    With RB 11, you should not need to write any code to handle parameterized
    master/detail.

    From the Data workspace you can link the queries visually by dragging from
    the detail field to the master field or by using the Link dialog for the
    detail dataview.

    With master/detail linking for the parameterized SQL, the update will occur
    automatically.



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.