I have a report that consists of two subreports. I need to print the subreports for the current row in the dataset only. I do not want to traverse all of the rows. How can I do this with PrintBehavior set to pbSection.
I'm a bit unclear about the effect you are after. If you do not want ReportBuilder to traverse your data, you could simply disconnect the datapipeline from your report and access the current record directly from the DetailBand.BeforePrint event perhaps.
Sorry but I do not understand what you mean by "disconnect the datapipeline from your report and access the current record directly from the DetailBand.BeforePrint event". If I disconnect the datapipeline how can the report get data from the current record?
The effect that I am trying to get is to start at the first record in a dataset, print the report for that record, move to the next record, print the report for that record and so on. This sounds silly but there really is a purpose. The report generated by each record is several pages long. The reports are being printed on a printer with a built-in stapler. The printer staples at the end of each print job. Therefore, I must print the data for each row as a separate print job so they will be stapled individually.
If I must I can filter the dataset on the primary key but I was hoping for a simpler solution. Any suggestion would be welcome.
You may simply be able to set the print count of the detail band in the section style subreport to 1. Take a look at the following example and see if that will work for you. If not, you may need to filter your dataset manually in order to print a single record per subreport.
Comments
I'm a bit unclear about the effect you are after. If you do not want
ReportBuilder to traverse your data, you could simply disconnect the
datapipeline from your report and access the current record directly from
the DetailBand.BeforePrint event perhaps.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Sorry but I do not understand what you mean by "disconnect the
datapipeline from your report and access the current record directly from
the DetailBand.BeforePrint event". If I disconnect the datapipeline how
can the report get data from the current record?
The effect that I am trying to get is to start at the first record in a
dataset, print the report for that record, move to the next record, print
the report for that record and so on. This sounds silly but there really
is a purpose. The report generated by each record is several pages long.
The reports are being printed on a printer with a built-in stapler. The
printer staples at the end of each print job. Therefore, I must print the
data for each row as a separate print job so they will be stapled
individually.
If I must I can filter the dataset on the primary key but I was hoping for
a simpler solution. Any suggestion would be welcome.
--
Bill Todd
You may simply be able to set the print count of the detail band in the
section style subreport to 1. Take a look at the following example and see
if that will work for you. If not, you may need to filter your dataset
manually in order to print a single record per subreport.
http://www.digital-metaphors.com/tips/OneLinePerSubreport.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com