Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Labels

Status
Not open for further replies.

tbpowers

MIS
Sep 10, 2008
16
0
0
US
I created a label and setup a parameter where I just type in a number I want on the label. This works great, but there will be times when I want to print a range of numbers, one for each label. For example, my start range is 123 and my end range is 124. When I changed the parameter to a range it quit working. I expected my first label to show 123, then the next page (label) to show 124. What am I doing wrong?
 
Create two formulas:

//{@initialize} to be placed in the report header:
whileprintingrecords;
numbervar cnt := {?startingnumber};

//{@accum} to be placed in the detail section:
whileprintingrecords;
numbervar cnt := cnt + 1;

-LB
 
The user will need to enter the range of numbers when they fire off the report. The numbers will change depending on what part number they need a tag for. So one part may start with 512 and end with 515, the next start at 801 and end with 1001, etc..... Our users do not have access to the report design to change the starting number each time. Any other ideas? I appreciate the help.
 
We set the starting number at 123. The label showed 124.

We need to see each number, pluged in to the range by the enduser, on each label. We want the user to pick the range at report open, say 500-510. When the report runs we want it to return 10 labels numbered 500, 501, 502, etc..
 
Change the initialize formula to:

//{@initialize} to be placed in the report header:
whileprintingrecords;
numbervar cnt := {?startingnumber}-1;

I wasn't suggesting that the report should be changed each time. I meant for you to set up a parameter {?startingnumber}, so that the user can enter the starting number. So what is the remaining issue?

-LB
 
Where does the range come into play? I updated the initialize code, but it only shows one record, which is my starting number.
 
How are you selecting the labels to be printed, i.e., what is your current selection formula? You can't select based on a number of records unless it corresponds to some number field in your database or unless you use a command as your datasource that does a topN select. You could, however, suppress records beyond a certain range.

What was your selection formula when you were NOT allowing range values?

-LB
 
That sounds like my problem. As it stands I have no selection criteria. This is the first time I have created labels, so I'm learning as I go.
 
What was your criterion when you were selecting only one label?

-LB
 
I am selecting records based on a part id. Here are the parameter prompts when I run the report.

Part Id - drop down menu tied to the part table
Serial Number(s) - manually entered (i.e.123-125)
Cust Part Id - manually entered
 
If you HAVE a serial number, then you just have to place that database field (NOT the parameter) in the detail section of your label, and then add a record selection formula like this:

{table.serialnumber} = {?yourrangeparameter}

You don't need any special formulas.

-LB
 
We don't have a serial number in the database. This number is manually created and hand written on a log. The label we're making has to have the number in order to be valid.
 
I have copied my label to additional detail areas and used the code above to number. Not the greateast option, but it is working. How can I setup an ending number?
 
I don't know what determines the number of records in your report, but you will only be able to use the end of the range to suppress records beyond the range that you select, if the serial number is not in the database. Go into the detail sections->details->suppress->x+2 and enter:

whileprintingrecords;
numbervar cnt;
cnt > maximum({?yourrangeparameter})

-LB
 
That is my main issue with this; I don't have anything that determines the number of records in my report. As it stands it will only print one record. I was hoping that when I setup the serial number as a range parameter that it would print that range with the appropriate numbers. I'm at a loss on how to get this done.
 
You only have one record in your database? If you are trying to repeat the same record multiple times, there is a faq on how to do this: faq767-3227.

-LB

 
I have more than one record in my database, but I may only need 5 labels for 5 motors that need to be shipped. All 5 motors will be assigned a serial number, so I need to print 5 labels. I open up my report, choose the part number, and enter the serial numbers I need to show on the label. Here is the link to some screen shots of what I have. Maybe a visual will help.

ftp://LB:crystal@ftp.enviro-ok.com
 
Your link doesn't work. Anyway, if you need repeated labels per some quantity field, please try following the directions in the faq. Or did you try it? If so, what were the results?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top