|
Re: Multiple Submit Buttons in Custom Parameter Page [message #702867 is a reply to message #702752] |
Tue, 26 July 2011 22:29 |
|
Do something like the following:
<%@ 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>
<script language="JavaScript">
function testme(){
alert("here" + document.page1.action );
var act = document.page1.action;
var newact =act.replace("testtag.rptdesign", "testtag2.rptdesign");
document.page1.action = newact;
return false;
}
</script>
</head>
<body>
Parameter Page 1
<br>
<birt:parameterPage
id="report1"
name="page1"
reportDesign="testtag.rptdesign"
isCustom="true"
baseURL="/2.6.2"
pattern="preview">
Text Parameter: <birt:paramDef id="1" name="text" cssClass="class1"
value="<%=myparm%>"/>
<br><br>
<input type="submit" value="Sumbit form A" onclick="JavaScript:testme()"/>
<input type="submit" name="submit" value="Sumbit form B"/>
<br><br>
</birt:parameterPage>
<br>
</body>
</html>
On 7/26/2011 3:07 PM, Scroon wrote:
> Hello,
>
> I'm trying to build a custom parameter page which can invoke different reports with same parameter set.
>
> E.g.: In the following picture
>
>
> User can run report A or report B as they wish, passing same parameters.
>
>
> With a custom parameter page:
>
> .....
> <birt:parameterPage id="birtParmPage" reportDesign="report.rptdesign"
> name="my form"
> pattern="frameset"
> format="html"
> isCustom="true"
> showTitle="true"
> showToolBar="true"
> showNavigationBar="true"
>>
> ClientName:<birt:paramDef id="11" name="ClientName" "/>
> <br>
> Date From:
> <input type="text" name="date_from" />
> To:
> <input type="text" name="date_to" />
> <br>
> <input type="submit" name="submit" value="Run Report A"/>
> ......
> .......
> </birt:parameterPage>
>
>
> If we can get the values of parameter ClientName,date_from,date_to in any place out of<birt:parameterPage> ....</birt:parameterPage>, then the problem is solved....
>
>
|
|
|
|
|
Re: Multiple Submit Buttons in Custom Parameter Page [message #703465 is a reply to message #703426] |
Wed, 27 July 2011 15:25 |
|
Run the parameter page to html and view the source. You will see the
form the tags create and the parameters. The only issue is that they
will have javascript functions already generated for most of the
parameters. You can just manipulate the dom the same way the previous
example showed.
Jason
On 7/27/2011 11:01 AM, Scroon wrote:
> One further question, is there other property we can modify, besides
> document.page1.action, like
> document.page1.<ParametersPassingToTheReport>; ?
|
|
|
Powered by
FUDForum. Page generated in 0.04156 seconds