Jump to content
JasperReports Library 7.0 is now available ×

Passing parameters to subreport with java


2004 IR Help

Recommended Posts

By: mminaga - mminaga1

Passing parameters to subreport with java

2005-09-29 16:32

I am creating my design dynamically using java code. I have not successfully been able to pass parameters from the main report to the subreport.

 

Has anybody tried this?

 

 

 

 

 

By: neqo - ntapan

RE: Passing parameters to subreport with java

2005-12-07 06:10

hi, I have the same problem, if you have solved the problem can you exlain how and if it si possible can you send me the piece of code that can help me to typing.

thanks...

 

 

 

 

By: mminaga - mminaga1

RE: Passing parameters to subreport with java

2005-09-29 16:36

Here is my code from the main report:

 

MyJRSubreportParameter parameter = new MyJRSubreportParameter();

parameter.setName(ESMReports.BOX1_REPORT_IMAGE);

parameter.setValueClass(java.awt.Image.class);

s1.addParameter(parameter);

 

JRDesignExpression e3 = new JRDesignExpression();

e3.setText("$P{"+ESMReports.BOX1_REPORT_IMAGE+"}");

e3.setValueClass(java.awt.Image.class);

s1.setExpression(e3);

 

 

 

 

 

By: Lucian Chirita - lucianc

RE: Passing parameters to subreport with java

2005-12-08 00:45

Hi

 

The las line should be

parameter.setExpression(e3);

 

HTH,

Lucian

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