Jump to content
Changes to the Jaspersoft community edition download ×

Subreport and java design


Recommended Posts

By: Rodrigo - hlancelot

Subreport and java design

2003-08-19 06:18

Hi!

 

I need help with sub-reports and java programming design (I?m not programming a XML file).

 

How can I set the JRDesignSubreport object to accept a custom DataSource?

 

I did it in with de XML design, but I need it in Java.

 

I?m using JasperReports 0.5.0.

 

Thanks!

 

 

 

 

By: David Hardwick - dhardwick

RE: Subreport and java design

2003-08-19 08:47

How about trying to pass the object you want to iterate through in the subreport to by way of a subreport parameter?

 

 

 

 

 

 

 

By: Rodrigo - hlancelot

RE: Subreport and java design

2003-08-19 09:58

This way?

 

JRDesignBand band = new JRDesignBand();

 

JRDesignSubreport subreport = new JRDesignSubreport();

 

expression = new JRDesignExpression();

expression.setValueClass(CityDataSource.class);

subreport.setDataSourceExpression(expression);

band.addElement(subreport);

 

jasperDesign.setDetail(band);

 

 

 

 

By: Teodor Danciu - teodord

RE: Subreport and java design

2003-10-05 02:37

 

Hi,

 

You have not set the text content of your

data source expression using expression.setText().

Take a look at the "noxmldesign" sample.

It will give you some hints.

 

I hope this helps.

Teodor

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