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)
Simplifing filter paramters
sommeralex
<p>Hi, </p><p> </p><p>I am using BIRT the first time and it "feels" a little complex to filter DB data. What i need (and still don't understand how it works) is to filter my results in the DB via date (pastDate < x < futureDate)</p><p> </p><p>What i get is that i first have to define the query</p><p> </p><p style="font-size:11px;font-family:Monaco;color:rgb(147,26,104);">select[color=#000000;] [/color]*[color=#000000;] [/color]</p><p style="font-size:11px;font-family:Monaco;">[color=#931a68;]from[/color] public.ibalarm</p><p style="font-size:11px;font-family:Monaco;"> </p><p style="font-size:11px;font-family:Monaco;">but what I do not get is how i can add the where clause to fit my need for a date-filtering. What i would love to have is something like this:</p><p style="font-size:11px;font-family:Monaco;"> </p><p style="font-size:11px;font-family:Monaco;color:rgb(147,26,104);">select[color=rgb(0,0,0);] [/color]*[color=rgb(0,0,0);] [/color]</p><p style="font-size:11px;font-family:Monaco;">[color=rgb(147,26,104);]from[/color] public.alarm where alarm.date < x && alarm.date > y</p><p style="font-size:11px;font-family:Monaco;"> </p><p style="font-size:11px;font-family:Monaco;">and then, somewhere in a filter method, to SET this x, y</p><p style="font-size:11px;font-family:Monaco;"> </p><p style="font-size:11px;font-family:Monaco;">filter.setParamter("y", yValue)</p><p style="font-size:11px;font-family:Monaco;">filter.setParameter("x", xValue)</p><p style="font-size:11px;font-family:Monaco;"> </p><p style="font-size:11px;font-family:Monaco;">So please can someone explain me how to make this with the latest framework?</p><p style="font-size:11px;font-family:Monaco;"> </p><p style="font-size:11px;font-family:Monaco;">thx</p><p style="font-size:11px;font-family:Monaco;">alex</p>
Find more posts tagged with
Comments
mwilliams
<p>If you're wanting parameters that the user enters to change the query params, you're probably looking for something like:</p><p> </p><p>select *</p><p>from public.alarm</p><p>where alarm.date between ? and ?</p><p> </p><p>or something like that.</p><p> </p><p>Then, in the parameter section of the dataSet editor, you'd link your two dataSet parameters to the the report parameters you created in the Data Explorer. Maybe I'm misunderstanding something. Let me know.</p>