Jump to content
JasperReports Library 7.0 is now available ×

Subreports to be generated dynamically


feliciayong

Recommended Posts

Hi,

 

 

Can subreports be generated dynamically on the fly during runtime? If yes, can give suggestions on how this can be done?

 

 

Requirements:

- Each subreport will use a different xml datasource.

- The number of subreports to be generated depends on user's selection.

 

 

Thanks & Regards.

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Hello,

 

I think I got the same question.

Example: I want to connect to an oracle database.

I want a list/table with names

and when I click on a name I want to see a "dropdown"

with information like: adress/age/etc...

(I still want to see the original name list/table, so it should be like dynamic html)

Is this possible?

Link to comment
Share on other sites

Hi,

 

This "dynamic HTML - like" behavior is not possible "out of the box". You need to create different report templates and chain them up into an environment that would be able to run them when links are clicked.

The JasperServer platform offers functionality in this area, but remember that is not as easy as with dynamic HTML and it is more about creating report templates and make them work together as a whole by passing the right parameters from one to the next one through the URL of the hyperlink element.

A sample is provided with the JasperServer installation where two reports displaying employee information are linked in a similar way.

 

I hope this helps.

Teodor

Link to comment
Share on other sites

Thanks for the help.

I'll do it the way you described.

So I should create a hyperlink reference

And initialize the linkparameters of it. Is this correct? I'm now trying to do this.

Example: hyperlink reference: test.jsp linkparameter: par and linkparameter value: $F{test}

 

Now my question is, how can I get the value of the parameter par in my test.jsp :s I tried to find an answer on google, but I dont find it.

 

I tried to find the employee example you are talking about. I think the example would be very helpfull. But I cant find it.. can you/somebody pls give me the link? or say where exactly I can download it? I tried downloading jasperserver examples and jasperserver.bin.zip, but I dont find the examples there. Thanks in advance!

Post edited by: giroe, at: 2007/02/20 11:37

Link to comment
Share on other sites

The "employee sample" is a sample JasperServer report unit created during JasperServer installation by importing the sample data.

 

Refer to the JS documentation on how to install JS and import the sample data. After this, connect to the JS web GUI, navigate in the resource browser to /report/samples and you'll find the "Employee" report unit.

 

HTH,

Lucian

Link to comment
Share on other sites

Ok thanx!

I already tried to do it with attaching

the parameters I need to the link itself.

"example.jsp?city=" $F{city} and that works also.

I dont know if I'm going to use the jasperserver.

Why would it be better to run reports with jasperserver?

Link to comment
Share on other sites

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