Subreports not printing
Hi Guys,
I have a report with 3 subreports in the main report's detail band.
The first subreport prints fine but the 2nd and 3rd don't print. The
report is structured as follows:
main
sub1
sub2
sub2sub
sub3
sub3sub
The main report has a detail band only and no data pipeline. The
detail band of the main report contains 3 subreports positioned one
above the other. The subreports all have their PrintBehavior set to
pbSection (I want each subreport to start on a new page.).
Each sub report has it's own data pipeline. The second and third
subreports also have nested subreports with their PrintBehavior set to
pbChild and their own data pipelines.
What should I be looking at that would cause the first subreport to
print but the other 2 to fail. All data pipelines have data.
Thanks,
Steve
I have a report with 3 subreports in the main report's detail band.
The first subreport prints fine but the 2nd and 3rd don't print. The
report is structured as follows:
main
sub1
sub2
sub2sub
sub3
sub3sub
The main report has a detail band only and no data pipeline. The
detail band of the main report contains 3 subreports positioned one
above the other. The subreports all have their PrintBehavior set to
pbSection (I want each subreport to start on a new page.).
Each sub report has it's own data pipeline. The second and third
subreports also have nested subreports with their PrintBehavior set to
pbChild and their own data pipelines.
What should I be looking at that would cause the first subreport to
print but the other 2 to fail. All data pipelines have data.
Thanks,
Steve
This discussion has been closed.
Comments
Approach this incrementally by setting all the Subreport.Visible properties
to False.
Set section 1 to Visible and preview - that should since it is working now.
Set section 1 back to Visible False and then set section 2 to Visible. This
section is a master/detail report. It may be that the the datapipeline does
not have any data OR that there are no detail records that match the master
records. For all of your detail datapipelines, try setting SkipWhenNoRecords
to False.
Also for your master/detail datapipeline relationships make sure that you
are using either Delphi TDataSet linking or RB's DataPipeline linking - but
no both. See article below.
------------------------------------------------------
Tech Tip: Linking SQL Queries for Master/Detail Data
------------------------------------------------------
The following example shows two options for linking SQL queries to create a
master/detail relationship.
In this example, we are using Delphi's DBDemos data to create a
Customer/Order relationship. Thus we wish to link the Orders detail to the
Customer master.
I. Delphi Query Linking
------------------------
a. Set the detail TQuery.DataSource property to point to the master
query's TDataSource component.
b. In the SQL "Where" clause for the detail query use a ':' followed by
the linking field name from the master:
example
select *
from orders
where orders.CustNo = :CustNo
Now each time the master record position changes, the detail query will
automatically be refreshed with the correct result set.
II. RB DataPipeline Linking
-----------------------------
a. Set the detail DataPipeline.MasterDataPipeline to point to the master
DataPipeline.
b. Use the detail DataPipeline.MasterFieldLinks property to define the
linking relationship
c. In the SQL for the detail, retrieve all records and sort them by the
linking master field:
select *
from Orders
order by CustNo
Notes:
1. Using RB DataPipeline, each query is executed only a single time - thus
performance is much faster.
2. RB Professional and Enterprise Editions include a visual Data environment
for creating SQL queries, defining linking relationships, and creating
Ask-At-Runtime parameters. Using the RB tools you could create the above
linked queries in about 10 seconds.
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors http://www.digital-metaphors.com
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com