Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » selectively disabling "export to excel" option
selectively disabling "export to excel" option [message #702611] Tue, 26 July 2011 15:21 Go to next message
rigimma-467 is currently offline rigimma-467Friend
Messages: 1
Registered: July 2011
Junior Member
I'm using BIRT 2.6.2.
Is there a way to disable the option to export to excel, but only for SOME reports?
Alternatively, passing a URL parameter indicating if export to excel should be enabled is also a good option.
Re: selectively disabling "export to excel" option [message #702839 is a reply to message #702611] Tue, 26 July 2011 21:52 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Look at ExportReportDialogFragment.jsp in the
webcontent/birt/pages/dialog directory of the web viewer.
In this code you can get the report name like:
String rpt = ParameterAccessor.PARAM_REPORT;

You should be able to use this with the if statement:
if ( !ParameterAccessor.PARAM_FORMAT_HTML.equalsIgnoreCase(
supportedFormats[i] ) )

To drop the excel export option.


Jason


On 7/26/2011 11:21 AM, rigimma-467 wrote:
> I'm using BIRT 2.6.2.
> Is there a way to disable the option to export to excel, but only for
> SOME reports?
> Alternatively, passing a URL parameter indicating if export to excel
> should be enabled is also a good option.
Re: selectively disabling "export to excel" option [message #1443809 is a reply to message #702611] Mon, 13 October 2014 08:34 Go to previous messageGo to next message
Sebastian Dine is currently offline Sebastian DineFriend
Messages: 2
Registered: October 2014
Junior Member
Hello,
I am also searching for a way, to selectively enabling export options in BIRT reports.
IsnĀ“t there a way, you can define this in the report itself?
Maybe using a script?
Re: selectively disabling "export to excel" option [message #1444667 is a reply to message #702839] Tue, 14 October 2014 11:28 Go to previous message
Sebastian Dine is currently offline Sebastian DineFriend
Messages: 2
Registered: October 2014
Junior Member
Jason Weathersby wrote on Tue, 26 July 2011 21:52
Look at ExportReportDialogFragment.jsp in the
webcontent/birt/pages/dialog directory of the web viewer.
In this code you can get the report name like:
String rpt = ParameterAccessor.PARAM_REPORT;

You should be able to use this with the if statement:
if ( !ParameterAccessor.PARAM_FORMAT_HTML.equalsIgnoreCase(
supportedFormats[i] ) )

To drop the excel export option.
.


I tried to access the report name through ParameterAccessor.PARAM_REPORT but only got the default value "__report".
How can I access the report name or even the report id?
Previous Topic:Subtitle for a chart
Next Topic:BIRT 3.7 emitter dependencies
Goto Forum:
  


Current Time: Sun Dec 21 15:51:56 GMT 2014

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

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