How to use a template with several subreports
I'm using D6 Enterprise and Report Builder 6.0.
I just inherited a project that has more than a 100 forms and TppReports. I
want to create a DLL that will have one TppReports and load the rtm file for
the required report and show the report. In working with this concept I was
wondering how to:
1) Some reports have more than one datasource (master-detail-subdetail,
etc). How can I know how many datasets (pipelines) are needed for a
TppReport?
2) If I want to use a TADOStoredProc component and I have a master-detail
report, is there a method to use NextRecordset of the TADOStoredProc and the
report will be able to filter the NextRecordset for the master record when
printing?
Thanks,
Bill N
I just inherited a project that has more than a 100 forms and TppReports. I
want to create a DLL that will have one TppReports and load the rtm file for
the required report and show the report. In working with this concept I was
wondering how to:
1) Some reports have more than one datasource (master-detail-subdetail,
etc). How can I know how many datasets (pipelines) are needed for a
TppReport?
2) If I want to use a TADOStoredProc component and I have a master-detail
report, is there a method to use NextRecordset of the TADOStoredProc and the
report will be able to filter the NextRecordset for the master record when
printing?
Thanks,
Bill N
This discussion has been closed.
Comments
It sounds like you've inherited quite a project
in using on TppReport object with numerous Report template files, it would
definitely be worth your time to take a look at some of the more advanced
features available with ReportBuilder Enterprise. Using DADE and RAP you
are able to keep the entire Report definition inside the template including
the datapipelines, and event handler code. This makes the report completely
portable. All you would need to do is create a Report Object and load the
template, ReportBuilder would take care of the rest. Otherwise you will
need to somehow store this information (i.e. datasource information, event
handler code) somewhere inside your database and based on which report is
loaded, you will then have to dynamically create these objects on your form
and manually connect them to the report.
Though the first option will take some time to convert all your datasets
over to DADE and write all your event handler code into RAP, but it will not
take near as long or be near as difficult as the alternative. If you would
like to learn more about what DADE and RAP are capable of, please visit our
web site at http://www.digital-metaphors.com or check out the ReportBuilder
Developer's Guide located in your \RBuilder\Developer's Guide\... directory.
From what it looks like, the TADOStoredProc component works similar to the
TADOQuery component so it should be possible to link these in a master
detail relationship without problem.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Builder.
I do have Report Builder Enterprise but I'm clueless on how "ReportBuilder
would take care of the rest" (I'll go through the help file and research
DADE and RAP).
For example say I have report "A" which is a basic List report, report "B"
has two subreports and report "C" which has one subreport. From a form my
user selects Report "B". I load the template into the TppReport object and
set the master source to a TADOStroedProc. Will the TppReport template
store the TDataSources and TADOQueries that the sub-report is based on? If
not, how can I find out how many subreports report "B" has, what is the SQL
statement that it is based on, etc? I read a thread about parameters, can I
store this information in the TppReport parameters?
Thanks,
Bill N
Acutally, if you use DADE, there will be no need to use any TADODataSources
or TADOQueries because all this information will be created and stored in
the report template using the DADE archetecture. Even the connection
information is stored in the template so in actuality all you would need on
your form is a report and a button.
As I said before, it definitely would be possible to store all the report
information in a separate place (i.e. parameters, database), but this is not
what ReportBuilder was designed to do and is not recommended. Converting a
project this size into something that can be run with one report object and
report templates is going to be very time consuming to begin with. I just
believe by using DADE and RAP you will not only have a more effecient
application, but you will greatly reduce the amount of headaches you receive
during this process.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com