Using a datamodule
Hi,
A newbie here. I'm using D5 Pro and RB Pro 7.04
If I have an existing datamodule containing 16+ databases (dBase dbf's
and NO BDE), does it make sense to place the dataPipeLines here?
If so, where does it make sense to place the Report.Print
I created a test report (as a separate project) and used my datamodule
but now I would like to incorporate the report in my main application,
which would call the report as a menu item from the main screen.
I looked at the Demo program and all pipelines and datasources are
specified (and basically duplicated) on the separate forms. I haven't
fully comprehended how the different reports are called (I've never
used RegisterClasses) so I'm not quite sure how to proceed at this
point. I plan on having more than one report for this app, with many
being called from the main screen, and special procedures for each report.
Possibly where I'm getting confused is in regards to saving report
templates and losing events, as has been mentioned in previous
responses, and the directing of the user to RAP.
Some general guidance would be appreciated.
Thanks, Marie
A newbie here. I'm using D5 Pro and RB Pro 7.04
If I have an existing datamodule containing 16+ databases (dBase dbf's
and NO BDE), does it make sense to place the dataPipeLines here?
If so, where does it make sense to place the Report.Print
I created a test report (as a separate project) and used my datamodule
but now I would like to incorporate the report in my main application,
which would call the report as a menu item from the main screen.
I looked at the Demo program and all pipelines and datasources are
specified (and basically duplicated) on the separate forms. I haven't
fully comprehended how the different reports are called (I've never
used RegisterClasses) so I'm not quite sure how to proceed at this
point. I plan on having more than one report for this app, with many
being called from the main screen, and special procedures for each report.
Possibly where I'm getting confused is in regards to saving report
templates and losing events, as has been mentioned in previous
responses, and the directing of the user to RAP.
Some general guidance would be appreciated.
Thanks, Marie
This discussion has been closed.
Comments
Placing the datapipelines inside your datamodule makes perfect sense if this
is where your database components are located. Although you don't
necessarily need to, you could also place the TppReport component inside the
datamodule as well.
Calling Report.Print is really up to you. If you would like to select
"Print" from the file menu, you will need to call Report.Print from the menu
click event handler. If the report is not on that form, you will need to
create an instance of the form that contains the report and call
TMyFormClass.Report.Print for example.
From what you told me, it looks like there are two ways you could approach
the application.
First, you could create numerous forms with report objects on them, then
create the form classes and print the reports on demand. This would be very
similar to the Report Demo located in the RBuilder\Demos\1. Reports\...
directory. If you check the Project - Options of the Demo application, in
the Forms tab you will see that none of the forms with reports on them are
created when the application is initially executed. If they were, the app
would be a memory hog and probably run very slowly. Instead, each form
class is registered in the initialization section and later retrieved and
created on demand in the CreateForm method. Once you register a class with
Delphi, that class then has the ability to be streamed and created on
demand. See the Delphi help on the topic for more information. Also, I
would recommend taking a look at the ReportBuilder Developer's Guide. There
is a tutorial that guides you though an app like this one step by step by
adding class types to a TList, then later creating the classes as you need
them.
Second, as you mentioned below, you could make your application much simpler
using only one form and one Report object. This would require that you
create all your reports and save them as Report Template files (.rtm).
Using ReportBuilder Enterprise, you could do away with all your
datapipelines and event handlers in Delphi and move all your data access to
DADE, and event code to RAP. My suggestion would be to work through the
tutorials in the Developer's Guide dealing with RAP, and see the RAP Demos
to see what it is capable of. You can also take a look at the End User
Database demos, and run a few of the reports in there to see how to create
your data access completely in DADE (local to the template). Then from here
you can decide which way you would like to approach this app.
--
Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
Delphi Informant Readers Choice awards!
http://www.delphizine.com/ballot2004/
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I'll look at the RAP demos which I skipped while reading the manual
since I didn't buy the Enterprise version. I guess I sorta
mis-interpreted the differences between the Pro and Enterprise. I
didn't plan on having my users create their own reports and didn't
realize the difference of including event handlers within the report
templates. I'm using TOPAZ for my data access components, and don't
know SQL or BDE stuff - a double whammy when trying to learn.
I was concerned about memory bloat, which is also why I asked for some
suggestions. I didn't want to place multiple TppReports on the main
form and wasn't sure if placing it on the datamodule made sense.
Thanks again,
Marie