About Dynamic Datapiple and Creation
Hi All,
I 've 4 dataset which created by the Tclientdataset and build master
detail relationship for it at runtime
1. Master DataSet-> Two Detail DataSet
2. One User Info DataSet
Total 4 dataSet.
I've set the ppReport and Designer placed in the form and create the
dbpipeline for the dataset at runtime
and save the report into the DB through he template setting.
1st Case:
if the ppreport just connect to the Master DataSet , I can print all the
Master DataSet data without problem.
2st Case:
if I set up the follow the case Master Detail Case, it only print Last
Master-Detail Record Only.
=======detail Band of Main report=======
Put the Master DataSet DBMemo Data
[subreport connect to One Detail 1 ]
[subreport connect to One Detail 2 ]
===============================
In Each Subreport, I put the correspoding data.
I only can print the first and Master Record with its details record and the
report seems stop and don't the other Master Data.
It seeems that it can't transerve all the Master Data.
If I need to print all the Master in this Setting ,
Should I need to create a DataView for it (
but
1. -> I don't need user to chaneg data and the relationship of the dataset.
2. -> Since I build the Master/Detail in the dataset level, user no need to
change anything)?
For the same case, I create the MasterLink in the Datapipeline level.
it is so funny that I can Print all the Master Data out but Only Last Set
detail record only.
The Report like"
Master data 1
Master data 2
Master data 3
detail data 3
detail data 3
detail data 3
Bu the case I' ve detail data in Master Data 1 and 2 also.
How can i print all the Master and detail as aspected ?
If I need to Create the dataview, I just want to use the current
tclientdataset without connecting to any DB and don't want user to change
any data
setting. w can I achieve it?
Any Advise is welcome.
Thx All
I 've 4 dataset which created by the Tclientdataset and build master
detail relationship for it at runtime
1. Master DataSet-> Two Detail DataSet
2. One User Info DataSet
Total 4 dataSet.
I've set the ppReport and Designer placed in the form and create the
dbpipeline for the dataset at runtime
and save the report into the DB through he template setting.
1st Case:
if the ppreport just connect to the Master DataSet , I can print all the
Master DataSet data without problem.
2st Case:
if I set up the follow the case Master Detail Case, it only print Last
Master-Detail Record Only.
=======detail Band of Main report=======
Put the Master DataSet DBMemo Data
[subreport connect to One Detail 1 ]
[subreport connect to One Detail 2 ]
===============================
In Each Subreport, I put the correspoding data.
I only can print the first and Master Record with its details record and the
report seems stop and don't the other Master Data.
It seeems that it can't transerve all the Master Data.
If I need to print all the Master in this Setting ,
Should I need to create a DataView for it (
but
1. -> I don't need user to chaneg data and the relationship of the dataset.
2. -> Since I build the Master/Detail in the dataset level, user no need to
change anything)?
For the same case, I create the MasterLink in the Datapipeline level.
it is so funny that I can Print all the Master Data out but Only Last Set
detail record only.
The Report like"
Master data 1
Master data 2
Master data 3
detail data 3
detail data 3
detail data 3
Bu the case I' ve detail data in Master Data 1 and 2 also.
How can i print all the Master and detail as aspected ?
If I need to Create the dataview, I just want to use the current
tclientdataset without connecting to any DB and don't want user to change
any data
setting. w can I achieve it?
Any Advise is welcome.
Thx All
This discussion has been closed.
Comments
For future reference we prefer you use your real name when posting to these
newsgroups.
I'm a bit unclear about how your application is set up. Are you using DADE
to define your datasets? If so, there is no need to use and like datasets
outside the report. If you are not using DADE, how are you linking your
datasets? Are you certain that your detail datasets are ordered on the
linking field? Take a look at the following article for more information.
------------------------------------------------
TECH TIP: Fundamentals of Report Data Traversal
------------------------------------------------
1. Single Table Listing Report
Assign the Report.DataPipeline property and leave the
DetailBand.Pipeline unassigned.
The report will traverse the data from start to end (based on the
datapipeline range settings and honoring any filters you've placed on
the datset etc.)
2. Master/Detail Report:
A. Assign the Report.DataPipeline property to the master. Create a
subreport in the detail band and assign the childreport.DataPipeline to
the detail datapipeline.
Use either the visual linking features available from the Report
Designer's Data tab, or Use standard Delphi dataset linking to define
the relationships between the datasets.
The Report will traverse the master records and for each, the subreport
will traverse the detail data related to the master.
3. Master with 2 Details
Configure as in 2 above. Add an additional subreport to the detailband.
Set subreport.ShiftRelativeTo property to the point to the first
subreport. Connect the ChildReport's DataPipeline to the detail data.
4. Report connected to no datapipelines.
When Report.AutoStop is set to True, the Report will print a single
detail band.
When Report.AutoStop is set to False, the Report will print detail bands
until instructed
to stop. You can control when the report stops by setting the
Report.PageLimit property or by calling Report.DataTraversalCompleted
method. Otherwise the report will never stop.
Additional Notes:
----------------
1. SubReports have a Report property that is of type TppChildReport.
Thus, programmatically you can code SubReport.Report.DataPipeline :=
myDataPipeline.
2. ChildReport's traverse data following the same rules as above. A
ChildReport prints in its entirety each time it gets a turn to print.
3. For a Child style SubReport use the Title/Summary band rather than
the Header/Footer (or use a GroupHeader/GroupFooter combo). A standard
Header/Footer will not work because these always print at the very
top/bottom of the page.
4. Do not filter the dataset of modify it any way once the report.Print
command is issued. If you need to do master/detail and cannot use
linked datasets, then use the master DataPipeline.OnRecordPositionChange
event to filter the detail dataset.
5. The reports and datapipelines use dataset bookmarking. Make sure
the dataset can support bi-directional navigation.
Check out the RBuilder\Demos\Reports\Demo.dpr project. Reports 0071,
0072, 0073 show examples of master w/mutliple detail style reports.
Number 0072 has two detail reports.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com