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

what/where is Parameter DATEBASE_TIMEZONE


kc5qoc

Recommended Posts

I have created a report in iReport 1.3.0 / 1.3.1 and have published the jrxml file in JasperServer 1.2.0 (latest I could find). When I try to run it I get Parameter "DATABASE_TIMEZONE" does not exist. - Whoever is putting out this message is correct - It does not exist -

 

The question is where sould it exist ?

 

There is no mention of it anywhere in the docs.

 

I am using a jdbc connection to Oracle 10.2.x (which works fine in iReports). The report has 2 subreports which specificaly do not use cache.

 

 

The report works great in iReports B) to bad it doesn't in JasperServer :angry:

Link to comment
Share on other sites

  • Replies 12
  • Created
  • Last Reply

Top Posters In This Topic

This parameter is defined by a query executer included in JS; the query executer uses the parameter value to adjust date values from a DB.

 

The problem here seems to be that one of the reports (the master or the subreports) is not compiled using the JS query executer. How do you reference the subreports (<subreportExpression>) in the master report?

 

Regards,

Lucian

Link to comment
Share on other sites

This is what iReport 1.3.0 (and 1.3.1) generated:

 

<parameter name="SUBREPORT_DIR" isForPrompting="false" class="java.lang.String">

<defaultValueExpression ><![CDATA["/home/jhmocho/Jasper_Reports/"]]></defaultValueExpression>

</parameter>

 

.

.

lots of XML

.

.

 

<subreport isUsingCache="false">

<reportElement

mode="Opaque"

x="5"

y="136"

width="757"

height="22"

forecolor="#CCFF99"

backcolor="#CCFF66"

key="subreport-1"

stretchType="RelativeToBandHeight"/>

<subreportParameter name="Diag_Task_ID">

<subreportParameterExpression>

<![CDATA[$F{TASK_ID}]]></subreportParameterExpression>

</subreportParameter>

<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>

<subreportExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "Hospital_census_subreport0.jasper"]]></subreportExpression>

</subreport>

Link to comment
Share on other sites

I see that the compiled subreports are located on the file system. This is not usually recommended, the canonical approach is to have all the resources required to run a report uploaded to JasperServer.

 

I don't know the easiest method to achieve this in iReport.

 

To refer a subreport which has been uploaded as a local resource of the report unit in JasperServer, the following subreport expression needs to be used

Code:

<subreportExpression><![CDATA["repo:...local resource name..."]]></subreportExpression>

 

To support the scenario of a JasperServer report unit using externally compiled reports, we would need to treat DATABASE_TIMEZONE as an optional parameter. If you think this would be useful, post a bug report [url=http://jasperforge.org/sf/tracker/do/listArtifacts/projects.jasperintelligence/tracker.bugs]here.

 

Regards,

Lucian

Link to comment
Share on other sites

Thanks for the help :)

 

I have finally figured out that iReport is a great way to prototype a report but that is where is stops.

 

To get a report to run under jasperserver you can forget about the plugin stuff. The report works fine if you do as you said - publish the report and subreports to the repository and fix the <subreportExpression> to match

 

Again Thank you for your help

Link to comment
Share on other sites

