shivac Posted April 1, 2009 Share Posted April 1, 2009 Hi there, I created a master report which having a subreports, When I give a preview in iReport it is Working fine. I m getting the following error message when I was running from jasperserver "net.sf.jasperreports.engine.JRRuntimeException: Parameter "DATABASE_TIMEZONE" does not exist". I refered earlier forum posts, but nothing turned out to help. My subreport contain only graphs I m not passing any parameters, then i called that subreport in master report. please help me out. Thanks in advanceShivac Link to comment Share on other sites More sharing options...
anandharaj Posted April 2, 2009 Share Posted April 2, 2009 What version of JasperServer and iReport you using? Can you provide the xml file? Link to comment Share on other sites More sharing options...
shivac Posted April 2, 2009 Author Share Posted April 2, 2009 Hi Anandharaj Thanks for your quick replay, I m using JasperServer 3.1 and iReport 3.1.2. when I give a preview in iReport it is working fine and when I run from JasperServer then it Shows "net.sf.jasperreports.engine.JRRuntimeException: Parameter "DATABASE_TIMEZONE" does not exist". here I attached Master Report xml file. Thanks in advanceShivac Link to comment Share on other sites More sharing options...
anandharaj Posted April 2, 2009 Share Posted April 2, 2009 Based on attached master jrxml file, it will not work if you run from JS. You need to upload both xml file to JS, and in your master report, you need to call the sub-report using the "repo". Currently it point to a local directory which will only accessible if you run through ireport.. Link to comment Share on other sites More sharing options...
shivac Posted April 2, 2009 Author Share Posted April 2, 2009 Hi Anandharaj, I m not getting your point, can you please give me some clear details about where i have to upload my main & subreport xml?.can you explain me What is "repo" Where can I use this. I m created simple chart in subreport, then in main report i m just give a path for "use existing report : D:iReport_Examples catLine.jrxml " then "Connection Exp : using the Master Report" Then no parameters. Then i give a preview its working. what mistake i commited here?. Then I call main Report .jrmxl file to JasperServer. Is this correct or have to change anything?. Thanks in advacneShivacPost Edited by siva chidhambaram at 04/06/09 03:37 Link to comment Share on other sites More sharing options...
shivac Posted April 6, 2009 Author Share Posted April 6, 2009 Hi there can anybody help me how to do a subreport, I m using iReport 3.1.2 and JasperServer 3.1 .In my main Report I gave a Report Expression as "<subreportExpression class="java.lang.String"><![CDATA["repo:/Reports/SubReportDealer"]]></subreportExpression>" i tried like "/Reports/SubReportDealer" but no use it giving a error massage as "java.lang.ClassCastException: com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.client.ReportUnitImpl". "/Reports/SubReportDealer" Under a Report folder I created a JasperServer Report. What's the mistake i commited here?. can anybody help me out this?. Thanks in advanceShivac Link to comment Share on other sites More sharing options...
anandharaj Posted April 7, 2009 Share Posted April 7, 2009 Hi, Assume that you have uploaded both xml file in JS:/ - mainreport- subreport So, in you main reportm, you need to call the sub-report using "repo" notation: repo:/subreport Below is sample from my report. (im passing parameter also to subreport)Code:<subreport isUsingCache="true"><reportElement x="0" y="0" width="2400" height="100" key="subreport-1" stretchType="RelativeToTallestObject"/><subreportParameter name="SubParam"> <subreportParameterExpression><![CDATA[$P{MainParam}]]> </subreportParameterExpression></subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression class="java.lang.String"><![CDATA["repo:/subreport"]]></subreportExpression></subreport> Link to comment Share on other sites More sharing options...
shivac Posted April 7, 2009 Author Share Posted April 7, 2009 Hi Anandhraj,After following your instructions now I'm getting another error. I have attaced the code also.My Main report name is : report1Subreport name is : catLine (which is a line graph)both are loaded to JS.The error now iscom.jaspersoft.jasperserver.api.JSExceptionWrapper: Error loading object from URL : repo:/catLineCode:<subreport isUsingCache="true"> <reportElement x="11" y="16" width="166" height="100"/> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression class="java.lang.String"><![CDATA["repo:/catLine"]]></subreportExpression> </subreport> Link to comment Share on other sites More sharing options...
anandharaj Posted April 7, 2009 Share Posted April 7, 2009 Make sure the name is correct as in JS (case sensitive). Please try change your repo notation to -> "repo:catLine" and let me know the outcome. Since its located in main root folder, it might not needed the "/" Link to comment Share on other sites More sharing options...
shivac Posted April 7, 2009 Author Share Posted April 7, 2009 Hi Anadhraj...Hey its working now. Thanks a lot. But Its good for one subreport. If we have two subreports and when called from JS now its giving this following error. What error is this? whats the cause and how to fix it? Plz help. com.jaspersoft.jasperserver.api.JSExceptionWrapper: java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence. the files are same. Here instead of one subreport the report1.jrxml calls two subreports. Link to comment Share on other sites More sharing options...
anandharaj Posted April 8, 2009 Share Posted April 8, 2009 It should be work fine no matter how many sub-report. Try compile both report in iReport to see any errors (in case you did some manual changes in xml file) Link to comment Share on other sites More sharing options...
andrew_harper Posted June 25, 2009 Share Posted June 25, 2009 How did you upload your report to JasperServer ? If you upload from ireports it prompts to link your subreport for you rather than manually change the repoSeehttp://www.alienvault.com/blog/dk/ossim/tutorials/tut8_jasperserver.html Link to comment Share on other sites More sharing options...
andreasX Posted December 9, 2013 Share Posted December 9, 2013 more general solution to this: http://stackoverflow.com/a/20374515/1915920 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now