Jump to content
Changes to the Jaspersoft community edition download ×

How to generate a jrxml from a JasperDesign ?


2004 IR Help

Recommended Posts

By: Piel Yves - narmataru

How to generate a jrxml from a JasperDesign ?

2005-07-26 02:09

Hello,

I'm develloping a vry basic jasperReport editor which load a .jrxml, parse object and allow the chnage of some attribute (like font, color etc...).

But I can't find how to save those changes into the jrxml ?

 

So how can I write a jrxml file from a JasperDesign object ?

 

thanks :)

 

 

 

 

By: C-Box - c-box

RE: How to generate a jrxml from a JasperDesi

2005-07-26 02:19

I would first compile your design (as it should be valid of course):

 

 

JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);

 

then save this JasperReportObject to XML file:

 

JasperCompileManager.writeReportToXmlFile(jasperReport , destFileName);

 

voilá´hat's it!:-)

 

You could try using the JRSaver methods too... there is just an object wanted as parameter... but that I haven't tried, because my reports must be valid... so I do compile before saving... :-)

 

hth

C-Box

 

 

 

 

By: Piel Yves - narmataru

RE: How to generate a jrxml from a JasperDesi

2005-07-26 02:22

thank you again ;)

I'll try it...

Link to comment
Share on other sites

  • 10 months later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • 9 years later...

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...