Home
Analytics
how to pass parameter to birt report using Asp.net or java
sonimanish
Dear all,<br />
<br />
Please let me know <br />
how to pass parameter to birt report using Asp.net or java<br />
<br />
Thanks<br />
Manish Soni<br />
<a href='mailto:' title='E-mail Link' class='bbc_email'>manishsony@aol.com</a><br />
India
Find more posts tagged with
Comments
Virgil Dodson
Hi Manish, and welcome to the forums.<br />
<br />
You've asked this question in the Practice Area forum of BIRT Exchange. If this was a real question, then the Deploying BIRT Engine forum would have been a better place to ask this.<br />
<br />
If this were a real question, I would have responded with:<br />
<br />
If you are using the BIRT APIs in your own Java application then pass the parameters in any fashion you like using the same methods you already employ to get data into your Java class.<br />
<br />
If you are using the WebViewerExample that ships with the BIRT Engine, then you can pass parameters using a URL syntax like below.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
http://localhost:8080/birt251/frameset?__report=test.rptdesign¶m1=my+value¶m2=3
</pre>
sonimanish
I have installed Iserver express on my machine and created a report my passing parameters.
It's working fine when am trying to call in from iserver express control panel.
i also call that report in my asp.net application using jsapi.
when am trying to map parameter Actuate report viewer displaying its own parameters window for input.
it is ok but i want to take input from my own developed page and based on that input report should display.
here some code for your ref.
<HTML>
<HEAD>
<title>WebForm1</title>
<script type="text/javascript" language="JavaScript" src="
http://localhost:8900/iportal/jsapi"></script>
;
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="
http://schemas.microsoft.com/intellisense/ie5">
;
</HEAD>
<body MS_POSITIONING="GridLayout" onload="init();">
<form id="Form1" method="post" runat="server">
<div id="myDivContainer" style="border-width: 1px; border-style: solid;"></div>
<button onclick="runReport()">Run Report </button>
<div id="myViewerDivContainer" style="border-width: 1px; border-style: solid;"></div>
<script type="text/javascript" language="JavaScript">
var myParam = null;
var myViewer = null;
function init()
{
actuate.load("parameter");
actuate.load("viewer");
actuate.initialize( "
http://localhost:8900/iportal/"
, null, "", "", createParameter );
}
function createParameter()
{
myParam = new actuate.Parameter( "myDivContainer" );
myParam.setReportName("/Home/administrator/Manish/Test.rptdesign" );
myParam.submit();
}
function runReport()
{
myViewer = new actuate.Viewer( "myViewerDivContainer" );
myViewer.setReportName("/Home/administrator/Manish/Test.rptdesign" );
myViewer.setParameters(myParam.getParameterMap());
myViewer.submit();}
</script>
</form>
</body>
</HTML>
on page load application runs init and load parameters of reports
user id and direct indirect option.
by clicking run report report capture parameters and load report in next frame
Thanks
Manish soni
Virgil Dodson
Hi Manish,
These are no longer looking like practice questions so I am moving this thread to the Deploying with iServer Express forum so it can get answered there.
Virgil Dodson
I can't tell what the issue is? Is it that the report loads in another frame when run from your ASP.net app? For you reference, you can find information on using the JSAPI parameter object at <a class='bbc_url' href='
http://www.birt-exchange.org/wiki/Programming_with_the_JSAPI/#Parameter_Component'>Programming
with the JSAPI - BIRT Wiki - BIRT Exchange</a><br />
<br />
After installing iServer Express trial, you can also find some JSAPI examples at /Public/JSAPI Examples. View the source for the Parameterized Viewer example since it loads in the same page.