Printing subreport detail X number of times, X number of pages
Hello, all.
I have a report that prints patient visit information in the following
fashion:
PATIENT_ID VISIT_ID VISIT_DATE COMMENTS
---------------- ---------------------------- ---------------
PatientA Enrollment 2/3/01
Visit_1 2/10/01
Visit_2
Visit_3
PatientB Enrollment 2/1/01
Visit_1 2/11/01
Visit_2 3/15/01
Visit_3
PatientC Enrollment 2/1/01
Visit_1 2/11/01
Visit_2 3/15/01
Visit_3
This report has a master-detail relationship, where the fields PATIENT_ID
and COMMENTS come from the master data source and VISIT_ID and VISIT_DATE
come from a subreport (the detail data source). Each of the fields/sections
is contained in a shape so that when they print they give the grid,
Excel-like look.
I am being required to allow users to print X number of "blank" detail rows,
which will have the list of VISIT_IDs and blank shapes (the number of
VISIT_IDs is always fixed). These forms are then faxed to different
locations which are then filled out manually (patient_id, visit dates and
comments). What I did was place a subreport in the summary band, driven by a
JITPipeline, so that I can take advantage of the RecordCount property to
print it X number of times. In this subreport is another subreport--the one
used above to list the actual visits. The problem now is that users want to
make sure that if they specify 10 blank rows, and the last 2 rows happen to
print on the last page, 3/4 of the page will be blank: they want the last
page filled with blank detail rows, so the option they're looking for is
something like "Print 'at least' X number of blank detail rows." Is this
possible? Can this be accomplished?
Thank you so much for your continued help.
Rudy
I have a report that prints patient visit information in the following
fashion:
PATIENT_ID VISIT_ID VISIT_DATE COMMENTS
---------------- ---------------------------- ---------------
PatientA Enrollment 2/3/01
Visit_1 2/10/01
Visit_2
Visit_3
PatientB Enrollment 2/1/01
Visit_1 2/11/01
Visit_2 3/15/01
Visit_3
PatientC Enrollment 2/1/01
Visit_1 2/11/01
Visit_2 3/15/01
Visit_3
This report has a master-detail relationship, where the fields PATIENT_ID
and COMMENTS come from the master data source and VISIT_ID and VISIT_DATE
come from a subreport (the detail data source). Each of the fields/sections
is contained in a shape so that when they print they give the grid,
Excel-like look.
I am being required to allow users to print X number of "blank" detail rows,
which will have the list of VISIT_IDs and blank shapes (the number of
VISIT_IDs is always fixed). These forms are then faxed to different
locations which are then filled out manually (patient_id, visit dates and
comments). What I did was place a subreport in the summary band, driven by a
JITPipeline, so that I can take advantage of the RecordCount property to
print it X number of times. In this subreport is another subreport--the one
used above to list the actual visits. The problem now is that users want to
make sure that if they specify 10 blank rows, and the last 2 rows happen to
print on the last page, 3/4 of the page will be blank: they want the last
page filled with blank detail rows, so the option they're looking for is
something like "Print 'at least' X number of blank detail rows." Is this
possible? Can this be accomplished?
Thank you so much for your continued help.
Rudy
This discussion has been closed.
Comments
printing to determine if the 10 empty rows didn't fit on the previous page.
Then set a flag in this case (reset the flag variable it in the
Report.OnPageStart event). Based on this flag setting, you can fill the
page with the remaining shapes. It may be easier to create draw commands on
this page. Use the Report.OnEndPage event to fill the page with lines if
this flag is set. You'll have to also track the detail band print pos rect
in this case as well. Her eis a demo which uses these two events to create
draw commands on the page to fill it dynamically with lines for notes:
http://www.digital-metaphors.com/tips/FillPageWithLines.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com