Hi All, I am getting a very weird error.my Report Query (Oracle 9i database as the datasource)is givng very different result when I run using iReport.Query :SELECT COUNT(*)AS FULL_ELIGSFROM ELIG_TMP_TABLE WHERE MONTHS = 12Running this query in Oracle sql developer gives FULL_ELIGS=3953and running the same query in iRport gives FULL_ELIGS=19765i.e 5xFULL_ELIGs correct value.the ireport run was giving 3 time the FULL_ELIGS correct value 1st, then 4 times and 5 now...looks like it is caching data some place and giving me a computed result.How and where can i check if the result is indeed being cached.[color=#FF0000]Note: I am setting isUsingCache=false, it's still not clearing the data.[/color]Any help greatly appriciated.Thanks,Malini

 

Post edited by: malini, at: 2007/03/19 20:22

Link to comment
Share on other sites

  • 5 weeks later...
Hi, i have a problem with jasper server:every report who contains a subreport does'nt work in jasperserver, i have this exeption:"Parameter "DATABASE_TIMEZONE" does not exist". the same report works good in iReport, can you help me?
Link to comment
Share on other sites

  • 1 year later...

hi ,

im new to jasper, m coming across 1 severe problem.....

i have an master report which contains 2 sub reports & it further contains 1 more sub reports. so i can access upto 1 level sub reports but next level child reports i cant.... plz give some feedback if any1 can know abt this ll be better help....

 

bye

Link to comment
Share on other sites

hi ,

 im new to jasper, m coming across 1 severe problem..... i have an master report which contains 2 sub reports & it further contains 1 more sub reports. so i can access upto 1 level sub reports in jasper server but next level child reports i cant. .. Everything wrks fine in ireports... plz give some feedback if any1 can know abt this ll be better help....

bye

Link to comment
Share on other sites

  • 9 months later...

lucianc
Wrote:
 

I see that the compiled subreports are located on the file system. This is not usually recommended, the canonical approach is to have all the resources required to run a report uploaded to JasperServer.

I don't know the easiest method to achieve this in iReport.

To refer a subreport which has been uploaded as a local resource of the report unit in JasperServer, the following subreport expression needs to be used
Code:


To support the scenario of a JasperServer report unit using externally compiled reports, we would need to treat DATABASE_TIMEZONE as an optional parameter. If you think this would be useful, post a bug report here.

Regards,
Lucian

Apologies in digging older post here.. I was experiencing the same problem too in my iReport 3.5.0. I was just wondering how should the ":...local resource name..." appears to be.

I have my subreport "M_PARA" in the same repository with the master report. I try to change to <subreportExpression class="java.lang.String"><![CDATA[repo:M_PARA]]></subreportExpression>, but still prompting error for

"Error evaluating expression :Source text : repo:M_PARA"

Can I know how should i write the <subreportExpression>?

Link to comment
Share on other sites

The error mentioned above has been resolved by adding double quote(") as in the examples below:

From:
<subreportExpression class="java.lang.String"><![CDATA[repo:M_PARA]]></subreportExpression>

and become:
<subreportExpression class="java.lang.String"><![CDATA["repo:M_PARA"]]></subreportExpression>

Just posting up here for sharing..

Link to comment
Share on other sites

  • 1 year later...

I normally hate it when folks reply to very old threads. Sorry... I'm doing it myself now.

I ran into a case where I got this same error with "net.sf.jasperreports.engine.JRRuntimeException: Parameter "DATABASE_TIMEZONE" does not exist."

In our case I have no idea what the underlying cause was. But... in this case I got around it (without learning the cause) by clearing out the older compiled .jasper files like this:

delete from JIRepositoryCache;

I'm posting it here just in case this helps other folks.

Regards,
Matt

 

Link to comment
Share on other sites

  • 8 months later...

 When i try to run a jasper report on jasper server 4.0 i am getting following error.Kindly please help me istuch here for 2 days 

 

thanks

sudhanshu

 

 

The server has encountered an error. Please excuse the inconvenience.

 
 
 
 
 
 
 
 

Error Message

net.sf.jasperreports.engine.JRRuntimeException: Parameter "DATABASE_TIMEZONE" does not exist.

Error Trace

net.sf.jasperreports.engine.JRRuntimeException: Parameter "DATABASE_TIMEZONE" does not exist. at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getValueParameter(JRAbstractQueryExecuter.java:606) at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getValueParameter(JRAbstractQueryExecuter.java:621) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.getValueParameter(JRTimezoneJdbcQueryExecuter.java:150) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.<init>(JRTimezoneJdbcQueryExecuter.java:134) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuterFactory.createQueryExecuter(JRTimezoneJdbcQueryExecuterFactory.java:50) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:728) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:629) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1159) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:802) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:746) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:640) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205) at java.lang.Thread.run(Thread.java:619)

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