Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
DateTime error when Birt was upgraded from 2.3.2 to 3.7.2
rveeraraghav
<p>Hi,</p><p> We upgraded our Birt viewer from 2.3.2 to 3.7.2. And now a report which used to work does not anymore. Here's the scenario.</p><p>I have a report 'A' which has a hyperlink to invoke report 'B'. There are parameters to be passed in, including a Datetime param. This hyperlink has always worked, but now after the upgrade, I get an error when the link is clicked. The error is</p><p> </p><p> </p> <div style="font-size:9pt;"><strong class='bbc'><span>org.eclipse.birt.report.service.api.ReportServiceException: The type of parameter "StartAlarmDateTime" is expected as "dateTime", not "java.lang.String". (Element ID:1710)</span></strong></div> <div style="font-size:8pt;color:#808080;font-weight:bold;">Show Exception Stack Trace</div> <p> </p><p> </p><p>Note. I have defined the parameter as Datetime everywhere, and yet I get this error. I am not sure what I should do. Anyone has ideas? where should I start looking?</p><p> </p><p>Thanks,</p><p> Ravi</p>
Find more posts tagged with
Comments
mwilliams
<p>Take a look at the actual parameter in the data explorer. I've seen issues exactly like this where the data type on the parameter changes causing this exact error. Let me know.</p>
rveeraraghav
<p> I have defined it as Date Time in the report param section of the report being invoked via hyperlink. And in the hyperlink Options ( of the calling report) , it does say the data type as Date Time. Also, the value is set from the result of a dataset. In fact while debugging, I even removed that and changed it to a hard coded value as new Date(), i still got the same error.</p><p>Oh,one more interesting thing. In design view, Preview works very well. It is only during runtime that I get the error mentioned above. Finally, both reports work fine when run individually.</p><p>I am quite lost here. Is there any other place you would lIke me to look at? Thanks.</p>
rveeraraghav
<p>Just out of desperation, I changed the parameters to be of string type everywhere and still it does not work, also I get a new and more cryptic error. There is nothing in jboss server log or sybase logs. </p><div style="color:rgb(255,0,0);font-family:serif;font-size:13px;">Table (id = 1592):</div><div style="color:rgb(255,0,0);font-family:serif;font-size:13px;"><span>+ </span>Can not load the report query: 1592. Errors occurred when generating the report document for the report element with ID 1,592. (Element ID:1592)</div>
mwilliams
<p>What is your database type? Is there any way I can run this report or you can reproduce the error in a way that I can run it?</p>
rveeraraghav
<p>We use JBoss and Sybase, however I could in some fashion duplicate using the sample database which comes with Birt. I created 2 reports. I used sampledb and used the tables Orders and payments. I setup a link from orders to payments and passed in shippeddate and requireddate as the 2 date columns. Added a 'between' where clause in Orders ( this may not make logical sense, but it at least achieved my goal ). Now, when I run it in eclipse designer preview, i get results but deployed to a jboss server, I got a date error, not the same error as in my application, but a date error. Would you like me to send the two sample reports i created? I thought being so simple it might not be necessary. Please let me know if you do need it though. Thanks.</p>