Jump to content
We've recently updated our Privacy Statement, available here ×

Need help for report design (multiple tables)


yargierel

Recommended Posts

Hi,

 

I am totally new to iReports & JasperServer Environment and lost while trying to create a template with multiple tables.

I'm triying to design a report in iReport which has multiple tables that use different fields which are gathered from the same query. What I try to create is something like this :

http://img11.imageshack.us/img11/1729/asdashxb.jpg

 

But since there is only one "details band" I only can make the first table. The other tables are not presenting their rows.

Is there a way to do all 4 tables , one after another, in the same report ?

Thanks in advance..

 

 

Yargi

 

 

 

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi Remi

Thanks a lot for the quick reply !!

So what I understand is, there will be a master report and 4 subreports..

Master report won't have a "details band"  and it will only  have the subreports and the title band, etc.. Is that right ?

I have tried to create a subreport but have always got an exception like :

 

Filling report on server: http://localhost:8080/jasperserver/services/repository

1 - Could not load object from location : C:\Temp\jstmp\report2.jasper


java.lang.Exception: 1 - Could not load object from location : C:\Temp\jstmp\report2.jasper 
    at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:403) 
    at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320) 
    at com.jaspersoft.ireport.jasperserver.ReportRunner.run(ReportRunner.java:70) 
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) 
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) 

Does anybody know what that means/causes this ?

Link to comment
Share on other sites

yes that's correct, you can have 1 main report with 4 sub-report in the title band.

 

Question, Are you tryng to run your report from jasperserver or iReport ?

 

If runing from iReport then :

in your main report you sould have a string parameter called SUBREPORT_DIR, with ""C:\\Temp\\jstmp\\" as value

and in the property of the subreport expression: $P{SUBREPORT_DIR} + "report2.jasper"

then in case of moving .jasper in another directory, you only have to change the parameter.

 

If running from Jasperserver then subreport expression: "repo:report2"

but before you need to add report2.jrxml into your repository.

 

Hopes it can help

 

Link to comment
Share on other sites

I'm running from JasperServer.. The problem turned out to be that I - with most stupidity -  forgot to compile the subreports so there is no *.jasper file for the program to add as a subreport.. It all works like a charm now.. Thanks Remi. You have been the most helpful..

One last question though ;

You said that there should be "4 sub-report in the title band ". How can I prevent the tables from overlapping ?  I try hard to seperate them in the designer but , having rows as much as 100, the overlapping is inevitable.. should I use them in different bands ?

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