Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Report: Print Label

ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

Report: Print Label

Unread post 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
BR
Rui
admin
Site Admin
Posts: 2824
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times

Re: Report: Print Label

Unread post by admin »

Rui,

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

Good luck, making labels is never easy.


Steven
You do not have the required permissions to view the files attached to this post.
ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

Re: Report: Print Label

Unread post 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
BR
Rui
admin
Site Admin
Posts: 2824
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times

Re: Report: Print Label

Unread post 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
ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

Re: Report: Print Label

Unread post 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
BR
Rui
ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

Re: Report: Print Label

Unread post 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!
BR
Rui
admin
Site Admin
Posts: 2824
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times

Re: Report: Print Label

Unread post by admin »

Rui,

Code: Select all

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

Steven
ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

Re: Report: Print Label

Unread post 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
BR
Rui
admin
Site Admin
Posts: 2824
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times

Re: Report: Print Label

Unread post by admin »

Rui,

Show us the php you use to make this file.

Steven
ruiascensao
Posts: 177
Joined: Tue Nov 15, 2011 2:24 pm

Re: Report: Print Label

Unread post by ruiascensao »

Hi Steven,

I'm just using a table:
label_table.png
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
You do not have the required permissions to view the files attached to this post.
BR
Rui
Post Reply