Friday, February 24, 2012

Create Error when Exporting to Excel

Is there a way to purposly throw an error when exporting to excel?
What I'm wanting is a way for reports to show up correctly in the browser,
but when users right click and export to excel, it will throw an error or
display garbled.
I posted a question early today regarding disabling right-click, but if that
is not possible, then this may be a work around.
(I still prefer the disabling of right click however ;).
Any suggestions?On Mar 1, 1:40 pm, labsRc...@.community.nospan
<labsRcoolcommunitynos...@.discussions.microsoft.com> wrote:
> Is there a way to purposly throw an error when exporting to excel?
> What I'm wanting is a way for reports to show up correctly in the browser,
> but when users right click and export to excel, it will throw an error or
> display garbled.
> I posted a question early today regarding disabling right-click, but if that
> is not possible, then this may be a work around.
> (I still prefer the disabling of right click however ;).
> Any suggestions?
As far as I know, there's not a way to accomplish this without
sacrificing exporting to the remaining formats. What are you trying to
accomplish in general?
Enrique Martinez
Sr. SQL Server Developer|||Thank you for responding!
This is the background and what we are trying to accomplish:
Background:
We are creating reports that we want certain users to be able to view
regional reports, and drill down to employee detail. The report was great.
However, we do not want users to be tempted to save these reports to their
computer. I already disabled the "export" options from the built in RS
toolbar.
But someone pointed out that users can still right-click with their mouse on
the RS report and select "Export to Excel" - which is undesirable.
Therefore, I thought of two possible solutions:
1) Find a way to capture the mouse right-click event to disable it.
(Like you can via javascript through static html pages, or by setting the
oncontextmenu=false.)
Those methods don't work with RS to disable the click, therefore I'm
searching for a different method to disable it..
OR
2) Another approach I thought of, if I can't disable the click, is find
someone to format the RS Reports, through hidden fields, or something, that
is not compatable with Excel, so that even if they do right click and export
- it won't show them what they want.
The reason for all this is that we don't want user personal information to
be saved on their personal computer.
Any suggestions would be appreciated, thanks!
"EMartinez" wrote:
> On Mar 1, 1:40 pm, labsRc...@.community.nospan
> <labsRcoolcommunitynos...@.discussions.microsoft.com> wrote:
> > Is there a way to purposly throw an error when exporting to excel?
> >
> > What I'm wanting is a way for reports to show up correctly in the browser,
> > but when users right click and export to excel, it will throw an error or
> > display garbled.
> >
> > I posted a question early today regarding disabling right-click, but if that
> > is not possible, then this may be a work around.
> >
> > (I still prefer the disabling of right click however ;).
> >
> > Any suggestions?
> As far as I know, there's not a way to accomplish this without
> sacrificing exporting to the remaining formats. What are you trying to
> accomplish in general?
> Enrique Martinez
> Sr. SQL Server Developer
>|||On Mar 1, 9:07 pm, labsRc...@.community.nospan
<labsRcoolcommunitynos...@.discussions.microsoft.com> wrote:
> Thank you for responding!
> This is the background and what we are trying to accomplish:
> Background:
> We are creating reports that we want certain users to be able to view
> regional reports, and drill down to employee detail. The report was great.
> However, we do not want users to be tempted to save these reports to their
> computer. I already disabled the "export" options from the built in RS
> toolbar.
> But someone pointed out that users can still right-click with their mouse on
> the RS report and select "Export to Excel" - which is undesirable.
> Therefore, I thought of two possible solutions:
> 1) Find a way to capture the mouse right-click event to disable it.
> (Like you can via javascript through static html pages, or by setting the
> oncontextmenu=false.)
> Those methods don't work with RS to disable the click, therefore I'm
> searching for a different method to disable it..
> OR
> 2) Another approach I thought of, if I can't disable the click, is find
> someone to format the RS Reports, through hidden fields, or something, that
> is not compatable with Excel, so that even if they do right click and export
> - it won't show them what they want.
> The reason for all this is that we don't want user personal information to
> be saved on their personal computer.
> Any suggestions would be appreciated, thanks!
> "EMartinez" wrote:
> > On Mar 1, 1:40 pm, labsRc...@.community.nospan
> > <labsRcoolcommunitynos...@.discussions.microsoft.com> wrote:
> > > Is there a way to purposly throw an error when exporting to excel?
> > > What I'm wanting is a way for reports to show up correctly in the browser,
> > > but when users right click and export to excel, it will throw an error or
> > > display garbled.
> > > I posted a question early today regarding disabling right-click, but if that
> > > is not possible, then this may be a work around.
> > > (I still prefer the disabling of right click however ;).
> > > Any suggestions?
> > As far as I know, there's not a way to accomplish this without
> > sacrificing exporting to the remaining formats. What are you trying to
> > accomplish in general?
> > Enrique Martinez
> > Sr. SQL Server Developer
Have you considered using a custom front-end ASP.NET application to
accomplish this, since it would be much more dynamic?
Enrique Martinez
Sr. SQL Server Developer|||I will try this, thanks!
"EMartinez" wrote:
> On Mar 1, 9:07 pm, labsRc...@.community.nospan
> <labsRcoolcommunitynos...@.discussions.microsoft.com> wrote:
> > Thank you for responding!
> >
> > This is the background and what we are trying to accomplish:
> >
> > Background:
> > We are creating reports that we want certain users to be able to view
> > regional reports, and drill down to employee detail. The report was great.
> > However, we do not want users to be tempted to save these reports to their
> > computer. I already disabled the "export" options from the built in RS
> > toolbar.
> >
> > But someone pointed out that users can still right-click with their mouse on
> > the RS report and select "Export to Excel" - which is undesirable.
> >
> > Therefore, I thought of two possible solutions:
> > 1) Find a way to capture the mouse right-click event to disable it.
> > (Like you can via javascript through static html pages, or by setting the
> > oncontextmenu=false.)
> > Those methods don't work with RS to disable the click, therefore I'm
> > searching for a different method to disable it..
> >
> > OR
> >
> > 2) Another approach I thought of, if I can't disable the click, is find
> > someone to format the RS Reports, through hidden fields, or something, that
> > is not compatable with Excel, so that even if they do right click and export
> > - it won't show them what they want.
> >
> > The reason for all this is that we don't want user personal information to
> > be saved on their personal computer.
> >
> > Any suggestions would be appreciated, thanks!
> >
> > "EMartinez" wrote:
> > > On Mar 1, 1:40 pm, labsRc...@.community.nospan
> > > <labsRcoolcommunitynos...@.discussions.microsoft.com> wrote:
> > > > Is there a way to purposly throw an error when exporting to excel?
> >
> > > > What I'm wanting is a way for reports to show up correctly in the browser,
> > > > but when users right click and export to excel, it will throw an error or
> > > > display garbled.
> >
> > > > I posted a question early today regarding disabling right-click, but if that
> > > > is not possible, then this may be a work around.
> >
> > > > (I still prefer the disabling of right click however ;).
> >
> > > > Any suggestions?
> >
> > > As far as I know, there's not a way to accomplish this without
> > > sacrificing exporting to the remaining formats. What are you trying to
> > > accomplish in general?
> >
> > > Enrique Martinez
> > > Sr. SQL Server Developer
> Have you considered using a custom front-end ASP.NET application to
> accomplish this, since it would be much more dynamic?
> Enrique Martinez
> Sr. SQL Server Developer
>|||It sounds to me like you are trying to lock this down too much... I
mean, if a user really wants to save the data, then they can...Select
all, copy and paste or print screen etc. There will always be a
workaround. Hence, I think the goal is unrealistic and you may just
have to trust the users to act responsibly to some degree.
However, if you really need to, you could create your own interface to
the reporting services web service as someone already suggested.
however, there will be many things you have to think of if you really
want to prevent saving the report data locally.

No comments:

Post a Comment