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)
Cascading parameters inside report page
cdoniat
Hi everyone, Birt Guru,
I'd like to know something.
Is it possible to use taglib birt inside a text item into a report page or by another element or by javascript?
My purpose is to manage three cascading parameters directly in the report page so that I could reloaded a report with new parameters values. I do not want to go through a JSP parameters page outside the report page.
Thanks in advance,
Christophe.
Find more posts tagged with
Comments
mwilliams
So, you would be against using the taglib to embed the parameter page in one frame in your JSP page and the viewer in another frame? I don't know that you can use the taglib within your birt report. That being said, I haven't tried it either!
cdoniat
Hi Michael,
Well I'm not really against that you said. I did two iframes: one for the birt-viewer (width:100% height:85%) and one for a pseudo-dock for my list of reports(width:100% height:15%) in the JSP page. The first one call another jsp page which contains birt taglib with two div <birt:viewer> and <birt:parameterPage>. See below:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/birt.tld" prefix="birt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<script>
function runReport(form){
// alert(form.innerHTML);
form.submit();
}
</script>
<birt:viewer id="BiWeeklyServView" reportDesign="report/BiWeeklyServ.rptdesign"
height:600
width:800
pattern="frameset"
format="html"
title=""
isHostPage="true"
showTitle="false"
showToolBar="false"
showNavigationBar="false"
showParameterPage="false"
>
<input type="hidden" name="RP_VersionParam" value="All"/>
<input type="hidden" name="RP_ConfigParam" value="All"/>
<input type="hidden" name="RP_VariantParam" value="All"/>
<input type="hidden" name="RP_status" value="0"/>
</birt:viewer>
<birt:parameterPage id="BiWeeklyServParam" reportDesign="report/BiWeeklyServ.rptdesign"
name="BiWeeklyServParam"
pattern="frameset"
format="html"
title="Flight hour chart"
isCustom="true"
showTitle="false"
showToolBar="true"
showNavigationBar="false"
baseURL="/birt-viewer"
>
<table border=0>
<tbody>
<tr>
<td><font size="3">Version:</font></td>
<td><birt:paramDef id="1" name="RP_VersionParam"/></td>
<td><font size="3">Configuration:</font></td>
<td><birt:paramDef id="2" name="RP_ConfigParam"/></td>
<td><font size="3">Variant:</font></td>
<td><birt:paramDef id="3" name="RP_VariantParam"/></td>
<td><birt:paramDef id="4" name="RP_status" value="1"/></td>
<td><input type="BUTTON" value="Reload" OnClick="runReport(this.form)"></td>
</tr>
</tbody>
</table>
</birt:parameterPage>
</body>
</html>
But, when I display all things at the first time, the first iframe (those for birtviewer contains another iframe with the two div: viewer and parameterPage and the Viewer is not full 100% for the width (there is not the possibility to do that with percentage), plus it is with scrolling I couldn't hide. And then, when I used the parameters and triggered the action with the reload button, the processing is ok but in the outcome, the parameters disappeared, there is only the button.
So I followed the best practice of
http://esitnikov.blogspot.com/
for simple html controls and it's working fine, but for cascading dynamic option select control it's tricky. So two choices:
1) use birt taglib inside the report like I tried above but I have to avoid messy scolling stuff, how?
2) make a javascript stuff to manage cascading dynamic option select by myself, connected to the dataset (for my opinion, it is the best choice in my cas)
Let me know any idea or comment, example which help?
Cheers,
Christophe
mwilliams
Christophe,
Unless you can size the window in your JSP to not have a scroll bar for the viewer, I'd agree with you that the second option will work better for you in your case. It'll just require you to do a lot of work!
cdoniat
Thanks Michael for your reply,
So lets do it! Cascading dynamic drop list. Anybody tried to do that way before? It could help me a lot.
Regards,
Christophe
cdoniat
Well,
I found this to start:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1342-populating-a-drop-down-list-in-a-birt-report/
Regards,
Christophe