Jump to content
Changes to the Jaspersoft community edition download ×

Custom datasource in subreport


2004 IR Help

Recommended Posts

By: Maxim - lazy-max

Custom datasource in subreport

2004-04-07 13:48

I have "main" report with custom datasource "A". How can I use this custom datasource "A" for some subreports? I need "REPORT_CONNECTION" functionality with custom datasource. Is it possible?

 

 

 

 

By: Stephen Lawlor - slawlor

RE: Custom datasource in subreport

2004-04-13 07:34

I have been able to use custom datasources in a main and sub report - although I'm not totally happy with the mechanism yet - mostly due to the security requirements of my own application.

 

What I've done is:

in the subReport tab of the subreport element properties: select "Use datasource expression". The expression is a static method which returns a JRDatasource which the subreport will use. It is like the expression used in your main custom datasource except that you can specify a parameter which will probably be the link between your main an sub reports. My expression is:

com.spokesoft.reporting.datasources.DataSourceFactory.getSubConversationDS($F{CONVERSATION_ID}.intValue())

where conversationId links the main and sub reports.

 

 

 

 

By: Siarar - siarar

RE: Custom datasource in subreport

2004-04-14 07:01

I have the same problem. Could you please give me an code example (java classes and ireport xmls)?

 

Thank?s in advance.

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