Jump to content
JasperReports Library 7.0 is now available ×

mailing labels


Recommended Posts

By: Me_ - black_lotus

mailing labels

2005-05-17 13:26

Anyone ever create mailing labels with jasper reports? Can it be done easily and is it flexible?

 

Thx

 

 

By: Doug Berkland - berkland

RE: mailing labels

2005-05-17 14:07

I have created labels using JasperReports. My approach was to create one jrxml for each label layout. The page margins for a label layout become the page margins. The number of labels across becomes the number of columns. The label width becomes the column width. The label height becomes the detail band width. Then you can layout your fields with a GUI designer like iReports and use as many different font variations as you need. The one things to watch out for is that your pixel counts across and down the page add up exactly. e.g. left_margin + (column_count * column_width) + right_margin = page_width AND (page_height - top_margin - bottom_margin) Mod column_height = 0

 

 

By: Me_ - black_lotus

RE: mailing labels

2005-05-20 08:34

Thx for the replies. Is it possible to create multiple columns on one template/page, each with a different width? Or are all columns given the same width? This is a problem I came across trying to create labels with another reporting tool. On the actual label page (to be printed on), the columns were slightly different sizes, so it was hard to find one column size that would print the labels inside their columns.

 

Thnx

 

 

By: Daren O - rckrll106

RE: mailing labels

2005-05-20 09:03

Regarding my sugggestion of creating a JasperDesign object, I (when I create my labels) assume the labels are all one size. I've never heard labels having different widths. Word and open Office both refer to label height, vertical pitch, etc... Therefore, labels are uniform to a sheet.

 

I would suggest looking at word or open office and trying to find the labels you have (if you can reference them, like Avery 5160). Then look at how they are measured.

 

However, if you have a rare situation where labels are different widths then you could either create a seperate template for each (as suggested by berkland).

 

 

 

By: Doug Berkland - berkland

RE: mailing labels

2005-05-20 09:43

Perhaps I wasn't clear. I have only seen labels on a sheet that are the same size. But if you wanted to support both Avery 5160 and 5163 for example, those two layouts have labels of different sizes, so would need separate jrxnl files for each. Since you would probably want to use a larger font on the larger label, you would end up having a new jrxml using the strategy Daren suggests as well. The up side to my way is you can mix font sizes and attributes within a single layout. The downside is that if you want to have different layouts on the same label size, you have to create a new jrxml. The upside to Daren's way is that you can support different data layouts with only one jrxml per label size. The downside is you have to use the same font size on the entire label.

 

 

By: Doug Berkland - berkland

RE: mailing labels

2005-05-20 09:51

Different column sizes? I don't know exactly what you are dealing with, but first I would see if the column spacing could handle your problem. If not, you may need to create a custom datasource that combines multiple labels into a single row of data. (For example, set it up so when you ask for "name_0", you the "name" that should go in the first column. When you ask for "name_1" it would give the "name" that should go in the second column.") Then you would set up your report template to treat the entire width of the page as a single record, with duplicated text fields. This would allow you to set absolute positioning all the way across the page.

 

 

By: Daren O - rckrll106

RE: mailing labels

2005-05-17 13:58

I have created mail labels by creating the JasperDesign object dynamically based on height, width, left and top margins, vertical pitch, etc... (just like word and open office).

 

I made only one band the detail band. Created text boxes for everyline on the page. I did that because I wanted to make sure things were exactly at the x,y coordinate I wanted. I believe you run into alignment problems if you do it any other way.

 

Basically, I created a dynamic template based on parameters passed then compiled it. Therefore, we can create mail labels for any label (that we have parameters for). This also allows flexibility for user defined labels as well.

 

Can it be easily done? Well if your use to working with the jasper design objects it isn't to bad but there is a learning curve to everything.

 

You also have to look at what you want to put on the labels. Our was a little more involved because we needed to put an endorsement line, postnet barcode, and leave room for a preprinted indicia.

 

We decided to use only one font size (as things we complex enough) however you might want to be flexible in that regard.

 

To sum up, you can do just about anything you want with jasper. So flexible, I would so very so! Easily done? It didn't take that long to create a basic routine to create the JasperDesign object. Depends on how much detail you want on you label.

 

 

By: blossom - blossom

Chart labels on x-axis in IREPORT Designer

2005-10-25 10:43

Hello ,

 

Can someone tell me how can i give space between labels on x-axis. it is just showing one letter of each label if there are 10 values on x-axis .

I use IREPORT Designer. Is there an option to set the gaps between lables ?

 

Help Appreciated.

Thanks

Blossom.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...