Jump to content
Changes to the Jaspersoft community edition download ×

report format


sathish_shan

Recommended Posts

Dear group,

i have a report like the following

 

logo Hospital Name

address of the company

--------------------------------------------------------------

patient id: Age

reference : Dr. Date

--------------------------------------------------------------

Title of the report

Sub title of the report

 

Findings

Terminal illeum Normal

IIeocecal value Normal

Caecum Normal

Ascending Colon Normal

This may grow

 

 

Image 1 Image 2 Image 3 Image 4

 

 

Impression : impression details

Dr. Name

--------------------------------------------------------------

 

Image path, findings, impression dr.name title , patient id, reference dr, age are all stored in database.

 

what is the best way to create reports like this using ireport.

if i want to create the logo and company name part of the report as a single report and use it other reports, how to use it.

we tried subreport, but it does ask for any one datasource to even create the logo and company name which are static.

we cannot use JDBC data source for one subreport and Bean data source for other report.

 

guide me plz,

 

Sathish Kumar.S

SpireTEK

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

You should add a subreport, set to don't use datasources.

 

In the subreport you should use only the title band and set the report property "When no data" to "All bands no detail".

 

All infos about the company and the logo can be hardcoded in the subreport.

 

In other words this is a way to include a static portion of a report.

 

 

Giulio

Link to comment
Share on other sites

I create a report, put a static text in the title band. change the report property

when no data - all sections no data

compile the report and save it as "tt.jrxml"

 

I create another report - "Main.jrxml" draw the subreport in the title band. use a jdbc connection for this report. set the subreport property

connection/datasource expresssion - don't use connection or data source.

 

save the report, compile and run it. But,

 

This is the error i receive while running the report

 

Error filling print...

net.sf.jasperreports.engine.JRException: Could not load object from location : tt.jasper at net.sf.jasperreports.engine.util.JRLoader.loadObjectFromLocation(JRLoader.java:258) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:324) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:277) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:399) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:279) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:220) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128) 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 net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:517) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:694) at java.lang.Thread.run(Thread.java:595)

Print not filled. Try to use an EmptyDataSource...!

Link to comment
Share on other sites

I create a report, put a static text in the title band. change the report property

when no data - all sections no data

compile the report and save it as "tt.jrxml"

 

I create another report - "Main.jrxml" draw the subreport in the title band. use a jdbc connection for this report. set the subreport property

connection/datasource expresssion - don't use connection or data source.

 

save the report, compile and run it. But,

 

This is the error i receive while running the report

 

Error filling print...

net.sf.jasperreports.engine.JRException: Could not load object from location : tt.jasper at net.sf.jasperreports.engine.util.JRLoader.loadObjectFromLocation(JRLoader.java:258) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:324) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:277) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:399) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:279) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:220) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128) 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 net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:517) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:694) at java.lang.Thread.run(Thread.java:595)

Print not filled. Try to use an EmptyDataSource...!

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