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
Filter By Date difference
Migrateduser
<p>Hi Experts,</p>
<p> </p>
<p>I am new to Birt Reports and need your help on the issue i am facing.</p>
<p>I was trying to filter by taking the date difference from the computed columns.</p>
<p>Below is the scenario:</p>
<p>I need to generate a report for which <span style="font-size:14px;">Filtering criteria should be</span></p>
<p><span style="font-size:14px;">1) </span><span style="font-size:14px;">Number of days 2,4,7 days </span></p>
<p> </p>
<p><span style="font-size:14px;">1. I have created a parameter with "string" data type and Display type as "List Box" and selection list values as "Static". In the values table i have provided the numbers 2, 4 and 7.</span></p>
<p><span style="font-size:14px;">2. From the computed columns created a new columns "Call PendingDays", Data type as "String" and in expression defined as below</span></p>
<p><span style="font-size:14px;"><b>if</b> (row["OPEN_TIME"]==<b>null</b>)</span></p>
<p><span style="font-size:14px;">{</span></p>
<p><span style="font-size:14px;">(((BirtDateTime.diffDay( row["OPEN_TIME"], BirtDateTime.today()))<= 7) </span></p>
<p><span style="font-size:14px;">((BirtDateTime.diffDay( row["OPEN_TIME"], BirtDateTime.today()))<= 4) </span></p>
<p><span style="font-size:14px;">((BirtDateTime.diffDay( row["OPEN_TIME"], BirtDateTime.today()))<= 2)) }</span></p>
<p><span style="font-size:14px;"><b>else</b></span></p>
<p><span style="font-size:14px;">row["OPEN_TIME"] </span></p>
<p>3. From "Filters", a new filter is created with</p>
<p>Expression: row["OPEN_TIME"] and Operator: Less than or Equal to and Value1: params["Rp PendingDays"].value.</p>
<p><span style="font-size:14px;">Please let me know where i am going wrong, i am new to Birt and was unable to generate the report.</span></p>
<p> </p>
<p><span style="font-size:14px;">Thanks in advance.</span></p>
<p><span style="font-size:14px;">Mahesh</span></p>
Find more posts tagged with
Comments
There are no comments yet