Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Using parameter in Custom Parameter Page
Using parameter in Custom Parameter Page [message #702002] Mon, 25 July 2011 20:55 Go to next message
Scroon  is currently offline Scroon
Messages: 28
Registered: June 2011
Junior Member
Hello,

Is it possible to use parameters in a a custom parameter page?

For 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>

<birt:parameterPage id="birtParmPage" reportDesign="report\Report.rptdesign"
name="my form"
pattern="frameset"
format="html"
isCustom="true"
showTitle="true"
showToolBar="true"
showNavigationBar="true"
target="content"
>

Cascading Parameter1:
<birt:paramDef id="5" name="Country" value= <% Some parameter, not fixed value%> cssClass="class1"/>
<br>
Date From:
<birt:paramDef id="22" name="date_from" value= <% Some parameter, not fixed value%>/>
Date To:
<birt:paramDef id="33" name="date_to" value= <% Some parameter, not fixed value%>/>
<br>
<input type="submit" name="submit" value="Run Report"/>
</birt:parameterPage>
<br>
</body>
</html>


Is it possible to set the value attribute of paramDef tag with some parameter rather than fixed values?

[Updated on: Mon, 25 July 2011 21:07]

Report message to a moderator

Re: Using parameter in Custom Parameter Page [message #702025 is a reply to message #702002] Mon, 25 July 2011 21:23 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Yes like:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/WEB-INF/tlds/birt.tld" prefix="birt" %>
<%int myparm=22;%>
<!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>
<style type="text/css">
..class1 { color:#ff0000; }
</style>

</head>
<body>
Text Parameter: <birt:paramDef id="1" name="text" cssClass="class1"
value="<%=myparm%>"/>


Jason



On 7/25/2011 4:55 PM, Scroon wrote:
> Hello,
>
> Is it possible to use parameters in a a custom parameter page?
>
> For 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">
> </head>
>
> <body>
>
> <birt:parameterPage id="birtParmPage"
> reportDesign="report\Report.rptdesign"
> name="my form"
> pattern="frameset"
> format="html"
> isCustom="true"
> showTitle="true"
> showToolBar="true"
> showNavigationBar="true"
> target="content"
>>
>
> Cascading Parameter1: <birt:paramDef id="5"
> name="Country" value= <% Some parameter, not fixed value%>
> cssClass="class1"/>

> <br>
> Date From:
> <birt:paramDef id="22" name="date_from" value= <% Some parameter, not
> fixed value%>/>
> Date To: <birt:paramDef id="33" name="date_to" value= <% Some parameter,
> not fixed value%>/>
> <br>
> <input type="submit" name="submit" value="Run Report"/>
> </birt:parameterPage>
> <br>
> </body>
> </html>
Re: Using parameter in Custom Parameter Page [message #702049 is a reply to message #702025] Mon, 25 July 2011 22:22 Go to previous message
Scroon  is currently offline Scroon
Messages: 28
Registered: June 2011
Junior Member
Thanks, it works perfectly : )
Previous Topic:Birt, Cloudbase and java.sql.SQLException: Method not supported
Next Topic:MONTH IS NOT IN PROPER ORDER IN CHART
Goto Forum:
  


Current Time: Tue Sep 23 06:25:04 GMT 2014

Powered by FUDForum. Page generated in 0.14930 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software