Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Filtering a Cross Tab using Date Time field
Migrateduser
Hi Everybody,<br />
I want to apply date criterion to a crosstab in the report.<br />
<br />
For example, records created in the <strong class='bbc'>Last Month</strong>.<br />
Currently , in a table i use the 'Create Date' field in the filter where i have created two formuale :<br />
<br />
1. The first formula will make sure that the records are pertaining only to the current year :<br />
<br />
<span class='bbc_underline'>Formula :</span> <br />
<span style='color: #8B0000'>BirtDateTime.year(row["Dat_IssueCreatTime"])</span> <strong class='bbc'>In</strong><br />
<span style='color: #000080'>if(BirtDateTime.month(BirtDateTime.today()) == "January")<br />
{(BirtDateTime.year(BirtDateTime.addYear(BirtDateTime.today(), -1)));}<br />
else(BirtDateTime.year(BirtDateTime.today()))</span><br />
<br />
2. The second formula calculates the last month :<br />
<br />
<span style='color: #8B0000'>BirtDateTime.month(row["Date/Time Field"]) </span><strong class='bbc'>In</strong><br />
<span style='color: #000080'>BirtDateTime.month(BirtDateTime.addMonth(BirtDateTime.today(), -1))</span><br />
<br />
<br />
I tried to use the same formulae on the dimension 'Create Date' in the Crosstab, but the report gave an error saying : <br />
<strong class='bbc'>"org.eclipse.birt.report.service.api.ReportServiceException: Error happened while running the report"</strong><br />
<br />
And yes, I am using <strong class='bbc'>Birt Designer 2.5.1 v20090903</strong><br />
<br />
Kindly advise if you have come across anything of similar sort.<br />
<br />
Regards,<br />
Roshan.
Find more posts tagged with
Comments
There are no comments yet