The Web Viewer now contains a tag library that can be used to customize the behavior of the Viewer. This tag library can be deployed by either deploying the viewer as normal or by using the new BIRT Web Deployment project wizard. In addition, if you desire to have BIRT deployed in one context and include the tag library in a separate context this can be done by copying the birt.tld file to your WEB-INF\tlds directory and copying coreapi.jar, modelapi,jar, viewerservlets.jar, engineapi.jar, and com.ibm.icu_3.6.1v20070417.jar from the Viewer libs directory to the new context/web-inf/lib directory. Add the following reference to your web.xml.
<jsp-config>
<taglib>
<taglib-uri>/birt.tld
<taglib-location>/WEB-INF/tlds/birt.tld
</taglib>
</jsp-config>
The following tags are now available:
enlarge
The parameterPage tag can be used to construct your own parameter page before calling the BIRT Viewer. In addition to calling the Viewer several attributes are provided to customize the Viewer appearance and functionality.
For example the following JSP code will present the user with a set of text boxes to enter the two parameters required for the report. The pattern attribute specifies the Servlet mapping to be used and can be set to frameset, run or preview.
<%@ 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="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="Submit" value="Run Report">
</birt:parameterPage>
</body>
</html>
If you wish the BIRT Engine to return the HTML it generates for the parameter you can use the paramDef tag in conjunction with the parameterPage tag.
The following code will call the BIRT engine to populate each level of a cascade.
<%@ 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>
<style type="text/css">
.class1 { background-color:#ff0000; color: #ffffff; }
</style>
<body>
Parameter Page 1
<br>
<birt:parameterPage
id="report1"
name="page1"
reportDesign="cascade_report.rptdesign"
isCustom="true"
pattern="frameset">
Cascading Parameter1: <birt:paramDef id="5" name="Country" />
<br><br>
Cascading Parameter2: <birt:paramDef id="6" name="City"/>
<br><br>
Cascading Parameter3: <birt:paramDef id="7" name="Customer" cssClass="class1"/>
<br><br>
<input type="submit" name="submit" value="Sumbit form"/>
<br><br>
</birt:parameterPage>
<br>
</body>
</html>
This code will produce the following output. Notice that the third level is also being customized by using a style.
enlarge
Download the 2.2 build and try out the new tag library.
Wednesday, September 19, 2007
2.2 BIRT Tag Library: Building a Custom Parameter Page
Posted by Jason Weathersby at 4:28 PM
Subscribe to:
Post Comments (Atom)
153 comments:
Does the taglib support JavaServer Faces applications? A few sentences about integration with JSF would be nice.
TIA,
Nils Kassube
Nils,
I did some testing with JSF 1.1 using Tomcat 5.5 and did not have much luck. Most of the tags wrap the results in an IFrame and use AJAX. Ideally I would have thought the %lt;f:verbatim> tag would have worked, but not on my installation. The following tag works because the results are returned in a div without AJAX.
%lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
%lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
%lt;%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
%lt;%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
%lt;%@ taglib uri="/birt.tld" prefix="birt" %>
%lt;html>
%lt;f:view>
%lt;body>
%lt;birt:report id="birtViewer" reportDesign="TopNPercent.rptdesign"
height="600"
width="800"
format="html"
isHostPage="false"
reportContainer="div"
>
%lt;birt:param name="Top Count" value="3">%lt;/birt:param>
%lt;/birt:report>
%lt;/body>
%lt;/f:view>
%lt;/html>
So do I tried to use the BIRT tag with jsf and I found the same problems of yours. I use the 'reportContainer="div"' and this do, but If I use the ajax results the thing not work. Have some news about?
Stefano
Stefano
I do not have an update on this yet. Can you log a bugzilla entry for your issue?
Jason
Hi Jason,
happy to read that you answered me, I use in my web app the birt tag, althought I don't know use it very well. Unfortunately the documentations that I found are few, and sometime not very clear... So first of all I ask you if you have some link where I found it more...
However, if you thought that the problem is inside of the tag, I can replicate the problem with a little code and put in the bugzilla.
Thanks
Can you please log a bug for it.
Here is the updated Viewer page that discusses the tags:
http://www.eclipse.org/birt/phoenix/deploy/viewerUsage2.2.php
/deploy/viewerUsage2.2.php
Is it possible for you to create a full example of a report with custom parameters form and the deployment steps needed?
I read your post but I still don't know how to do it..
Thanks.
Take a look at the AIUC 2007 presentation Deploying the BIRT Engine located here:
http://www.eclipse.org/birt/phoenix/presos/
The source code link has a directory in it called BirtWTP. In that directory there is a webcontent directory which contains a jsp page named BirtParmCustom.jsp which is an example of using the custom parameter page. If you deploy the normal viewer and add this page to the BIRT example viewer, it should work.
Jason
I tried and copied these two files to the viewer dir:
1. TopNPercent.rptdesign
2. BirtParmCustom.jsp
The report works fine, but I haven't seen the custom parameters page. I still don't understand how to connect a report to a parameter page. Can you tell me how it is done?
Thanks again!
What happens when you display
BirtParmCustom.jsp?
The reportDesign attribute ties it to a specific report.
reportDesign="TopNPercent.rptdesign"
it works fine and the report runs but when I press on the "Run Report" button of the viewer I see again the default parameters page
I want to link somehow the report to the custom parameters page when I use the viewer frameset
I see. You will need to make a JavaScript modification.
Under the
webcontent/birt/ajax/ui/report directory open up the AbstractBaseReportDocument.js file and look for the __beh_parameter function.
This function is called when you select the parameter button in the viewer. You could change the function to something like:
__beh_parameter : function( id )
{
//birtParameterDialog.__cb_bind( );
window.location= "http://localhost:8080/BIRTWTP/BirtParmCustom.jsp"
}
This may not be ideal as this will affect all reports. Another option is to turn off the toolbar in using the taglib attribute
showToolBar="false" and implement your own. Or use the code above and do a check on the report you are currently viewing.
Jason
When I press the button the custom parameters form is shown - but when I first run the report I see the default form.
Is there a way to fix it?
How are you first running the report? Are you not running it through the custom parameter jsp page first?
no I use birt frameset and the parameters page automatically shown in a pop-up window
You could modify the
BirtParameterDialog.js file.
Change the __bind function to redirect.
__bind : function( data )
{
window.location = "http://localhost:8080/BIRTWTP/BirtParmCustom.jsp"
Jason
Hi! Jason,
Good work......I tried to implement the parameter page tag so that I could use a customized page for user to specify parameters for their reports. After I copied all the neccessary jar files and birt.tld file to my application context,everything works fine without an error except that my report was generating empty report. I tried to figure out what the problem could be all I could get was that none of the parameters entered got sent with the URL as with normal web application.
Kindly tell me if I am missing something in the whole process. Thanks.
Are you setting the name of the parameter in your custom page to the exact name in your report?
Jason
Jason, thanks for your quick response.Actually, The name of the custom page parameters are not exactly the same with the name in my report.Infact, that was why I was wondering how the parameters will be sent and how the report will know the corresponding parameter for each marker in the report query.
Should I now let the name of the parameters match the corresponding marker in my repost query? and also, does the order of arragement of parameters in custom page matters?
Once again, thanks as I await your reponse.
Make sure the names are exactly the same. The order should not matter.
Jason
Hi! Jason,
Thank you so much,I did just that and everything worked perfect.But I will like to suggest that you include it in the original post,so that people wont keep asking the same question over and over.Once again,thank you.I appreciate.
Hi! Jason,
This question is actually not that related to this topic, but it would be of great help to the entire report developers who are currently using BIRT abd those who hope to use try in future.
Is it possible to pass parameter through servlet instead of JSP? and also can servlet be deployed along with birt viewer? using contents of birt viewer WEB-INF folder.
Azuri,
If you mean writting a servlet that calls the BIRT viewer, the answer should be yes. You have access to the request object just add your parameter.
You should be able to add Servlets/JSPs to the viewer. Just make sure you update the web.xml.
Jason
Hi! Jason,
Please what could be causing the following error:
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.birt.report.utility.ParameterAccessor
It gets generated whenever I try to run my BIRT parameter JSP page.
Hi! Jason,
I guess you have been busy, but please the problem still persist and that's the only thing holding me from deploying my application. Can you please look into this as soon as you can.
Thanks. I appreciate.
Azuri,
Can you give some more details on your setup? Did you just add a simple JSP page to the existing viewer?
Thanks! Jason, I did not add any JSP page to the viewer, all I did was that I created the custom parameter page in my application and I configured it to send parameter to a report in the webviewer,I copied the four neccesary jar files from webviewer lib folder to my application lib folder. I also copied the birt.tld to my web app WEB\tlds folder and finally I include the declaration of the tag library in application web.xml just like you did in this post.But whenever I try to access the parameter JSP page I get this error (java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.birt.report.utility.ParameterAccessor) but if I remove the birt tag from the page, the page will display.
Azuri,
Did you add the
baseURL="/WebViewerExample"
attribute to your page. This attribute points to where you have the viewer installed.
Jason
Yes I did. I even tried to specify the absolute URL, but still did not work.
What version of BIRT are you using?
Jason
Version 2.3.0
Azuri.
Thanks
Azuri,
I just checked 2.3, it seems you need engineapi.jar in the web-inf/lib in addition to the 4 other jars. I will update the post.
Jason
Thank you so much...I added the engine.jar file and it worked perfectly.I hope I have not stressed you.Once again, thank you. I appreciate.
Hello, I'm using Struts and i'd like to generate a dynamic SQL from a validator form to make the reports (I build the query inside the Struts Form and that's the WHERE clause in the SQL procedure at the Oracle Server).
How can I use Java(+ Eclipse) to build the unique BIRT param i need (a string) in the procedure?
I've read about coding parameters with birt:tags, but i want to pass only the 'WHERE' already built with the form.
Thanks
Manu,
You should be able to do this by building a birt report with the base query and add the where clause as a string parameter. Then in JavaScript event handler for the data sets beforeOpen method modify the query like:
this.queryText = this.queryText + " " + params["whereclauseparameter"];
Jason
Ok, but i have 6 inputs which i build the query. I manage these inputs in the struts form and get the WHERE in the Action. I had though about forwarding to the report after the action, but i don't know how to send the params at that point.
Maybe i'm complicating this... :S
Thanks Jason!
you should be able to forward it and pass the parameter in a form or as a url parameter eg
url/frameset?__report=yourrpt.rptdesign&whereclause=whereclauseurlencoded
Jason
Hello Jason
I'll summarize my testings:
+ i have a DataSet with the query.
+ i have added a parameter named 'where' with default value "".
+ i have a report using this dataset
+ i have a JSP with a this code (got from your example):
**************
[birt:parameterPage
id="birtParmPage"
reportDesign="listados.rptdesign"
name="myForm"
pattern="preview"
height="600"
width="800"
format="html"
title="My Viewer Tag" isCustom="true" showTitle="true"
showToolBar="true"
showNavigationBar="true"
target="_blank"]
[br][br]
WHERE
[input type="Text" name="where" style="width:500px;"]
[br][br]
[input type="Submit" class="boton" value="Generar Estadisticas"]
[/birt:parameterPage]
***************
when i click on the submit the parameter is not shown in the results...
Thanks again!
Did you modify the query with the where parameter? Can you email me the report design? jasonweathersby at alltel.net
Jason
Hello Jason, i have progressed in my testing, but i have the problem.
1. i have the report i sent you, WITH the updated queryText, as you posted.
2. i have the [birt:report][/birt:report] with the [birt:param name='v_where'/] inside report tags.
3. In my report exists a report param named 'v_where'
4. In my dataset exists a param named 'v_where' linked to the report param.
5. Changing the 'value' attribute of the [birt:param/] i reach different results.
5.1 If it is empty, the result is the whole set of rows retrieved by the query
5.2 If a use,eg, AND F_DISOLUCION IS NULL, i obtain this console exception:
org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object or an update count.
SQL error #1: ORA-06550: lÃnea 1, columna 84:
PLS-00103: Se ha encontrado el sÃmbolo "AND"
5.3 If i use, eg, ' and f_disolucion is null', the exception is:
org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object or an update count.
SQL error #1: ORA-06550: lÃnea 1, columna 83:
PLS-00103: Se ha encontrado el sÃmbolo " and f_disolucion is null" El sÃmbolo " and f_disolucion is null" ha sido ignorado.
I continue trying...
Thanks a lot
Manuel
At least!!!
Hello Jason, i have done it!!
I used a StoredProcedure DataSet, because orignally my query came from it, with one IN parameter defining the WHERE.
In this case, i don't have to concat the queryText, because the queryText is a 'call procedure(?,?)'...so always got the errors posted because of this.
So i can tell you that i've solved this problem, and want to thank you for your help.
Manu
hi i am new to birt...
i saw this post...can any one tell me how to validate the report parameters like whether date is given in proper format??where to write that script?
hi i am new to birt...
i saw this post...can any one tell me how to validate the report parameters like whether date is given in proper format??where to write that script?
In the tag you can put in a button that fires javascript:
<body>
<script>
function runReport(form){
alert(form.innerHTML);
form.submit();
}
</script>
<birt:parameterPage id="birtParmPage" reportDesign="MyDataSet.rptdesign"
name="my form"
pattern="frameset"
height="600"
width="800"
format="html"
title="My Viewer Tag"
isCustom="true"
showTitle="true"
showToolBar="true"
showNavigationBar="true"
>
<br><br>
Parameter: <birt:paramDef id="44" name="My_Parameter"/>
<br><br>
<input type=BUTTON value="Run Report" OnClick="runReport(this.form)">
</birt:parameterPage>
</body>
Hi Jason Weathersby,
Could u pls send me the steps on how to build a Custom Parameter Page...???
Though, i read all the posts that are posted above, related to Custom Parameter Page and did the same thing but did not work.
I am using BIRT version 2.3.1 and have all the jars.
Could u pls tell me, where exactly i must place the .rptdesign file and .jsp file...???
pls reply immediately.
-Vikas
Vikas,
How did you deploy it? If you have deployed the example web viewer and want to use the jsp page within the same context, just drop the jsp page and report in the top level directory of the web app ie WebViewerExample.
Jason
jason,
i have created one test.rptdesign and .jsp file, and i have placed them in WebViewerExample folder.
but still not running...
and more over, at the time of creating jsp file, i dont see any autocomplete(ie: when we press ctrl+spacebar)box where tags appear.
wht might be the problem, pls help me asap, since its a requirement from my client...
-Vikas
Vikas,
What version of BIRT are you using?
Can you send me the test report and jsp file? My email address is jasonweathersby at alltel.net.
Jason
Jason,
pls check ur mail.
i have sent the files.
the url i am using to run the report is
http://localhost:8080/WebViewerExample-withoutCustomize/frameset?__report=TopNPercent.rptdesign
Is that right...???
-Vikas
Jason,
i have sent the same email to jweathersby@actuate.com also...pls chk.
-Vikas
My Birt Version is 2.3.1
can u send me your 'WebViewerExample' folder with necessary plugins, so that i will deploy by putting my files in it.
pls, its very urgent.
-Vikas
I replied to your email.
Jason
Hi,
Could you kindly suggest any links or workarounds for rookie report developers who'd like to only display kind of error messages on input report parameter validation.
Designing custom parameter JSP page seems a little more complex for just the report developers who do not know much about JSP etc.
Any pointers would be great.
Thanks!
No idea about rookie reports.
Hi,
I have tried this example using birt tag..but i'm getting this error - "The service is not initialized!. Use BirtReportServiceFactory.init(ServletConfig) to init." can any one please help??
pls be specific about ur problem.
I will try for the solution.
I have been attempting to get this to work with Birt 2.3.1 and Birt 2.5M3, with no success. I see that Vikas was eventually able to get the custom parameter page to work... what was the trick? Any help would be appreciated.
Thanks,
Keith
what error are you getting?
That's part of the problem, I'm not getting any errors, but I am not able to get the custom parameter dialog to show up.
I have downloaded the source code from the "AIUC 2007 presentation Deploying the BIRT Engine" and am attempting to use the testtag.rptdesign & ParameterPage.jsp to get a custom parameter dialog. I have dropped the two files into the top level of the WebViewerExample (both 2.3.1 and 2.5M3) as deployed with tomcat 5.5.
I've also tried a simpler example using the "TopNPercent.rptdesign" & "BirtParmCustom.jsp" combination.
Hi,
Your JSP page must have all the Custom parameters defined for the report to get generated based on those parameters....
Run the JSP page and enter the parameters, and based on those parameter values, ur report will get generated....thats it...
-Vikas
That works... (duh). That's what I get for not doing my research on how JSP works. Thanks for the quick reply!
Keith
u r welcome...if any prob again, just drop a comment.
-Vikas
Quoting Anonymous posted at 8:21 AM
>>it works fine and the report runs but when I press on the "Run Report" button of the viewer I see again the default parameters page
>>I want to link somehow the report to the custom parameters page when I use the viewer frameset
I have been working with the same issue, and you do not have to modify the javascript files. Create a "ParameterPage.jsp" file in your WebViewerExample directory. Between the head tags for that file simple add the following lines:
%lt;script type="text/javascript">
history.go(-2)
%lt;/script>
This will redirect you back to your custom parameter page if you click the "Run Report" icon in the viewer.
Good luck,
Keith
How can I remove only parameter icon from toolbar?
Hi,
just comment the entire block containing
INPUT TYPE="image" NAME='parameter' SRC="birt/images/Report_parameters.gif"........ in the ToolbarFragment.jsp file under
\webapps\WebViewerExample\webcontent\birt\pages\control
It will not display the parameter icon.
-Vikas
hi vikas thanks.
sample application is working fine but when I used my report file it's giving following exception though I added specific driver jar..
org.eclipse.birt.report.engine.api.EngineException: An exception occurred during processing. Please see the following message for details:Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.Cannot load JDBC Driver class: oracle.jdbc.driver.OracleDriver.
Hi Sapna,
I think, the issue might be with the database driver.
pls check again, whether u r successfully able to connect to the db thru eclipse.
-Vikas
Hi vikas,
I tested it lots of time,if i run only report then it's working fine,but when i try to implement BirtParamCustom.jsp with my own report it gives same exception.
is there any other files we need to write for that?
Sapna,
can u send me ur jsp file?
let me have a look and will try to fix the issue.
send it to vikasg18@gmail.com
-Vikas
Vikas,
Please check your mail,Isent my jsp code.
hi visak,
I got the solution.
we need to paste driver jar at:
D:\Tomcat 5.0\webapps\birt-viewer\WEB-INF\platform\plugins\org.eclipse.birt.report.data.oda.jdbc_2.3.1.v20080827\drivers
and my application working just does not fetching records.
hi,
how to pass dynamic "window.location"?
I am using left navigation and when I click
link,I want to pass that path to assign to "window.location".
__bind : function( data )
{
alert(data);
window.location = "http://localhost:8080/birt-viewer/BirtParmCustom.jsp"
}
how to get dynamic values from database on jsp dropdown from struts action?I called retrivecombo()method in action and passing list as c collection attribute .but when i pass action.do from jsp,it gives error that can not open report.
I am getting the following error when trying to use birt:paramDef on my custom parameter page:
The service is not initialized!. Use BirtReportServiceFactory.init(ServletConfig) to init.
I see that the same error was reported in a previous post, but was not followed through.
I have checked that my parameter names match. Running BIRT 2.3.1 on Tomcat 5.5 with Struts 1.1.
Also - when I use birt:viewer with the standard parameter dialog box then everything works fine.
Neill,
Can you post your jsp page?
Jason
Thanks Jason
This site won't let me post the jsp page:
Your HTML cannot be accepted: PHP, ASP, and other server-side scripting is not allowed.
I can't see any file upload facility either. Can I email it to you?
Neill
Hi Jason
Can I email you my jsp page?
Neill
Neill,
Sure, my email address is jasonweathersby at windstream.net
Hello !
I have used this article as guideline to integrate my birt reports with application.
But Now i want to open new browser window
to show my reports.
Anyone have idea about this,please reply.
Thank You
Supriya
Can you use
window.open in javascript and specify the page containing the tags?
Jason
hi,
when i try to connect jsp with birt using connection profile,am getting following error:
Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.dbprofile.
Can anyone tell me the right way.
Thanks.
Hi Jason Weathersby
Could u pls send me the steps on how to implement connection profile to generate report through jsp(struts).
I created connection profile and report generation is fine.just problem is when I tried to run through jsp,it gives following error:
Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.dbprofile.
Is there any more configuration needed?
Email:sapnii2 at gmail.com
Thanks
Sapana
Following is exception in detail:-
org.eclipse.birt.report.engine.api.EngineException: An exception occurred during processing. Please see the following message for details:Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.dbprofile. at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1109) at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1073) at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:88) at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:45) at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:45) at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:42) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:63) at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90) at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:101) at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:231) at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:237) at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:90) at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1164) at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:155) at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81) at org.eclipse.birt.report.service.actionhandler.BirtGetPageActionHandler.__checkDocumentExists(BirtGetPageActionHandler.java:58) at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.prepareParameters(AbstractGetPageActionHandler.java:121) at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.__execute(AbstractGetPageActionHandler.java:106) at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90) at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47) at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143) at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPage(BirtDocumentProcessor.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112) at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:225) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at com.opus.els.filters.ELSSessionFilter.doFilter(ELSSessionFilter.java:118) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:670) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:517) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:575) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:595)Caused by: org.eclipse.birt.report.data.adapter.api.AdapterException: An exception occurred during processing. Please see the following message for details:Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.dbprofile. at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:490) at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:114) at org.eclipse.birt.report.engine.data.dte.DataGenerationEngine.doExecuteQuery(DataGenerationEngine.java:79) at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:248) at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1736) at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:77)... 74 moreCaused by: org.eclipse.birt.data.engine.core.DataException: Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.dbprofile. at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:169) at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:210) at org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java:197) at org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiDataSource(DataSourceRuntime.java:209) at org.eclipse.birt.data.engine.impl.QueryExecutor.openDataSource(QueryExecutor.java:386) at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:305) at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:498) at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:189) at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:177) at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:143) at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:479)... 79 moreCaused by: org.eclipse.datatools.connectivity.oda.OdaException ;java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver at org.eclipse.birt.report.data.oda.jdbc.dbprofile.impl.Connection.open(Connection.java:99) at org.eclipse.birt.report.data.oda.jdbc.dbprofile.impl.Connection.open(Connection.java:56) at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:235) at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:157)... 89 moreCaused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:580) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:88) at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:104) at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53) at org.eclipse.datatools.enablement.internal.oracle.JDBCOracleConnectionFactory.createConnection(JDBCOracleConnectionFactory.java:27) at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83) at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:355) at org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionInfoImpl.initializeJDBCConnection(ConnectionInfoImpl.java:659) at org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionInfoImpl.(ConnectionInfoImpl.java:644) at org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionFactory.createConnection(ConnectionFactory.java:38) at org.eclipse.datatools.connectivity.sqm.core.SQMConnectionFactory.createConnection(SQMConnectionFactory.java:45) at org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionFactory.createConnection(ConnectionFactory.java:59) at org.eclipse.datatools.connectivity.internal.ConnectionFactoryAdapterProvider.createConnection(ConnectionFactoryAdapterProvider.java:114) at org.eclipse.datatools.connectivity.internal.ManagedConnection.createConnection(ManagedConnection.java:163) at org.eclipse.datatools.connectivity.internal.CreateConnectionJob.run(CreateConnectionJob.java:56) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Can you email me the jsp and explain how you have deployed the BIRT Engine.
jasonweathersby at windstream.net
Jason
Hi,
I want to use dbprofile.
Can any one tell me,is there any relation between plugin.properties,plugin.xml and connection profile?
Email:sapnii2 at gmail.com
Thanks
hi,
Anyone using birt with SQLmx/tandem
as a db?
I am using it but when I try to create simple report dataset,the query builder makes CPU usage high and system gets hanged.
Any solution?
Thanks
Hi,
How to resolve java heap space problem?
I made changes in eclipse.ini as follows but not working.
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize=512M
-framework
plugins\org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx1024m
What error are you getting in the log file?
Thanks, Jason!
I've been looking for a answer all day using tag lib in separate context. And I found the solution from comments between you and azuri in this post.
The problem was baseURL attribute in viewer tag.
thank you so much.
have a nice day!
Hi,
i'm using viewers taglibs to set parameters values. The report design contains multiple values parameters, how do i set these values using viewer taglibs?
I mean, does the paramDef taglib allow setting multiple values for a parameter like it does for single value parameter :
birt:paramDef name="" id="" /birt:paramDef
Thank you.
Take a look at:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=244880
Which explains what you can do.
Jason
Hi,
i'm using the code below to set values for a multiple values parameter "testMultiValuesParam"
If i create the parameter "testMultiValuesParam" in my report as a Listbox and allow multiple values params["testMultiValuesParam"].value is always null ! (I've tried static and dynamic values from dataset when defining the report parameter)
I've tried with the same code defining the parameter as a textbox (single value), params["testMultiValuesParam"].value returns the first value defined in the tag lib ( it returns Cust1 )
<birt:viewer id="birtViewer" pattern="run" showToolBar="false" showNavigationBar="false" showTitle="false" reportDesign="test.rptdesign"
height="768"
width="1024"
format="html"
>
<birtaram name="testMultiValuesParam">
<birt:value>Cust1</birt:value>
<birt:value>Cust2</birt:value>
</birtaram>
</birt:viewer>
BIRT 2.3.2.r232_20090202 Build <2.3.2.v20090218-0730> (both designer and engine)
Thank you for helping.
This worked for me.
1- create a report with dynamic multi-select list.
2- Add a data element to the report to display the values.
//expression
var parmcount = params["MultiValParameter"].value.length
var parmstring = "";
for( i=0; i < parmcount; i++ ){
if( i == 0 ){
parmstring = parmstring +params["MultiValParameter"].value[i];
}else{
parmstring = parmstring + " , " + params["MultiValParameter"].value[i];
}
}
parmstring;
3- Create JSP page //this one uses //int parmaters not string.
<birt:viewer id="bv1" reportDesign="MultiSelectParameter.rptdesign"
pattern="frameset"
height="600"
width="600"
format="html" isHostPage="false" >
<birt:param name="MultiValParameter">
<birt:value>10101</birt:value>
<birt:value>10104</birt:value>
</birt:param>
</birt:viewer>
Hi Jason,
is there a way to have the input and the viewer in the same page?
I want to display the parameter input (listbox) in a div (left of the screen) and refresh the viewer (displayed into another div at the right of the screen) when i submit the form.
Thank you.
Hi Jason,
does parameterPage the viewer tag lib allow setting a value for a parameter other than the one displayed as a input.
I want the values of the input parameter (ALLOWED_REPORTS_LIST in my code below) to be retrieved dynamically depending on the value i set for another parameter (REPORTS_LIST).
<birt:parameterPage id="report1" name="page1" reportDesign="IND_DSIE.rptdesign" isCustom="true" pattern="frameset">
<birt:param name="REPORTS_LIST" value="VALUE"/>
<birt:paramDef id="5" name="ALLOWED_REPORTS_LIST"/>
<input type="submit" name="submit" value="Sumbit form"/>
</birt:parameterPage>
The goal is :
1- Set the value of REPORTS_LIST parameter
2- Populate the dyanmic values of parameter ALLOWED_REPORTS_LIST from a scripted dataset that is filtered by the value of REPORTS_LIST parameter.
I want to be able to set the value of parameter REPORTS_LIST before displaying the input for ALLOWED_REPORTS_LIST parameter.
Thank you.
in response to:
Hi Jason,
is there a way to have the input and the viewer in the same page?
I want to display the parameter input (listbox) in a div (left of the screen) and refresh the viewer (displayed into another div at the right of the screen) when i submit the form.
Thank you.
If you use a frameset you can specify a different frame for the output like
<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"
target="content"
>
TOP COUNT PARAMETER
<input type="Text" name="Top Count">
<br><br>
TOP PERCENT PARAMETER
<input type="Text" name="Top Percentage">
<br><br>
<input type="Submit" value="Run Report">
</birt:parameterPage>
The frameset could look like
<frameset rows="*,2*">
<frame name="parms" src="BirtParmCustomTarget.jsp">
<frame name="content" src="">
</frameset>
Have you tried using the cascaded parameter?
$lt;birt:parameterPage
id="report1"
name="page1"
reportDesign="cascade_report.rptdesign"
isCustom="true"
pattern="frameset">
Cascading Parameter1: $lt;birt:paramDef id="5" name="Country" />
$lt;br>$lt;br>
Cascading Parameter2: $lt;birt:paramDef id="6" name="City"/>
$lt;br>$lt;br>
Cascading Parameter3: $lt;birt:paramDef id="7" name="Customer" cssClass="class1"/>
$lt;br>$lt;br>
$lt;input type="submit" name="submit" value="Sumbit form"/>
$lt;br>$lt;br>
$lt;/birt:parameterPage>
Lets try that again :>
<birt:parameterPage
id="report1"
name="page1"
reportDesign="cascade_report.rptdesign"
isCustom="true"
pattern="frameset">
Cascading Parameter1: <birt:paramDef id="5" name="Country" />
<br><br>
Cascading Parameter2: <birt:paramDef id="6" name="City"/>
<br><br>
Cascading Parameter3: <birt:paramDef id="7" name="Customer" cssClass="class1"/>
<br><br>
<input type="submit" name="submit" value="Sumbit form"/>
<br><br>
</birt:parameterPage>
Hi Jason,
thank you for your answer. But can i use DIVs instead of FRAMESET?
Thank you.
in response to:
If you use a frameset you can specify a different frame for the output like...
If I put
http://localhost:8080/ELS/framset?__report=%2FReport%2FAuditDetailsRole.rptdesign&__masterpage=true&__format=html
directly in browser then also report shows expected result.
I want such a functionality that,if any one put above url then system must redirect to login page.
As it's not the secure way to make query string visible to everyone.
Thanks,
Sapana,
Currently the viewer does not have this capability. You will have to build this in your app before calling the viewer or modify the viewer code.
Jason
Hi,
How to show report on same jsp page
from where am passing parameters.
do u have any tutorial which explains above requirement?
Hi Janson,here is my solution for problem I askes previously(If I put
http://localhost:8080/ELS/framset?__report=%2FReport%2FAuditDetailsRole.rptdesign&__masterpage=true&__format=html
directly in browser then also report shows expected result.
I want such a functionality that,if any one put above url then system must redirect to login page.
As it's not the secure way to make query string visible to everyone.
)
Solution:---MAKE USE OF FILTER.
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
throws ServletException, IOException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;
HttpSession session = request.getSession();
String requestURI = request.getRequestURI();
String queryString = request.getQueryString();
// System.out.println("querystr:::" + request.getQueryString());
// System.out.println("Request URL ::" + request.getRequestURL());
// System.out.println("Context path:" + request.getContextPath());
// System.out.println("URI :" + request.getRequestURI());
// System.out.println("Addr :" + request.getRemoteAddr());
// System.out.println("Host :" + request.getRemoteHost());
ElectraSessionContext electraSessionContext = Utils.getSessionContext(request);
boolean loggedInFlag = electraSessionContext.isLoggedInFlag();
if (requestURI.endsWith(".do") || requestURI.endsWith(".jsp")||requestURI.endsWith("frameset")) {
if (!loggedInFlag && !requestURI.contains("loginout.do")) {
if (queryString != null) {
if ((queryString.endsWith("method=view") || (queryString
.contains("method=view") && queryString.substring(11, 12)
.equalsIgnoreCase("&")))
|| queryString.contains("method=searchRecord")
|| queryString.contains("method=logout")
|| queryString.contains("method=viewAssignPrivilege")
||queryString.contains("__report")) {
request.getRequestDispatcher("/jsp/invalidaccess.jsp").forward(request,
response);
return;
}
else {
try {
PrintWriter pr = response.getWriter();
pr.print(invalidaccess);
pr.flush();
}
catch (IOException ie) {
ie.printStackTrace();
}
return;
}
// request.getRequestDispatcher("/loginout.do?method=view").forward(request,
// response);
}
}
}
// pass the request on
chain.doFilter(request, response);
}
Another way to do this is to use a frameset and the target attribute.
<frameset rows="*,2*">
<frame name="parms" src="BirtParmCustomTarget.jsp">
<frame name="content" src="">
</frameset>
<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"
target="content"
>
TOP COUNT PARAMETER
<input type="Text" name="Top Count">
<br><br>
TOP PERCENT PARAMETER
<input type="Text" name="Top Percentage">
<br><br>
<input type="Submit" value="Run Report">
</birt:parameterPage>
Hi Jason,
I am very new to BIRT and using BIRT 2.3.2.
I am creating a Custom Parameter Page all the thing are working fine but the problem is when I am having a Combobox parameter set to be required then A get a radio select before the combobox and a pair of radio select and input field next to the combobox.
Now I want to get only the combobox not other additional elements provided.
How can I do that ?
Please help.
What error are you getting? Can you post the jsp page?
I am not able to post my JSP here. Give me your email id where I can send.
Actually I am getting radio button with combo box and one additional radio button + text field for a single Combo box parameter.
I am taking 6 parameters first two are input fields and next three are combo boxes (populated by data sets) and last one is input field.
Now I want my combo boxes as simple combo boxes nothing else added with those (presently i am getting two radio buttons and a text field extra for a single combo box parameter weather I set the required="true" or "false" for my parameter).
Send to jasonweathersby at windstream.net
Thanks a lot dear,,,
Ma problem is resolved.
Hi Jason,
I have an issue. I designed some reports using BIRT 2.3 which are running fine in tomcat 5.5. Now I want these reports to run in RAD 6.0. How can I do that ?
Please guide.
I am not that familiar with RAD 6.0. You may want to post this question to the RAD forum on Birt-exchange.org.
Jason
How could I customize the appearance of parameter dialog, if using standard dialog? I tried setting attribute that are part of parameterPage tag but it doesn't work.
If using the default parameter page you will need to modify the js files in the webcontent directory.
Hi Jason,
I have more than one reports running in same project and I am using different different parameter pages for the different different reports. So if I hardcode window.location in bind : function( data ) method inside BirtParameterDialog file then all the reports open a single parameter page.
At runtime how can I open the parameter page corresponding to a particular report ?
Nazim,
You could try something like checking the location.href and parse the report name and then forward to appropriate page.
Jason
Thanks a lot dear (Jason),,
One more issue I have when I submit a parameter JSP page, a report opens. When from the report toolbar I open the parameter JSP page again, all the values of the fields in parameter JSP page are refreshed. I want my previous values to be there.
How can I do that ?
One more thing How can I put something in the session after I click on the submit button on my parameter JSP page so that I can do something with that session value when that parameter JSP page again opens?
Nazim,
1- without modifying the code for the tag I am not certain of a way to do this. Can you log a bugzilla request to enhance the tag?
2 - maybe put a JavaScript function on the submit to forward to another page that writes to session?
Thanks a lot Jason.
Hi Jason,
I have two more issues:
1: I want my table header to be fixed means no scroll on header although rest of the rows are scrollable if required. So how could I make my tables header as fixed onto its position ?
2: I have near around 30 columns in my table so when I run the reports all columns are fairly visible but when I export my report into pdf or excel then columns merge into each other and the complete data is not visible.
So what should I do make my reports to be exported as like they are when they run ?
Regards,
Nazim Hussain
Nazim
1 - I do not know a way of doing this. You may be able to used a Text element and a script tag, but I have not done one.
Jason
Nazim,
2 - Have you tried setting the master page to landscape?
Jason
Hi all,
I run custom parameter page and it shows me in new window. I'd like to see parameterPage in IFRAME dialog like default parameter page.
I have your BirtParamCustom.jsp. It doesn't show me also title name, toolbar
And there is snippet of generated prameter page html
<form action="/birt/frameset?__navigationbar=true&__toolbar=true&__showtitle=true&__id=birtParmPage&__title=My+Viewer+Tag&__report=TopNPercent.rptdesign&__masterpage=true&__format=html" method="post" name="my form">
thank you
Jan
Jan,
I am not sure what you are asking. Can you give some more details?
Jason
Hi,
Your post really help to implement the cascade parameters. I have situation where my application has to pass username/some value to first level cascade parameters
for example: Users are mapped with list of countries in the database. so the country list should based on the session.username. then other part state based on country..
How to implement the first level parameter should based on the some value, how to pass the value
If the user name is in session you should be able to get the username in script in the report like
reportContext.getHttpServletRequest().getSession().getAttribute("username");
If you cascade uses a dataset you could do this in the beforeOpen script and set the query based on username.
Assume a query like
Select * from mytable
in the beforeOpen you would do something like
var user =reportContext.getHttpServletRequest().getSession().getAttribute("username");
this.queryText = this.queryText + " where username = " +user;
Hi Jason
Thanks for help. I had tried exactly same to get the username as param for cascading in 2_3_2, session values is not getting passed. But after submitting the page session values are passed to the rpt file.
I have upgrade to 2_5_2, after upgrading when i select the first parameter of the cascade to load next, birt_viewer displaying "The viewing session is not available or has expired" I have jsp page in one application, which call birt_viewer. Could you help on this
Can you try this with 2.6.1? Could you open a bugzilla entry for this?
Hi Jason,
I have tried with 2.6 also.
I have birt-viewer version 2.6.0. I have deployed as application. When i try the ParameterPage.jsp, it is working perfectly. I am able to get cascade parameters and onsubmit report also.
I have other application, where i have copied the birt.tld, necessary jar files. I have placed the same ParameterPage.jsp
with baseUrl as /birt-viewer
in this application context, when i run the ParameterPage.jsp, i am getting country list. On selecting the Country - getting alert as "The viewing session is not available or has expired"
Could you help on this
I logged a bug for this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=327796
I am curious as why you did not get the first part of the error described in the bug entry.
BTW as a work around you could at the parameter page jsp to the viewer and just use an iframe in your app like:
<iframe src ="/WebViewer/cascadeexample.jsp" width="100%" height="600">
</iframe>
Hi Jason
I have other issue.
How to pass the session values to cascade query. This is not working reportContext.getHttpServletRequest().getSession().getAttribute("username"); in beforeOpen
even i tried by introducing new parameter _param_username + setting the value in jsp. not successful.
my idea is to load the country based on the user. Not all the user linked with all country.
is there any workaround for this
Is the viewer deployed in the same web app as the application that is using the tag libraries? If you are using a separate viewer context they wont share session variables.
using the same context
Can you send me an email to jasonweathersby at windstream dot net, so I can send you a report that shows current session variables.
Hi Jason,
Thanks for your help.
When i debug it, i got the session value in beforefactory but the variable in beforefactory not passed to the onbefore of dataset to use it.
so i used javascript expression to get the username in the dataset parameter
It worked.
Please mail me Working Web viewer Example? its urgent
The Web Viewer Example is in the BIRT runtime download. You can find it here:
http://download.eclipse.org/birt/downloads/
Hi..... I am trying to pass parameters from a jsp page to a birt report.... and the project is been done in spring.. however when i am trying to access the jsp page,i am getting the following error
Unable to load tag handler class "org.eclipse.birt.report.taglib.RequesterTag" for tag "birt:parameterPage"
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
can anyone help me out with this??
Do you have the birt jars in your web app's web-inf/lib directory?
Thanks jason.. some of the jar files were missing... its solved now!
however there's another problem now...
i am getting this following error on trying to pass parameters from jsp page to birt report
javax.servlet.ServletException: File "/webcontent/birt/pages/layout/FramesetFragment.jsp" not found
any solution??
Hi
when i am triyng to access birt report from jsp in spring,the following error is being shown,
- There is no report design object available.
can any1 help??
That error means it can not locate the report. How are you calling it?
On this issue:
Thanks jason.. some of the jar files were missing... its solved now!
however there's another problem now...
i am getting this following error on trying to pass parameters from jsp page to birt report
javax.servlet.ServletException: File "/webcontent/birt/pages/layout/FramesetFragment.jsp" not found
Can you post your jsp? or email it to me?
I'm also getting the The service is not initialized!. Use BirtReportServiceFactory.init(ServletConfig) to init error when trying this example.
I can see that two people 'sfi cucek uni' and 'neill' has already mentioned about it.
Please tell me how to fix this.
Thanks.
What version of BIRT are you using?
if i am sending value with the custom parameter page its working fine.
but if i am not passing value to the custom parameter page it still showing birt parameter page how to remove birt parameter page with custom parameter page. it would be great if a demo report can any one provide
My Birt version is version: Photon (4.8) Build id: I20180516-2000
i have copy birt.tld in Web-Inf\tlds folder
web.xml entry as
/birt.tld
/WEB-INF/tlds/birt.tld
C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\birt-viewer
copy the jar file in path but still not sure about which are the jar file must copy i have copied bundles of jar file Please Mention name of jar file which mandatory
i have configure birt view D:\birt-runtime-4.8.0-20180626\WebViewerExample and when run report place inside this run successfully as example http://localhost:8080/birt-viewer/frameset?__report=Employee.rptdesign
I have place code in Jsp as
contextConfigLocation
/WEB-INF/applicationContext.xml
org.springframework.web.context.ContextLoaderListener
dispatcher
org.springframework.web.servlet.DispatcherServlet
2
dispatcher
/
30
redirect.jsp
/birt.tld
/WEB-INF/tlds/birt.tld
C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\birt-viewer
this Give Error
I think some of jar file missing or something Else
Thanks
Please provide guidance regarding this
I am facing problem of calling Birt Report from JSP
1:- which jar file is required to copy / downloaded
2:- in web.xml i have the entry like
html is not allowed here
3:- My jsp page
also hmtl tag is not allowed here
I am getting Error Please mention which Step i am missing ?
Thanks
Post a Comment