Skip to main content



      Home
Home » Archived » BIRT » Passing parameters to WebViewer
Passing parameters to WebViewer [message #211305] Fri, 12 January 2007 14:27 Go to next message
Eclipse UserFriend
Originally posted by: aparasur.ugs.com

Hi,
How can I pass parameters e.g. reportTitle, projectName programmatically to
the WebViewer from an RCP application and avoid the Parameters dialog from
popping up?

Thanks.
-Arvind
Re: Passing parameters to WebViewer [message #211460 is a reply to message #211305] Sun, 14 January 2007 15:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Jeff.thisplace.com

Hi Arvind:

I am new to this, but I had read that you can pass the report parameters via
"get" URL encoding. For example, a report with a parameter of "name" could
be set with a url such as:

http://host:port/app?name=value

Again, I am new to this. But this is my understanding.

Jeff

"Arvind Parasuram" <aparasur@ugs.com> wrote in message
news:eo8ngc$eq7$1@utils.eclipse.org...
> Hi,
> How can I pass parameters e.g. reportTitle, projectName programmatically
> to the WebViewer from an RCP application and avoid the Parameters dialog
> from popping up?
>
> Thanks.
> -Arvind
>
>
Re: Passing parameters to WebViewer [message #211476 is a reply to message #211305] Sun, 14 January 2007 20:54 Go to previous messageGo to next message
Eclipse UserFriend
yes.sure you can make it.
just declare the parameter in your rptdesign, and at the script, initiaze
method, declare it... like param["yourparametername"]
Re: Passing parameters to WebViewer [message #211615 is a reply to message #211476] Mon, 15 January 2007 19:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aparasur.ugs.com

I didn't quite follow your suggestion.
Here is how I am invoking the WebViewer from my wizard...

String projectName = m_reportPage.getProjectName();
String reportTitle = m_reportPage.getReportTitle();
String reportDesignFileName =
m_reportPage.getReportDesignFileName();
try
{
ModuleHandle handle = SessionHandleAdapter.getInstance()
.getSessionHandle()
.openDesign( reportDesignFileName );

System.setProperty( "RUN_UNDER_ECLIPSE", "true" );
WebViewer.startup( null );
WebViewer.display( reportDesignFileName, ReportViewer.PDF );
handle.close();
}
catch ( Exception e )
{
e.printStackTrace();
}

I want to be able to pass in the projectName and reportTitle to the
WebViewer.
I have defined projectName and reportTitle as parameters in the report
design and when the WebViewer runs, it pops up a dialog that prompts me for
values for these two parameters.
I want to prevent this dialog from showing up as I already have the values
and jsut need to pass them in.
How do I do that?

Thanks.
-Arvind



"70" <klhuang@shinyang.com.my> wrote in message
news:bd04a60986a0ba1f5e17f3482fc06246$1@www.eclipse.org...
> yes.sure you can make it.
> just declare the parameter in your rptdesign, and at the script, initiaze
> method, declare it... like param["yourparametername"]
>
Re: Passing parameters to WebViewer [message #211631 is a reply to message #211615] Tue, 16 January 2007 00:57 Go to previous messageGo to next message
Eclipse UserFriend
you can set the parameter as "hidden"...
Re: Passing parameters to WebViewer [message #211688 is a reply to message #211631] Tue, 16 January 2007 10:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aparasur.ugs.com

This still didn't answer the question. It would help if you looked at the
code below and explained how the parameter needs to be passed in the java
code. This code is in a wizard implementation, not in a report design
handler.

Thanks.

String projectName = m_reportPage.getProjectName();
String reportTitle = m_reportPage.getReportTitle();
String reportDesignFileName =
m_reportPage.getReportDesignFileName();
try
{
ModuleHandle handle = SessionHandleAdapter.getInstance()
.getSessionHandle()
.openDesign( reportDesignFileName );

System.setProperty( "RUN_UNDER_ECLIPSE", "true" );
WebViewer.startup( null );
WebViewer.display( reportDesignFileName, ReportViewer.PDF );
handle.close();
}
catch ( Exception e )
{
e.printStackTrace();
}



"70" <klhuang@shinyang.com.my> wrote in message
news:2049005f80f8142adb9ebdef3dd3b9ea$1@www.eclipse.org...
> you can set the parameter as "hidden"...
>
Re: Passing parameters to WebViewer [message #211694 is a reply to message #211631] Tue, 16 January 2007 10:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aparasur.ugs.com

Hi,
This still doesn't explain how I can pass the parameters to the WebViewer
class in the java code shown below. This java code is in a wizard
implementation, not in the report design handler.
How do I pass projectName and reportTitle to the WebViewer class?
There is no method on the WebViewer class that processes parameters. I
tried passing it on the URL, but couldn't get that to work either.
An example would help.

Thanks.
-Arvind

String projectName = m_reportPage.getProjectName();
String reportTitle = m_reportPage.getReportTitle();
String reportDesignFileName =
m_reportPage.getReportDesignFileName();
try
{
ModuleHandle handle = SessionHandleAdapter.getInstance()
.getSessionHandle()
.openDesign( reportDesignFileName );

System.setProperty( "RUN_UNDER_ECLIPSE", "true" );
WebViewer.startup( null );
WebViewer.display( reportDesignFileName, ReportViewer.PDF );
handle.close();
}
catch ( Exception e )
{
e.printStackTrace();
}


"70" <klhuang@shinyang.com.my> wrote in message
news:2049005f80f8142adb9ebdef3dd3b9ea$1@www.eclipse.org...
> you can set the parameter as "hidden"...
>
Re: Passing parameters to WebViewer [message #211921 is a reply to message #211694] Tue, 16 January 2007 17:43 Go to previous message
Eclipse UserFriend
Originally posted by: aparasur.ugs.com

Never mind. I figured out the problem.

Thanks.
-Arvind

"Arvind Parasuram" <aparasur@ugs.com> wrote in message
news:eoiq52$ef9$2@utils.eclipse.org...
> Hi,
> This still doesn't explain how I can pass the parameters to the WebViewer
> class in the java code shown below. This java code is in a wizard
> implementation, not in the report design handler.
> How do I pass projectName and reportTitle to the WebViewer class?
> There is no method on the WebViewer class that processes parameters. I
> tried passing it on the URL, but couldn't get that to work either.
> An example would help.
>
> Thanks.
> -Arvind
>
> String projectName = m_reportPage.getProjectName();
> String reportTitle = m_reportPage.getReportTitle();
> String reportDesignFileName =
> m_reportPage.getReportDesignFileName();
> try
> {
> ModuleHandle handle = SessionHandleAdapter.getInstance()
> .getSessionHandle()
> .openDesign( reportDesignFileName );
>
> System.setProperty( "RUN_UNDER_ECLIPSE", "true" );
> WebViewer.startup( null );
> WebViewer.display( reportDesignFileName, ReportViewer.PDF );
> handle.close();
> }
> catch ( Exception e )
> {
> e.printStackTrace();
> }
>
>
> "70" <klhuang@shinyang.com.my> wrote in message
> news:2049005f80f8142adb9ebdef3dd3b9ea$1@www.eclipse.org...
>> you can set the parameter as "hidden"...
>>
>
>
Previous Topic:Overlapping layout
Next Topic:Error when I create a factory with the Platform
Goto Forum:
  


Current Time: Thu May 08 23:48:15 EDT 2025

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

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

Back to the top