Urgent : Birt Viewer - To Jason [message #256503] |
Fri, 28 September 2007 08:48 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: suryakant.in.ibm.com
Hello,
I am trying to generate report using Report engine APIs . Currently am
using scripted data source. When i am using the APIs, am adding the java
class to the application context before starting the platfrom and engine :
HashMap a_HashMap = m_oEngConfig.getAppContext();
a_HashMap.put("BeanReport", oBeanReport);
m_oEngConfig.setAppContext(a_HashMap);
Platform.startup(m_oEngConfig);
IReportEngineFactory a_EngineFactory = (IReportEngineFactory)Platform
createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_EN GINE_FACTORY);
m_ReportEngine = a_EngineFactory.createReportEngine(m_oEngConfig);
and the report is working fine and am able to generate Report.
But now the situation demands the use of BIRT VIEWER .. so am passing the
report name as parameter to birt viewer which is deployed along with my
web application :
" http://localhost:9080/Birt/frameset?__report=ReqsListingRepo rt.rptdesign";
and it was giving error as i expected : BeanReport not defined.
How shd i add the following class to the context of BirtViewer
Also, is there any other way to let my classes accessed by the Birt Viewer
so that i can use scripted data source and have my java classes provide
the data to the report.
do i need to modify the Web.xml file of birtviewer or to place the class
files in the lib directory or to the scriptlib directory of BirtViewer.
Furthur we also have the option to set the system propery before starting
the platform, but i have no idea when and where to set that property in
Viewer.
System.setProperty(
EngineConstants.WEBAPP_CLASSPATH_KEY,"./myclasses/myjars.jar " );
Thank You
|
|
|
Re: Urgent : Birt Viewer - To Jason [message #256532 is a reply to message #256503] |
Fri, 28 September 2007 14:47 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Surya
Take a look at this example for adding objects to the appcontext for the
viewer.
http://wiki.eclipse.org/Adding_an_Object_to_the_Application_ Context_for_the_Viewer_%28BIRT%29
Also if you jar your class and add to the web viewer WEB-INF/lib
directory it should be accessible to the report script.
Jason
surya wrote:
> Hello,
> I am trying to generate report using Report engine APIs . Currently am
> using scripted data source. When i am using the APIs, am adding the java
> class to the application context before starting the platfrom and engine :
>
> HashMap a_HashMap = m_oEngConfig.getAppContext();
> a_HashMap.put("BeanReport", oBeanReport);
> m_oEngConfig.setAppContext(a_HashMap);
>
> Platform.startup(m_oEngConfig);
>
> IReportEngineFactory a_EngineFactory = (IReportEngineFactory)Platform
> createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_EN GINE_FACTORY);
>
> m_ReportEngine = a_EngineFactory.createReportEngine(m_oEngConfig);
>
> and the report is working fine and am able to generate Report.
> But now the situation demands the use of BIRT VIEWER .. so am passing
> the report name as parameter to birt viewer which is deployed along with
> my web application :
> " http://localhost:9080/Birt/frameset?__report=ReqsListingRepo rt.rptdesign";
>
> and it was giving error as i expected : BeanReport not defined.
>
> How shd i add the following class to the context of BirtViewer
> Also, is there any other way to let my classes accessed by the Birt
> Viewer so that i can use scripted data source and have my java classes
> provide the data to the report.
>
> do i need to modify the Web.xml file of birtviewer or to place the class
> files in the lib directory or to the scriptlib directory of BirtViewer.
>
> Furthur we also have the option to set the system propery before
> starting the platform, but i have no idea when and where to set that
> property in Viewer.
> System.setProperty(
> EngineConstants.WEBAPP_CLASSPATH_KEY,"./myclasses/myjars.jar " );
>
> Thank You
|
|
|
Re: Urgent : Birt Viewer - To Jason [message #256610 is a reply to message #256532] |
Fri, 28 September 2007 18:41 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: suryakant.in.ibm.com
Hello Jason,
Thanks for the reply. That link provided me really good informations.
But that is not working for me and also i cannot currently use the option
of placing the jar in the lib directory as the BIRT Viewer and My Web
application are currently deployed as seperate Web application on the
same server.
and the java files need to accessed by both the applications..
First My Web application will call the java classes and wud store the data
in the Lists and later they will be used in the report for retrieving
data
Since they are deployed as seperate application . we cannot pass any value
thru session as they are application specific or thru
request.setAttribute().
also that is not a recommended thing to use them as two seperate
application..
Could you pls help me in combining the two application as one.. Or is
their any alternative for this.
Thank You very much for your support and reply
Surya
|
|
|
Re: Urgent : Birt Viewer - To Jason [message #256614 is a reply to message #256610] |
Fri, 28 September 2007 19:19 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Surya,
I really can't think of an alternative. I would say use the tag libs,
but you would have the same issue about sharing objects across context.
What issues are you having combining the apps?
Jason
surya wrote:
> Hello Jason,
> Thanks for the reply. That link provided me really good informations.
> But that is not working for me and also i cannot currently use the
> option of placing the jar in the lib directory as the BIRT Viewer and My
> Web application are currently deployed as seperate Web application on
> the same server.
> and the java files need to accessed by both the applications..
> First My Web application will call the java classes and wud store the
> data in the Lists and later they will be used in the report for
> retrieving data Since they are deployed as seperate application . we
> cannot pass any value thru session as they are application specific or
> thru request.setAttribute().
>
> also that is not a recommended thing to use them as two seperate
> application..
> Could you pls help me in combining the two application as one.. Or is
> their any alternative for this.
>
> Thank You very much for your support and reply Surya
>
|
|
|
Re: Urgent : Birt Viewer - To Jason [message #689251 is a reply to message #256614] |
Mon, 27 June 2011 09:06 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Gaurav ![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=gauravspdalal%40gmail.com) Messages: 20 Registered: June 2011 |
Junior Member |
|
|
Hi Jason
Could you please advise on how a web application can be embedded to birt viewer application?
My setup includes a struts application with jsps containing dropdowns to provide the report parameters.
My requirement is such that I have to use java code to query the DB fetch my results and populate java objects, which are then referenced by the report design in the Open and Fetch scripts.(Scripted data source reports)
Then I want to use the Birt viewer to display the reports in a frameset , but the problem at hand is how do I provide a reference of the populated java objects within my struts application to the report scripts? Can i provide the war path within the web.xml param BIRT_VIEWER_SCRIPTLIB_DIR ?
Thanks much in anticipation
Gaurav
[Updated on: Mon, 27 June 2011 09:45] Report message to a moderator
|
|
|
|
|
Re: Urgent : Birt Viewer - To Jason [message #689896 is a reply to message #689661] |
Tue, 28 June 2011 14:56 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
The issue you may have is that even if you push the objects over with
the reportContext you may get a classpath issue when using the objects,
requiring your classes be in two locations (both webapps). You could
try generating a rptdocument in your one webapp using the re api run
task and then specifying the the second webapp use the rptdocument with
the reportDocument tag attribute. I am not certain if the second app
will need the classes in this situation.
Jason
On 6/28/2011 2:23 AM, Gaurav wrote:
> Hi Jason
>
> Thanks for the reply.
>
> I have a query related to that.
> My setup includes a struts application with jsps containing dropdowns to
> provide the report parameters.
> My requirement is such that I have to use java code to query the DB
> fetch my results and populate java objects, which are then referenced by
> the report design in the Open and Fetch scripts.(Scripted data source
> reports)
>
> Then I want to use the Birt viewer to display the reports in a
> frameset(for which I am using the birt.tld tags) , but the problem at
> hand is how do I provide a reference of the populated java objects
> within my struts application to the report scripts? Can i provide the
> war path within the web.xml param BIRT_VIEWER_SCRIPTLIB_DIR ?
>
> Should I seperate out the java objects into a seperate jar file,provide
> its reference in both the web apps and then transfer data via
> reportContext? Is this feasible and is it a good practice?
|
|
|
|
|
Re: Urgent : Birt Viewer - To Jason [message #713646 is a reply to message #710848] |
Mon, 08 August 2011 17:29 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
|
Are you needing an example of using the parameterPage tag library?
Jason
On 8/5/2011 9:29 AM, Yogesh wrote:
> HI,,I am Not able to display the prameterPage defn values please send
> simle zip file to birt Web reporting project
|
|
|
Powered by
FUDForum. Page generated in 0.04600 seconds