Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Urgent : Birt Viewer - To Jason
Urgent : Birt Viewer - To Jason [message #256503] Fri, 28 September 2007 08:48 Go to next message
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
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 messageGo to next message
Gaurav  is currently offline Gaurav Friend
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 #689418 is a reply to message #689251] Mon, 27 June 2011 15:48 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

There are a lot of ways this can be done. Probably the simplest way is
to use the tag libs. See:
http://www.eclipse.org/birt/phoenix/deploy/viewerUsageMain.php#tags

Jason

On 6/27/2011 5:06 AM, Gaurav wrote:
>
> Hi Jason
>
> Could you please advise on how a web application can be embedded to birt
> viewer application?
>
> Thanks much in anticipation
>
> Gaurav
>
>
Re: Urgent : Birt Viewer - To Jason [message #689661 is a reply to message #689418] Tue, 28 June 2011 06:23 Go to previous messageGo to next message
Gaurav  is currently offline Gaurav Friend
Messages: 20
Registered: June 2011
Junior Member
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 #689896 is a reply to message #689661] Tue, 28 June 2011 14:56 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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 #690162 is a reply to message #689896] Wed, 29 June 2011 05:18 Go to previous messageGo to next message
Gaurav  is currently offline Gaurav Friend
Messages: 20
Registered: June 2011
Junior Member

Thanks for the prompt reply Jason.

Will have a look and get back if I have any more issues.

Cheers
Re: Urgent : Birt Viewer - To Jason [message #710848 is a reply to message #690162] Fri, 05 August 2011 13:29 Go to previous messageGo to next message
Yogesh is currently offline YogeshFriend
Messages: 1
Registered: August 2011
Location: Bangalore
Junior Member
HI,,I am Not able to display the prameterPage defn values please send simle zip file to birt Web reporting project
Re: Urgent : Birt Viewer - To Jason [message #713646 is a reply to message #710848] Mon, 08 August 2011 17:29 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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
Previous Topic:execute DML in events, execution order of DataSets
Next Topic:Integrating BIRT with Maven
Goto Forum:
  


Current Time: Fri Mar 29 10:12:09 GMT 2024

Powered by FUDForum. Page generated in 0.03746 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top