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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing 10 % over on records 1

Status
Not open for further replies.
Jul 1, 2008
37
US
We are making core labels and as we run a job some rolls are bad and we will need extra core labels made from the start to count for scrap. We need to print 10 % over each time. Is there a formula for this?

Also, for each of the products that have one label we need a box label. However we can fit field_1 into one box so we need the total printing records/field_1. Plus we need the 10% over and we need to have the very last record to still print because it may be a partial box.

I don't really even know where to start for either of these. I tried:

TotalPageCount = (TotalPageCount
* 1.1)

But that didn't work, it returned a value of 47 and still printed only 43 records.

Thank you,
Angie
 
Do the core labels all have the same content? In other words, is the core label just repeated 43 times? If so, how did you achieve this for the first 43? Does the box label have different content? Please show what a label looks like. Also identify the fields you are working with.

-LB
 
The core labels do all have the same data, however there is a line for each label with a reference number for each line (like a serial number/primary key). The reference number is not in the core label.

Both the core and box label are printing the exact number of lines.

The box label will have to have the lines of data divided by the number of rolls per box times 1.1.

As for uploading the label i'm not sure if I can because the box.net page is blocked at my work which is where all these files are.

Thank you,
Angie
 
I just meant for you to show within the thread what they look like. Are you saying that you the reference ID is forcing the printing of 43 labels? Is there more than one table? How are they joined?

-LB
 
Below is the core label format.


Part No: {ItemCode}
Size: {DimA}" W X {DimB}" L
Qty: {RollProducts} Labels
Batch: {@JobCode} DOM: {@firstdate}
Cust. No: {CustItemRef}
{CompositionCode}

There are multiple tables all linked off of the Item code.

However on the one table where Item code is repeated 43 times (lines) since there are 43 rolls. See Below:

ItemCode LineRef
800512-105 301289-000037
800512-105 301289-000038
800512-105 301289-000039
800512-105 301289-000040
800512-105 301289-000041
800512-105 301289-000042
800512-105 301289-000043
800512-105 301289-000044
 
One way of handling this is to add another table that has two records per line ref so that twice as many labels as is necessary are initially brought into the report.

Or, you could use a command as your datasource that does the same thing--creates twice as many records--by using a union all, as in:

Select Customer.`Customer Name`,
Customer.`Address1`,
Customer.`Address2`,
Customer.`City`,
Customer.`Postal Code`
From Customer
Union All
Select Customer.`Customer Name`,
Customer.`Address1`,
Customer.`Address2`,
Customer.`City`,
Customer.`Postal Code`
From Customer

Then in the section expert, select each detail section (a,b,c, etc.)->suppress->x+2 and enter:

recordnumber >= int(count({Command.Customer Name})/2*1.1)

Substitute any recurring field for {command.customername} in the suppression formula. Make sure that each section is also formatted to "suppress blank section".

-LB
 
Is there a way to set a parameter that will allow you to choose the number of copies you want to print?
 
If it is something less that twice the actual number of labels, you can use the above, and then just use:

recordnumber > {?labelno}

...for the suppression formula.

-LB
 
I'm having a little difficulty with this.

Where can you set the command for the datasource?

Do I have to place all of these into the label and surpress half of them?

 
You basically are starting from the beginning. You can go into your current report and copy the SQL from database->show SQL query (assuming all seletion criteria are passing to the SQL) and then paste this into the command area of a new blank label report. "Add command" will be above your table list. Once you copied in the query, add "union all" and then paste the query in again. This will double your records, and then you will start out with twice as many labels, and then you will be suppressing the unwanted ones with the formulas.

-LB
 
When you open a new label report and you choose a datasource, the "add command" feature should be just above the table list--unless you are using a version earlier than 9.0--in which case you can't use a command. You should always identify your version in each new post.

-LB
 
I am using version 10.

Is that for only a Label report?

We are creating a label by chosing a desktop printer that has user defined size. These aren't the standard mailing labels you would get from Avery.

We are making labels that go inside our rolls of labels we sell for our printers. Will a label report work with our user defined printer?
 
Also, one more thing, once I open a new blank report it doesn't have anything listed for an add command.

It lists:

Availiable data sources SelectedTables
Creat connection
Favorites
History
CreateNewConnection
Repository

The same that you see for database expert then jumps to table links then the report. There isn't an add command spot.

 
You have to open the datasource first, so if you would ordinarily go to favorites or history->datasource, then once you open that you should see:

-History
-Xtreme Database (your datasource here)
Add Command
- Tables
- Orders
- Order_Detail

You can do the above with a blank report, too--however you did it the first time around--it doesn't have to be a label report.

Some datasources might not have the add command feature--I'm not sure why. What is your datasource?

-LB
 
Wonderful!! I got it.

I was trained in Version 11 (not that long ago) but I'm curious is it just a difference in the two versions that in ten you have to select each parameter prompt prior to changing it when in 11 it displayed both for changing.

Thank you so much!

AC
 
The prompts should appear simultaneouly. The only time this doesn't happen that I can think of is if you are using a command that contains a parameter to populate a picklist. Do you have a second command to do this? Do you have a parameter within the command query? Or one in the query and one in the main report? Can you explain this a little more?

-LB
 
They do both appear, but it's in a list form so you have to pick the first one, type in the value, then pick the second one and type in the value. In version 11 you can see both parameter prompts (which I can now), but there is also the text box where you can type in the value for each parameter. In 10 I have to choose the parameter to see the text box.

As for the parameters, they are both in the new report and not passed from the old one.

I have run into another problem with this. After getting the label report done, the programmer had made a mistake about what the 43 lines meant... They are actually the case qty's. For every job the case qty's can change from one to 30 per case. Meaning the double qty new command report will not work.

Is there a way to write a parameter on the number of copies you would like printed of the first record?

AC
 
I see what you mean now. Yes, CR 10 has a different kind of parameter selection screen.

There is an faq on the topic of number of copies: faq767-3227.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top