Page 1 of 2

Report: Print Label

Posted: Mon Apr 30, 2012 12:32 pm
by ruiascensao
Hi,

I need to print a report in a label.
How can I change settings from A4 to a label size: 4,8x7,5cm?

Best Regards,
Rui

Re: Report: Print Label

Posted: Tue May 01, 2012 2:06 am
by admin
Rui,

You'll have to do something like this..
labels.png
labels.png (12.04 KiB) Viewed 12226 times
(a column for each label - each row in the table will have 4 customers)

Good luck, making labels is never easy.


Steven

Re: Report: Print Label

Posted: Tue May 01, 2012 9:19 am
by ruiascensao
Hi Steven,

I have a Zebra printer... so it prints one label at the time (one by one).
The idea it is to change the report size to the label size.

How can I do this?

Thank You!

Best Regards
Rui

Re: Report: Print Label

Posted: Wed May 02, 2012 2:42 am
by admin
Rui,

You'd be better off exporting data to something that's made for printing labels.
A browser's window is the wrong tool.

Steven

Re: Report: Print Label

Posted: Wed May 02, 2012 11:24 am
by ruiascensao
Hi Steven,

You are right.

But my idea is to create a pdf report that has the label and after I can print.

I just meed to have the report in the right size.
Is it difficult to change the A4 format to other format?

Best Regards,
Rui

Re: Report: Print Label

Posted: Wed May 02, 2012 3:40 pm
by ruiascensao
Hi Steven,

I checked my option but it will not work.
So the final idea is to export the label information in a text format (but with extension ....*rui).

How can I add new extension formats to nuBuilder?

Thank You!

Re: Report: Print Label

Posted: Fri May 04, 2012 12:26 am
by admin
Rui,

Code: Select all

Header ("Content-Disposition: attachment; filename=file.csv");
is hard coded into runexport.php (on line 20).

Steven

Re: Report: Print Label

Posted: Mon May 14, 2012 5:15 pm
by ruiascensao
Hi Steven,
The zebra printer needs this commands:
N
A400,60,0,3,0,2,N,"Model Name"
B20,350,0,1,5,5,150,B,"Bar Code"
A750,500,0,2,0,0,N,"Job Number"
P1
I Have this information on the database but when I export this information I get on the file.csv:
N,
A400,60,0,3,0,2,N,AS285 2PK
B20,350,0,1,5,5,150,B,4250366819303
A750,500,0,2,0,0,N,8080808
P1,
So the quotation marks are missing from Job Number, Bar Code and Model Name. And I have there is 2 comas (one at the binging and one at the end) that I have to remove.

Any idea how can I do this?

Thank you!

Best regards,
Rui

Re: Report: Print Label

Posted: Tue May 15, 2012 4:23 am
by admin
Rui,

Show us the php you use to make this file.

Steven

Re: Report: Print Label

Posted: Tue May 15, 2012 9:21 am
by ruiascensao
Hi Steven,

I'm just using a table:
label_table.png
label_table.png (19.79 KiB) Viewed 12195 times
And then export the data:

Code: Select all

$sql = "CREATE TABLE $dataTable SELECT label_settings, label_data";
    $sql = $sql." FROM giga_label";
    nuRunQuery($sql);
So every time I need a label I will create a dataTable and update the field label_data.
As you see I have the "Model Naame", "Bar code" and "Job Number with quotation marks but when exporting the data, this quotations are lost.

Thank You,

Best Regards,
Rui