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

SubReport - Runtime Change Database

edited September 2012 in Datapipelines
This is a follow on from thread started in the RAP Newsgroup.
Initially I tried to change the database of a query dataset through RAP.
Nico suggested doing this in Delphi first.

My problem is where to put the code?
I can set the database in both OnInitialize and OnBeforeOpen but these
then generate the data for the entire report.

Can I set it before it opens the dataset for each instance of generating
the subreport ?

If so where do a place the code ?

e.g in Delphi I want to process "QryDtail.SQL.DatabaseName := '!Alloc';"
before the subreport dataset is opened.

Thanks

Mike

Comments

  • edited September 2012
    Hi Mike,

    Perhaps I misunderstood what you were trying to accomplish. Are you
    trying to gather data from multiple databases for a single report?

    ReportBuilder and DADE are designed to be connected to a single database
    at a time. In order to switch databases, you would need to do so for
    the entire report, not just individual subreports.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2012
    Thanks Nico,
    I was trying to change a database in the Sub Report dependent upon
    values traversed in the main detail.

    I will rethink along the lines of individual Reports linked together.

    Mike
    ______________________________________________
This discussion has been closed.