How to skip N labels?
I have a report that prints labels from a JITPipeline. The user will
rarely print a full sheet of labels so I want to start the next report
on the next label on the page. One way to do this is to pad the data
supplied by the pipeline with the requisite number of blank records.
Is there an easier way to make the report or the pipline skip N labels
and start at the next one on the sheet?
--
_Bill_
rarely print a full sheet of labels so I want to start the next report
on the next label on the page. One way to do this is to pad the data
supplied by the pipeline with the requisite number of blank records.
Is there an easier way to make the report or the pipline skip N labels
and start at the next one on the sheet?
--
_Bill_
This discussion has been closed.
Comments
Would you like to simply break the page after the final label, or would you
like to print N number of blank labels until the page breaks? I would
recommend causing a page break after the last label prints. You can do this
by either using the DetailBand.OutOfSpace property or using one of the
methods in the article below.
---------------------------------------------
Article: Forcing a Page Break
---------------------------------------------
Question:
How can I force a page break occur based upon
a condition calculated at run-time.
Solution:
Define a Group that starts on a new page when
it breaks. Then use the Group.OnGetBreakValue
event to control the timing of the break.
1. From the Report Designer, select Report | Groups
to access the Group dialog.
2. Define a group based upon a static component,
such as a Label or Variable. Click the
Start new page checkbox. Close the dialog.
3. Using the object inspector's drop down list,
find and select the TppGroup object.
4. Create an event-handler for the Group's
OnGetBreakValue event.
5. Add code to set the break value.
procedure Form1.Group1OnGetBreakValue(Sender: TObject; var aBreakValue:
String);
begin
if condition then
aBreakValue := 'Some Value';
end;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
when the data for the last record is printed?
--
_Bill_
Sorry, I completely misunderstood your first post (Monday morning I guess
). Check out the following example. It shows how to skip the first X
labels before printing so you can start exactly where you left off the last
time you printed labels.
http://www.digital-metaphors.com/tips/SkipLabels.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com