Hi,
I have created a drop down using HTML in the text field from the Birt report. and also i have a chart in the same report using the filters. But i dont know how to retrieve the selected value.
can anyone please answer my question?
Can you use a Report Parameter instead of a Text element? If not, what prevents you from using the Report Parameter? The issue with the way you are trying to do it is that the dropdown will run in the browser after the chart has been created.
The chart should have to display in default when the page loads. and using the HTML Drop Down the chart should change. this is the requirement. That's the reason i'm not using report parameters.
Can you please tell me how to achieve this?
In the Help > About menu, what is your Build id? Also what is the Output Format setting of your chart?
Version: 24.2.1 Build id: v20171002
The output format for my chart is HTML5.
This is how i wanted to display.
can anyone help me out regarding this?
Are you familiar with JavaScript API (JSAPI)? There is a link to some documentation here. If you can't use the standard report functionality with parameters, you will need to write custom JSAPI code to interact with the chart. I found one code snippet that might be helpful. It filters a chart with bookmark "ChartBookmark" using the ProductLine value from the Classic Models database.
var bviewer = this.getViewer(); var bpagecontents = bviewer.getCurrentPageContent(); var bchart = bpagecontents.getChartByBookmark("ChartBookmark"); if (bchart == null) return; // unable to get handle to chart in case where chart becomes hidden var filter = new actuate.data.Filter("PRODUCTLINE", "=", "Planes"); var filters = new Array(); filters.push(filter); bchart.setFilters(filters); bchart.setChartTitle("Orders By Country (Planes)"); bchart.submit();
You would need to get the value from the dropdown in code and send it to the filter. Note that I have not tested this code and it is meant to be used only as an example.
This Question is Awaiting Your Response
The moderator is awaiting your response. Were you able to resolve the issue? If so, would you please share your solution with others in a response post? Or, would you like some further assistance? Please let us know. Your question and its resolution are important to us, and we want to help.