Jump to content
Changes to the Jaspersoft community edition download ×

Report with subreports


obs_123

Recommended Posts

I would like to use master reports with subreport, but want to use different recordsets for them. (but from one connection).

Which is the best way to do it and if some samples/sources available for that?

 

or also is acceptable to prepare the subreports in java and then to send them as a parameters to the main report.

But in this case how should bound this parameters to the subreports which I can have in the main report?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

JRResultSetDataSource jr=null;

jr = new JRResultSetDataSource(resultSet); //here is the error

 

BUT resultset not empty!!!

 

SQL Exception: ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.

at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)

at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)

at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)

at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)

at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(Unknown Source)

at org.apache.derby.impl.jdbc.EmbedResultSet.checkIfClosed(Unknown Source)

at org.apache.derby.impl.jdbc.EmbedResultSet.checkExecIfClosed(Unknown Source)

at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source)

at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)

at net.sf.jasperreports.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:92)

at net.sf.jasperreports.engine.fill.JRFillDataset.advanceDataSource(JRFillDataset.java:834)

at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:752)

at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1019)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:126)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:758)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:685)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)

at com.feratel.pos.ui.swt.UserStatusSetup$2.widgetSelected(UserStatusSetup.java:270)

at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)

at org.eclipse.jface.window.Window.runEventLoop(Window.java:809)

at org.eclipse.jface.window.Window.open(Window.java:787)

at com.feratel.pos.ui.actions.ConfigureUsersAction.run(ConfigureUsersAction.java:38)

at com.feratel.pos.ui.actions.ConfigureUsersActionDelegate.run(ConfigureUsersActionDelegate.java:31)

at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246)

at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:223)

at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)

at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)

at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)

at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)

at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)

at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)

at com.feratel.pos.ui.POSApplication.run(POSApplication.java:62)

at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)

at org.eclipse.core.launcher.Main.basicRun(Main.java:280)

at org.eclipse.core.launcher.Main.run(Main.java:977)

at org.eclipse.core.launcher.Main.main(Main.java:952)

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