Print labels on partial sheet at 1st available label
Does anyone have examples on how to print labels (e.g. inventory labels) so that the first part number will print on a specified label number on a partially used sheet of labels?
Say I have a sheet of labels that are 4 across and 5 down (20 labels on a sheet). Now say I have already used and removed 5 labels, therefore I need to start printing this set of labels starting at label number 6 (row 2, label 2). If there are a lot of part numbers, then the next sheet would continue printing at the first label (row 1, label 1), etc..
Is there a way to force Crystal Report's "RecordNumber" to be 1 for this label? I am able to suppress the printing of labels 1 through 5, but am unable to have the first record to print on label number 6 (it only wants to print RecordNumber 6).
I am relatively new to Crystal Reports and, if there is no other way, have never done any coding on arrays. I would very much appreciate examples on what to code and where. If not, please direct me to the information I need.
Re: Print labels on partial sheet at 1st available label
Which version of Crystal are you using?
In order to print "real data" starting at a specific position you need to print "false data" before hand. How you do that depends how you load your report. If you set it's datasource in code to a recordset/dataset, you could simply add to it the necessary amount of blank records. Make sure your report prints those first.
If that doesn't work for you and need to do it in the Report designer, skipping entire rows is easy enough by utilizing the PageHeader (which is typically suppressed for Label reports). Basically you print blank lines in the PageHeader until the "print position" is where you want it to be. There are different ways to accomplish this but this works fine.
Assume the label needs 5 print lines.
Create a Report Parameter called StartRow.
Create the following Formula, called SkipRows
Code:
Local numberVar SkipRows := 0;
Local stringVar result := "";
for SkipRows := 2 to {?StartRow} step 1 do
result := result + chr(13) + chr(13) + chr(13) + chr(13) + chr(13);
result
Place the Formula in the PageHeader section and set its CanGrow option to True.
Put this code in the PageHeader's Section Visibility Formula
{?StartRow} < 2 or PageNumber <> 1
When the report is run you will be prompted to enter the Starting Row. If you enter 3. 10 blank lines are printed in the PageHeader (first page only). The Details section will start printing at that point. Obviously adjust the SkipRows formula to suit your needs.
Skipping columns though is another matter. Sorry, I have no solution for that yet.
Re: Print labels on partial sheet at 1st available label
I appreciate your help, but I do need to also utilize columns.