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)
Dynamic Parameters with drill-through
Rin
Hi,<br />
<br />
I'm trying to write a custom parameter page with BIRT tag library.<br />
<br />
Everything went well till it comes some dynamic parameter in a sub-page.<br />
<br />
For example. with a table has follow columns:<br />
<br />
CompanyName,Department,Manager,Employee,Salary,Phone....<br />
<br />
<br />
In the master page, I use a hyperlink with drill-through, pass a parameter <strong class='bbc'>CompanyName </strong> to a sub-page.<br />
Then the sub-page will be invoked, with the <strong class='bbc'>CompanyName </strong> from the main page(e.g. the company name is BiliBili), the sub page will get the values of the dynamic parameter <strong class='bbc'>Department </strong>(all the departments in BiliBili Company), then the user can select from Departments of BiliBili on the parameter page.<br />
<br />
<br />
It works well with BIRT-Report Viewer, but now I need to write a custom parameter page, then it comes problems...
Find more posts tagged with
Comments
Rin
The problem is, since I use code like:
<birt:parameterPage
id="report1"
name="page1"
reportDesign="report\SubPage.rptdesign"
isCustom="true"
pattern="frameset">
<birt:param name="CompanyName" value="BiliBili"/>
<br><br>
<birt:paramDef id="1170" name="Department"/>
<br><br>
<input type="submit" name="submit" value="Sumbit form"/>
</birt:parameterPage>
<br>
</body>
Although the CompanyName has been set,the Department parameter still comes out as empty, which is a list-box with no value in it(I expect it to get the Department from BiliBili).
JasonW
Look at the attached cascade example where the first level is set.
Jason
Rin
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="79328" data-time="1309366196" data-date="29 June 2011 - 09:49 AM"><p>
Look at the attached cascade example where the first level is set.<br />
<br />
Jason<br /></p></blockquote>
<br />
Thanks for the reply!<br />
<br />
Is there a way to hide the first-level cascading parameter in the customized parameter page, while submit the value set by jsp to the report please?<br />
<br />
The reason I does not use the cascading parameter is that I have many parameters which need to be allowed to have multi-values, and value of those parameters is based on the other parameters selected by user.<br />
<br />
For example:<br />
User firstly select some Country,<br />
then all the cities of those country will appear in a list box, which also allow user to select multi-values; then all the NIKE-stores in those cities selected by user will appear in another listbox.<br />
<br />
Since birt only allow the last child of the cascading parameter group to has multi-values, I used 3 pages to do the job, in first page user can select multi countries, then the second page is invoked through a drill-through hyperlink, passing the selected countries from the first page, to get the responding cities.....<br />
<br />
It works well with report viewer, but when I tried to create customized parameter page(to allow use some UI library to make the report UI more awesome), the problem in my first post in this thread aroused.<br />
<br />
<br />
Cascading parameter will work, if there is a way to hide the first level parameter.
JasonW
Can you use a style to hide it? See this example:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ 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=ISO-8859-1">
<title>Insert title here</title>
</head>
<style type="text/css">
.class1 { background-color:#ffffff; color: #000000; display: none }
</style>
<body>
Parameter Page 1
<br>
<birt:parameterPage
id="report1"
name="page1"
reportDesign="cascade_report.rptdesign"
isCustom="true"
pattern="frameset">
<birt:paramDef id="5" name="Country" value="USA" cssClass="class1"/>
<br><br>
Cascading Parameter2: <birt:paramDef id="6" name="City"/>
<br><br>
Cascading Parameter3: <birt:paramDef id="7" name="Customer"/>
<br><br>
<input type="submit" name="submit" value="Sumbit form"/>
<br><br>
</birt:parameterPage>
<br>
</body>
</html>
Note that country is hidden.
Jason
Rin
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="79343" data-time="1309382153" data-date="29 June 2011 - 02:15 PM"><p>
Can you use a style to hide it? See this example:<br />
<br />
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"<br />
pageEncoding="ISO-8859-1"%><br />
<%@ taglib uri="/birt.tld" prefix="birt" %><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<a class='bbc_url' href='
http://www.w3.org/TR/html4/loose.dtd">'>http://www.w3.org/TR/html4/loose.dtd"></a><br
/>
<html><br />
<head><br />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><br />
<title>Insert title here</title><br />
</head><br />
<style type="text/css"><br />
.class1 { background-color:#ffffff; color: #000000; display: none }<br />
</style><br />
<body><br />
<br />
Parameter Page 1<br />
<br><br />
<birt:parameterPage<br />
id="report1" <br />
name="page1"<br />
reportDesign="cascade_report.rptdesign"<br />
isCustom="true"<br />
pattern="frameset"><br />
<br />
<birt:paramDef id="5" name="Country" value="USA" cssClass="class1"/> <br />
<br><br> <br />
Cascading Parameter2: <birt:paramDef id="6" name="City"/><br />
<br><br> <br />
Cascading Parameter3: <birt:paramDef id="7" name="Customer"/><br />
<br><br> <br />
<input type="submit" name="submit" value="Sumbit form"/><br />
<br><br><br />
</birt:parameterPage><br />
<br><br />
</body><br />
</html><br />
<br />
<br />
Note that country is hidden.<br />
<br />
Jason<br /></p></blockquote>
<br />
<br />
Thank you Jason, it works!
madhur
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="79328" data-time="1309366196" data-date="29 June 2011 - 09:49 AM"><p>
Look at the attached cascade example where the first level is set.<br />
<br />
Jason<br /></p></blockquote>
<br />
Hi Jason,<br />
<br />
I tried this example, but I'm getting an error 'The service is not initialized!. Use BirtReportServiceFactory.init(ServletConfig) to init.'<br />
<br />
Please have a look at the attached file.<br />
<br />
I used the cascade_report.rptdesign file given in the zip file and this is my jsp.<br />
<br />
<br />
Parameter Page 1<br />
<br><br />
<birt:parameterPage<br />
baseURL="/birt"<br />
id="report1"<br />
name="page1"<br />
reportDesign="cascade_report.rptdesign"<br />
isCustom="true"<br />
pattern="frameset"><br />
<br />
Cascading Parameter1: <birt:paramDef id="5" name="Country" /><br />
<br><br><br />
Cascading Parameter2: <birt:paramDef id="6" name="City"/><br />
<br><br><br />
Cascading Parameter3: <birt:paramDef id="7" name="Customer" cssClass="class1"/><br />
<br><br><br />
<input type="submit" name="submit" value="Sumbit form"/><br />
<br><br><br />
</birt:parameterPage><br />
<br><br />
<br />
<br />
Do you have any idea what is the reason for this error and how to fix it?<br />
Thanks
JasonW
Can you give some details on how you have BIRT deployed and what version?
Jason
madhur
Birt version is 3.7.2
It's deployed in Jboss 5
There I have the birt.war deployed. And the jsp file is in myapp.war.
In myapp.war WEB-INF, birt.tld is in tlds folder and in WEB-INF\lib I have put these libraries from birt.war axis.jar, com.ibm.icu_4.4.2.v20110823.jar, org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar and viewservlets.jar
I tried another similar example. For that also I'm getting the same error.
http://www.birt-exchange.org/org/forum/index.php/topic/25371-the-service-is-not-initialized-use-birtreportservicefactoryinitservletconfig-to-init/
When I set isCustom="false" then the above works fine with the default parameter page.