Sunday, February 19, 2012

How to Stop or Abort Report Processing

Is there a way to stop report processing based on evaluating a report
parameter? If the paramater fails to meet a certain requirement I would like
to stop report. I've come up with a work around to return no data in these
scenarios. But I would like to stop report processing all together and avoid
making a trip to the database. Is there a method or something that can be
called from the code window?
Thanks in advance for the help!Rob,
You can validate the format of the parameters if you go to the report.
Then click on the report in the toolbar => parameters => and then there
is a drop down for every parameter on what kind of parameter it is.
You can also control this in the ReportManager. I mean by going to a
certain report in report manager => properties => Parameters.
You can also do your own validation in the report Code.
regards,
Stas K.|||I understand this and I am doing my own validation. However, I would like to
know if there is a way to cancel or stop report from executing when a certain
condition is not met. What I want to avoid in an unnecesary trip to execute
query and return no results. Or is simply hiding the results of the report
using visible property the only solution?
"Sorcerdon" wrote:
> Rob,
> You can validate the format of the parameters if you go to the report.
> Then click on the report in the toolbar => parameters => and then there
> is a drop down for every parameter on what kind of parameter it is.
> You can also control this in the ReportManager. I mean by going to a
> certain report in report manager => properties => Parameters.
> You can also do your own validation in the report Code.
> regards,
> Stas K.
>|||Do you have a front end to run these reports? some kind of web
application? or are you using report manager?
For example, all of my reports are running off a C# application that
has all the validation in it - and if something is inproper in the
parameters being passed I have an user friendly exception thrown.
Basically I have a Frame tag inside a panel tag that has visible=false
and where the source of the frame is set to some "user friendly error
HTML page". Once the user clicks the Run Report button of my C#
application, I set the Source of that frame to the ReportString and I
set the panel in which that frame is located to Visible=true.
This way, the report is never touched until everything is set and
validated.
I don't know if this is possible in ReportManger.
regards,
Stas K.|||Yes. I'm running my reports using the same technique and accessing those
reports using the URL method. I'm using the Visual Studio report designer to
create the reports. If the user tampers with the query string I would like to
abort report processing all together. I'm hoping someone knowledgeable with
using the code window and expressions can tell me if this is possible.
"Sorcerdon" wrote:
> Do you have a front end to run these reports? some kind of web
> application? or are you using report manager?
> For example, all of my reports are running off a C# application that
> has all the validation in it - and if something is inproper in the
> parameters being passed I have an user friendly exception thrown.
> Basically I have a Frame tag inside a panel tag that has visible=false
> and where the source of the frame is set to some "user friendly error
> HTML page". Once the user clicks the Run Report button of my C#
> application, I set the Source of that frame to the ReportString and I
> set the panel in which that frame is located to Visible=true.
> This way, the report is never touched until everything is set and
> validated.
> I don't know if this is possible in ReportManger.
> regards,
> Stas K.
>

No comments:

Post a Comment