Help,how to create a jrxml not from iReport?

0
Hello,everyone,I want to create a jrxml from programming without using iReport.Now,What can I do?What classes in the jasperReport jar can I use?Thanks to any reply.Best regards.
jacky's picture
21
Joined: Oct 10 2006 - 6:32pm
Last seen: 12 years 8 months ago

4 Answers:

0
Create a JasperDesign, add it JRBands and elements.
After compile and export to pdf
slaisne's picture
65
Joined: Nov 16 2006 - 4:11am
Last seen: 5 years 8 months ago
0
slaisne wrote:
Create a JasperDesign, add it JRBands and elements.
After compile and export to pdf

slaisne,thank you a lot.I will try then.
jacky's picture
21
Joined: Oct 10 2006 - 6:32pm
Last seen: 12 years 8 months ago
0
slaisne wrote:
Create a JasperDesign, add it JRBands and elements.
After compile and export to pdf

Hello,slaisne.
When I do as you said and the code is:
JRDesignExpression expression1 = new JRDesignExpression();
JRDesignExpressionChunk expression_Chunk1 = new JRDesignExpressionChunk();
expression_Chunk1.setText("res_id");
group.setExpression(expression1);
There poped an error:
net.sf.jasperreports.engine.JRException: Report design not valid :
1. Class not set for group expression : res_id

Can I get some help from you?Thanks a lot.

ohoh,it is ok.it should be:
expression1.addFieldChunk("res_id");
expression1.setValueClass(java.math.BigDecimal.class);
then it works.
Post edited by: jacky, at: 2006/12/11 06:17
jacky's picture
21
Joined: Oct 10 2006 - 6:32pm
Last seen: 12 years 8 months ago
0

Post edited by: agassi, at: 2007/03/27 10:03
agassi's picture
1
Joined: Feb 14 2007 - 9:09am
Last seen: 12 years 4 months ago
Feedback