Home
Analytics
clarify my doubt...
Preethisha
I have installed maximo 7.1.7.1 in that global value of the date format was ?mm/dd/yyyy? but it has been changed into ?dd/mm/yyyy?....so while i am running Birt 2.3.2 report with date parameters it throws the exception given that 23/12/2010 param{0} is invalid datatype datetime.....i am facing this exception if i give date is greater than 12 so what is the error ...?provided i have used the method getTimeStamp function (params[?*date?]),so what wrong with my code .where i have to correct that...?
If this error is coming because of changing date format in maximo...? or may i want to change the script report design....
Plz..........reply...,
Thanks.........,
Preethi sham
Find more posts tagged with
Comments
mwilliams
Hi Preethi,
It could be Maximo, but I haven't heard of anything like this before. Could it possibly be some sort of localization issue? Can you post the error stack? Also, you might try downloading BIRT 2.3.2 separately and running your report to see if it's a Maximo issue.
Preethisha
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="71966" data-time="1294337337" data-date="06 January 2011 - 11:08 AM"><p>
Hi Preethi,<br />
<br />
It could be Maximo, but I haven't heard of anything like this before. Could it possibly be some sort of localization issue? Can you post the error stack? Also, you might try downloading BIRT 2.3.2 separately and running your report to see if it's a Maximo issue.<br /></p></blockquote>
<br />
<br />
<br />
Williams,<br />
<br />
First of all Thanks fro Your response!<br />
<br />
The Problem is, I installed Maximo 7.1.0. Then It has been updated with the Batch Service and now Its in 7.1.1.7 version. BIRT version is 2.3.2. The format of the Date Time Parameter is given as dd/mm/yyyy. But the format in Oracle 10g database is mm/dd/yyyy. I have used the getTimestampFunction() for getting both the parameters. I have to get all those records between those dates.<br />
Before some days, We have changed the date format in Maximo from mm/dd/yyyy fromat to dd/mm/yyyy. Iwhen I choose the date of january 07 2011 from the Datalookup, Its showing the date as Jul 01 2011 in the report. And If I give December 23 2010, Its throwing the exception as "23/12/2010 Parameter{0} is invalid type Date Time". I think Its taking 23 as month and 12 as date.<br />
Provided I referred in the standard BIRT reports given by IBM. In no one reports there is no date fromat conversion has been used. I have attached the Exception and its stack trace. At which point, the exception is raised? and Whats wrong with My work? or Is It due to the modification odf the date format in Maximo? <br />
<br />
Note : In the System Properties-->setting.DISPLAYDATE <br />
Global Value and Current Value fields are set as dd/MM/yyyy<br />
<br />
Your earliest response will be very helpful for me.<br />
<br />
Thanks in Advance,<br />
Preethisha
Preethisha
Hi Williams,
I have used 2 parameters to filter the records from the Workorder table by the REPORTDATE attibute. But I have changed the datatype of both the parameters as "String".
Also I have changed the script as,
var sqlText = new String();
// Add query to sqlText variable.
sqlText = " select wonum, reportdate from workorder "
+ "where reportdate >= to_date('21/2/2010','dd/mm/yyyy') and reportdate <= to_date('9/3/2010','dd/mm/yyyy')"
+ "order by reportdate"
;
I am not getting the date parameter as,
MXReportSqlFormat.createParamWhereClause("workorder.reportdate",MXReportSqlFormat.getStartDayTimestampFunction(params["fromdate"]))+ " ";
Also, I fetched the REPORTDATE column as the getString("reportdate") mathod not by the getTimestampFunction("reportdate")
Now, Its showing the records.
I have the following q's :
01. Is It a correct of creating Date parameters in BIRT?
02. Can I use to_date() function in BIRT?
03. Where will the date format conversion be handled in BIRT Designer?
Keenly looking for Your response
Thanks in Advance,
Preethisha
mwilliams
Preethisha,
BIRT handles dates in the format yyyy-mm-dd by default. If your database needs this in a different format, you'll probably have to use the simpleDateFormat function to change the format of the date before you pass it.
As for the to_date function. I'm assuming this is a function used by your database. If your driver for your dataSource/database allows for the function, I believe it can be used.
For your last question, if you need to format a parameter to pass it through your dataSet query, you'll need to format the date parameters in the beforeOpen() script of your dataSet and pass them into your query by building your query using this.queryText.
Hope this helps.
A@vi
Preetisha...
Is it the current date you want ?
If so , then u can directly create a dataset .Drag it where ever u r using it.
Double click it & in expression u give as " new Date() ". After that go to styles & go to date format.
Then custom , then give the format u want the outcome .
Hope this works.......
Hope aisa option ho Maximo mein....
Thanks....
Preethisha
Hi,<br />
I could get the current date an the one year back date in the Report. I wrote a javascript function in the initialize() method and assigned those value to the parameters also. If I didn't enter any values to those parameters, Its taking those values and fetching one year data. The problem is, How can I set default values dynamically in Maximo? Can We set system date and one year back date fro date parameter in Maximo? The Report should take the default value from maximo.<br />
<br />
Thanks in Advance,<br />
Preethisha <br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'A@vi'" data-cid="72088" data-time="1294723228" data-date="10 January 2011 - 10:20 PM"><p>
Preetisha...<br />
<br />
Is it the current date you want ?<br />
If so , then u can directly create a dataset .Drag it where ever u r using it. <br />
Double click it & in expression u give as " new Date() ". After that go to styles & go to date format.<br />
Then custom , then give the format u want the outcome .<br />
Hope this works....... <br />
Hope aisa option ho Maximo mein....<br />
<br />
Thanks....<br /></p></blockquote>