|
Re: To load the report in the same page [message #529228 is a reply to message #529215] |
Fri, 23 April 2010 14:08 |
|
You can get the parameterPage tag to call some JavaScript like:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<script>
function runReport(form){
alert(form.innerHTML);
form.submit();
}
</script>
<birt:parameterPage id="birtParmPage" reportDesign="TopNPercent.rptdesign"
name="my form"
pattern="frameset"
height="600"
width="800"
format="html"
title="My Viewer Tag"
isCustom="true"
showTitle="true"
showToolBar="true"
showNavigationBar="true"
>
TOP COUNT PARAMETER
<input type="Text" name="Top Count">
<br><br>
TOP PERCENT PARAMETER
<input type="Text" name="Top Percentage">
<br><br>
<input type="BUTTON" value="Run Report" OnClick="runReport(this.form)">
</birt:parameterPage>
</body>
</html>
Maybe use some script similar to:
function loadIframe(iframeName) {
if ( window.frames[iframeName] ) {
window.frames[iframeName].location =
window.frames[iframeName].location + "&__overwrite=true";
return false;
}else{
return true;
}
}
Where iframeName is the id of the birtviewer tag. The &__overwrite=true
just makes the report re-run. You might want to first check to see if
the __overwrite parameter exists first.
Jason
On 4/23/2010 9:35 AM, sen K wrote:
> Hi,
>
> Can I have some input - to achieve this one.
> For example my window has two different <div> tag.
> In the first DIV tag i am getting my report parameters and in the second
> DIV tag itself I have to load the reportviewer.
>
> Somebody post any idea,please.
>
> My jsp page, like this -
> <%@ 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>
> <h1> Cascade Parameter </h1>
> <birt:parameterPage id="CasecadeReport" name="page1"
> reportDesign="Report_Cascade_Param_new.rptdesign"
> isCustom="true" pattern="frameset">
> <div style="border: 2px solid rgb(0, 0, 0); width: 1240px; height: 90px;
> overflow: auto;">
> <table>
> <tr><td>
> Domain Code: <birt:paramDef id="1" name="domain_Code" /></td><td></td>
> <td>Project Code: <birt:paramDef id="2" name="project_Code"/></td><td></td>
> <td></td><td>
> <input type="submit" name="submit" value="View Report"/></td>
> <br><br>
> </tr>
> </table>
> </div></birt:parameterPage>
> <br>
> </form>
> </body>
> </html>
>
> Thanks
> sen
>
>
>
>
>
|
|
|
|
Re: To load the report in the same page [message #529270 is a reply to message #529248] |
Fri, 23 April 2010 16:24 |
|
What I meant was to change the runReport script to use the second
script. The JSP page should also have the viewer tag included as well.
Jason
On 4/23/2010 11:12 AM, sen K wrote:
> I included the script in my jsp as follows -
>
> <%@ 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>
> <script>
> function runReport(form){
> //alert(form.innerHTML);
> form.submit();
> }
> </script>
>
> <h1> Cascade Parameter </h1>
> <birt:parameterPage id="CasecadeReport" name="page1"
> reportDesign="Report_Cascade_Param_new.rptdesign"
> isCustom="true" pattern="frameset">
> <div style="border: 2px solid rgb(0, 0, 0); width: 1240px; height: 90px;
> overflow: auto;">
> <table>
> <tr><td>
> Domain Code: <birt:paramDef id="1" name="domain_Code" /></td><td></td>
> <td>Project Code: <birt:paramDef id="2" name="project_Code"/></td><td></td>
> <td></td><td>
> <input type="submit" name="submit" value="View Report"
> OnClick="runReport(this.form)"/></td>
> <br><br>
> </tr>
> </table>
> </div>
> </birt:parameterPage>
> <br>
> </body>
> </html>
>
> But I am not clear, where to make script you mentioned
> function loadIframe(iframeName) {
> if ( window.frames[iframeName] ) {
> window.frames[iframeName].location = window.frames[iframeName].location
> + "&__overwrite=true";
> return false;
> }else{
> return true;
> }
> }
>
> plear clear me
>
> Sen
|
|
|
|
Powered by
FUDForum. Page generated in 0.04333 seconds