Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Display default data set in chart?
Sachin_K
Hi All,
I am new BIRT and was able to create couple of line and stacked bar charts. Now I am trying to add some interactivity to it. I have 3 months of data and it will grow going forward. Here is what I trying to do .
1. When report is displayed, How can I display only last 7 days of data and the chart for last 7 days?
2. How can I controls like date picker where user can pick the date range and create report on the fly?
I looked at the help doc which came with BIRT pulg-in but didn't find any information on it.
Any suggestions?
Thanks.
Sachin
Find more posts tagged with
Comments
mwilliams
Hi Sachin,
You can use report parameters for the user to be able to select start and end dates or choose from specified ranges that you set up. Then you can use filters or a dataSet parameter if you're using an SQL query dataSet to limit the data. Let me know if you have questions.
Sachin_K
Hi Michael,
Thank you for your suggestion. I tried your suggestion and also looked the documentation in detail. With your suggestion and tutorial # 3, I was able to add the parameter and was able to pick the date. This is great, but I am trying to do following,
1. User will click the report and when the report is loaded, the report will display last 7 or 10 days of data (Sysdate - 7). This will be the default report without any user interaction. User will not pick any date here.
2. Now user wants to view data for different date range. Here user will select start date and end date using parameters and then updated report will be displayed.
Any suggestions?
Regards.
Sachin.
Sachin_K
Any suggestions?
mwilliams
Sachin,
Sorry for the delay. What version of BIRT are you using?
Sachin_K
Hi Michael,
I am using BIRT 2.3.2.
Regards,
Sachin
mwilliams
Sachin,
Alright, check out these report designs. They're linked through a drill down. The "Master" report is the one you'd link your users to. It shows the last 7 days by default. The "Detail" report is linked to by clicking on the hyperlink under the chart. This report allows the user to enter a custom date range. I made these reports in 2.3.2.2.
Hope this helps.
Sachin_K
Hi Michael,
Thanks a lot for the sample report. It helped. But I didn't understand the logic in "before open" property on ODA data set property. If you can elaborate little more that will be helpful.
After referring to your example, I created one master report and one detailed report. In master report i used following data set query to generate chart. "select * from table_name where date_col > sysdate - 7 "
Then created a detailed report with following data set query to generate detailed chart
"select * from table_name"
I linked the detailed report to master report. And it works as expected. I will add more parameter selection to the detailed report for user interaction.
Thanks again for your help.
Regards,
Sachin
mwilliams
Sachin,
I was creating string dates to pass as parameters because my "today" was 5/25/05. Yours will be different using today's actual date. Let me know if you have any other questions.