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)
Want to add a Filter condition while displaying
Mohammed
Hi,<br />
I am using BIRT version 2.6.1. My requirement is like after reading content from DB, i have to display the content in a respective position.<br />
<br />
Eg. I will be getting two columns (<strong class='bbc'>FULLNAME </strong> and <strong class='bbc'>USERNAME</strong>) from a dataset and have to show <strong class='bbc'>FULLNAME </strong> using grid but the <strong class='bbc'>FULLNAME </strong> should be displayed in particular place and the place will be determined by comparing <strong class='bbc'>USERNAME </strong> column and given parameters. <br />
<br />
I tried with applying expression after the drag and drop of FULLNAME in the grid. But its considering only the first row of the result set.<br />
<br />
if(BirtStr.trim(dataSetRow["USERNAME"]) == params["owner1"].value ){<br />
dataSetRow["FULLNAME"]<br />
}<br />
<br />
<br />
I have attached my Sample_Report_For_Data_row_Filter.rptdesign report for your reference.<br />
<br />
Kindly help us on this.<br />
<br />
Regards,<br />
Mohammed Ibrahim V.
Find more posts tagged with
Comments
Mohammed
Hi,<br />
I found the solution.<br />
<br />
For this requirement we have to use drag and drop the data set. From that we can remove the unwanted columns and header and footer. Then by adding the following script in the required data we can achieve the filter.<br />
<br />
if(BirtStr.trim(row["USERNAME"])==params["owner3"].value) {<br />
dataSetRow["FULLNAME"]<br />
}<br />
<br />
I have also attached the solution.<br />
<br />
If you have any other suggestion, always welcome.<br />
<br />
Regards,<br />
Mohammed Ibrahim V.<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'Mohammed'" data-cid="80799" data-time="1311950703" data-date="29 July 2011 - 07:45 AM"><p>
Hi,<br />
I am using BIRT version 2.6.1. My requirement is like after reading content from DB, i have to display the content in a respective position.<br />
<br />
Eg. I will be getting two columns (<strong class='bbc'>FULLNAME </strong> and <strong class='bbc'>USERNAME</strong>) from a dataset and have to show <strong class='bbc'>FULLNAME </strong> using grid but the <strong class='bbc'>FULLNAME </strong> should be displayed in particular place and the place will be determined by comparing <strong class='bbc'>USERNAME </strong> column and given parameters. <br />
<br />
I tried with applying expression after the drag and drop of FULLNAME in the grid. But its considering only the first row of the result set.<br />
<br />
if(BirtStr.trim(dataSetRow["USERNAME"]) == params["owner1"].value ){<br />
dataSetRow["FULLNAME"]<br />
}<br />
<br />
<br />
But we have to concentrate on formatting little bit.<br />
<br />
<br />
I have attached my Sample_Report_For_Data_row_Filter.rptdesign report for your reference.<br />
<br />
Kindly help us on this.<br />
<br />
Regards,<br />
Mohammed Ibrahim V.<br /></p></blockquote>
mwilliams
Glad you found a solution. Let us know if you run into issues with this down the road.