Printing labels
Hi,
(D5.01, RB5.56 Ent, Win2k Pro (Sp2) )
I am having major problems printing labels...
I have done an application that will print labels based on a few settings:
Page Height
Page Width
Columns per Page
Rows per Page
Gap between columns
Gap Between rows
Left, Top, Right and Bottom margins
I just can´t print in two diferent printers the same page settings.
For example. My users enters the following settings in my application:
Paper = A4
Columns = 2
Rows = 9
Gap columns = 0
Gap Rows = 0
Left = 0,
Top = 0
Right = 0
Bottom = 0
This will never work! The last row is not printed
Now A4 is 210x297. If I set the paper to Custom and the size ro 210 x 300
and a bottom margin of 3 then I get the desired result.
Ok. Now I have the layout ready!
I try to print the same thing in HP 560C. None of the above will do.
I had to create a 3rd one that is totally nuts. I had to play with not only with
top and bottom but with Left and Right too in order to print both columns.
And the resultint layout was still loosing the last row.
Then I tried on a Epson Stylus 800... Had to do a new design.
HP1200C a new one...
I lost the whole week and no customer is satisfied...
They have latest driver installed.
I can´t hear: " But it works perfectly under MS WORD "
And in fact it does. Same settings, same printers.
The problem they have using this
solution is with the datasource. Unbelievable!!!
What am I missing?
How hard can it get to print a few labels?
Do I need to get more info on the printer and do some more calculations?
I am lost :-(.
Any advice or suggestion will help me big time
Best regards,
Clément
(D5.01, RB5.56 Ent, Win2k Pro (Sp2) )
I am having major problems printing labels...
I have done an application that will print labels based on a few settings:
Page Height
Page Width
Columns per Page
Rows per Page
Gap between columns
Gap Between rows
Left, Top, Right and Bottom margins
I just can´t print in two diferent printers the same page settings.
For example. My users enters the following settings in my application:
Paper = A4
Columns = 2
Rows = 9
Gap columns = 0
Gap Rows = 0
Left = 0,
Top = 0
Right = 0
Bottom = 0
This will never work! The last row is not printed
Now A4 is 210x297. If I set the paper to Custom and the size ro 210 x 300
and a bottom margin of 3 then I get the desired result.
Ok. Now I have the layout ready!
I try to print the same thing in HP 560C. None of the above will do.
I had to create a 3rd one that is totally nuts. I had to play with not only with
top and bottom but with Left and Right too in order to print both columns.
And the resultint layout was still loosing the last row.
Then I tried on a Epson Stylus 800... Had to do a new design.
HP1200C a new one...
I lost the whole week and no customer is satisfied...
They have latest driver installed.
I can´t hear: " But it works perfectly under MS WORD "
And in fact it does. Same settings, same printers.
The problem they have using this
solution is with the datasource. Unbelievable!!!
What am I missing?
How hard can it get to print a few labels?
Do I need to get more info on the printer and do some more calculations?
I am lost :-(.
Any advice or suggestion will help me big time
Best regards,
Clément
This discussion has been closed.
Comments
In you example how are the Rows = 9, Gap columns = 0, and Gap Rows = 0
being used?
Each printer has a different printable area, this may be affecting any
calculations that you are performing.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Here is how I am calculating the label height and width.
With A4, 9x2 the calculations are:
LabelHeight := 297 - ( 0 + 0 ) - ( 8 * 0 ) / 9 ( = 33 )
LabelWidth := 210 - (0 + 0 ) - (1*0) / 2 (=105)
(Please see the code at the end of the email)
I am setting Report Builders margins accordingly. So, in this case the margins are all set to 0
By the way, I thought Report Builder was taking the non-printable area in consideration when
defining the margins. If it does not, then how can I get this info from windows?
With Cannon BJC 200 and BJC 250, I set the parameters as follows:
PaperHeight = 300
paperWidh = 210
TopMargin = 0
BottomMargin = 3
LeftMargin = 2
RightMargin = 2
Rows = 9
Columns = 2
Row Gap = 0
Column Gap = 0
And the labels are printing correctly.
With HP560C I am unable to print correctly. I have tried tons of combinations.
When I trick the printer *too much* it start printing 900 pages... (I only sent 9 labels to the
printer)
If I send 8 labels they are printed fine.
I even tried to put a Legal size paper and define the margins to match an A4.
Best regards,
Clément
function TdhsPageLayoutPreview.CalcLabelHeight : Extended;
begin
Result := FPageHeight - (FMarginTop + FMarginBottom) - (Pred(FLabelsRow) * FRowGap);
Result := Result / FLabelsRow;
Result := ( trunc(result * 100) / 100);
end;
function TdhsPageLayoutPreview.CalcLabelWidth: Extended;
begin
Result := FPageWidth - (FMarginLeft + FMarginRight) - (pred(FLabelsColumn) * FColumnGap);
Result := Result / FLabelsColumn;
Result := ( trunc(result * 100) / 100);
end;