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

Not able to generate preview


cg8

Recommended Posts

I am a non-technical designer editing a report, very new to JasperSoft iReports. I am running into the following problems when trying to view a PDF preview (locating subreports/image, error filling print, etc). I have tried with datasource and with empty datasource. Any help would be greatly appreciated!!

See below:

 

iReport Output: (With datasource)

 Compiling to file... C:\Users\cguzman\AppData\Local\Temp\jstmp\file_1340382527739.jasper  

Compiling subreports....  

Unable to locate the subreport with expression: "$P{isLocal} == true ? $P{SUBREPORT_DIR} + "business_commitment_mix_subreport.jasper" : "repo:/IT/Application_Reports/Sales_Cycle/pa_business_commitment_mix_subreport"".  

Unable to locate the subreport with expression: "$P{isLocal} == true ? $P{SUBREPORT_DIR} + "pricing_and_billing_subreport.jasper" : "repo:/IT/Application_Reports/Sales_Cycle/pa_pricing_and_billing_subreport"".  

Unable to locate the subreport with expression: "$P{isLocal} == true ? $P{COMMON_SUBREPORT_DIR} + "rebate_schedule_subreport.jasper" : "repo:/IT/Application_Reports/CommonSubReports/RebateScheduleSubReport"".  

Unable to locate the subreport with expression: "$P{isLocal} == true ? $P{SUBREPORT_DIR} + "programs_and_services_subreport.jasper" : "repo:/IT/Application_Reports/Sales_Cycle/pa_programs_and_services_subreport"".

Compilation running time: 1,069!


Filling report...

Locale: English (United States)  

Time zone: Default

Error filling print... Byte data not found at location : repo:HDSLogo_Transparent
net.sf.jasperreports.engine.JRException: Byte data not found at location : repo:HDSLogo_Transparent 
    at net.sf.jasperreports.engine.util.JRLoader.loadBytesFromLocation(JRLoader.java:470) 
    at net.sf.jasperreports.engine.JRImageRenderer.getInstance(JRImageRenderer.java:176) 
    at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:944) 
    at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:891) 
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:256) 
    at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:482) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:308) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:244) 
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:110) 
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:923) 
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:826) 
    at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:59) 
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417) 
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247) 
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:858) 
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) 
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) 
Print not filled. Try to use an EmptyDataSource...

 iReport Output: (With Empty datasource)

Compiling to file... C:\Users\cguzman\AppData\Local\Temp\jstmp\file_1340382527739.jasper
net.sf.jasperreports.engine.design.JRValidationException: Report design not valid : 
     1. Class not set for subreport connection expression.
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.verifyDesign(JRAbstractCompiler.java:258)
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:140)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:131)
    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:510)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

Compilation running time: 1,529

Code:
iReport Output: (With datasource)Compiling to file... C:\Users\cguzman\AppData\Local\Temp\jstmp\file_1340382527739.jasper  Compiling subreports....  Unable to locate the subreport with expression: "$P{isLocal} == true ? $P{SUBREPORT_DIR} + "business_commitment_mix_subreport.jasper" : "repo:/IT/Application_Reports/Sales_Cycle/pa_business_commitment_mix_subreport"".  Unable to locate the subreport with expression: "$P{isLocal} == true ? $P{SUBREPORT_DIR} + "pricing_and_billing_subreport.jasper" : "repo:/IT/Application_Reports/Sales_Cycle/pa_pricing_and_billing_subreport"".  Unable to locate the subreport with expression: "$P{isLocal} == true ? $P{COMMON_SUBREPORT_DIR} + "rebate_schedule_subreport.jasper" : "repo:/IT/Application_Reports/CommonSubReports/RebateScheduleSubReport"".  Unable to locate the subreport with expression: "$P{isLocal} == true ? $P{SUBREPORT_DIR} + "programs_and_services_subreport.jasper" : "repo:/IT/Application_Reports/Sales_Cycle/pa_programs_and_services_subreport"".Compilation running time: 1,069!Filling report...Locale: English (United States)  Time zone: DefaultError filling print... Byte data not found at location : repo:HDSLogo_Transparentnet.sf.jasperreports.engine.JRException: Byte data not found at location : repo:HDSLogo_Transparent     at net.sf.jasperreports.engine.util.JRLoader.loadBytesFromLocation(JRLoader.java:470)     at net.sf.jasperreports.engine.JRImageRenderer.getInstance(JRImageRenderer.java:176)     at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:944)     at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:891)     at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:256)     at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:482)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:308)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:244)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:110)     at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:923)     at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:826)     at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:59)     at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)     at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)     at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:858)     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)     at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Print not filled. Try to use an EmptyDataSource... iReport Output: (With Empty datasource)Compiling to file... C:\Users\cguzman\AppData\Local\Temp\jstmp\file_1340382527739.jasper net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :      1. Class not set for subreport connection expression.    at net.sf.jasperreports.engine.design.JRAbstractCompiler.verifyDesign(JRAbstractCompiler.java:258)    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:140)    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215)    at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:131)    at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:510)    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)Compilation running time: 1,529
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

 

I try to stick with relative pathing, you need to make sure the subreport you define is type " .jasper "  ... The compiled version of a report.

The subreport expression should look something like this,

$P{SUBREPORT_DIR} + "SubReportSample.jasper"

The default of the SUBREPORT_DIR parameter could be set as " ./ "  (no spaces)

Commonly (for me) the connection type of the subreport object would be set to "Use a connection expression" and the connection expression would be set to $P{REPORT_CONNECTION}

All of those errors seem to be path related, jasper unable to locate the objects you are referencing.

Easiest thing to just try and get it rolling is stick everything in the same path at first, change all the paths to relative definition " ./ " and then see how it goes. Try moving things into a more organized structure after you see it work, like put all the images into an images folder then refer to the path " ./IMAGES/ " + IMAGENAME

Hope this helps some, if you would like additional assistance feel free to upload your templates.

Clark

 

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