Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation in SQL Report

Status
Not open for further replies.

meny21

IS-IT--Management
Oct 4, 2002
101
MX
Hi Guys,

I got a question with SQL Reporting Services.

Is there a possibility (before running a report) to check one field in a table with a condition in order to specify to continue running a report?

For example, I run my report, then this one check a table with a field called Not_Run="Y" and then my report check this variable and decide not to run or continue?

I think is confussing but maybe something can be done...

Thanks for any help

MR
 
If you are using a stored procedure then this is no problem - simply do a sub query in the SP - test the result and then determine whether to carry on or cancel the execution

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Hi xlbo!

Thanks for your information, yes a Stored Procedure can work but I'm accesing a DataBase that is in other environment different than SQL and doesn't use SP ;O(

That's why I'm looking for another option in the same report... Do you think can I do another option?

Thanks!
 
I am not aware of another option I'm afraid - all our databases are SQL Server so use Stored Procs all the time

Basically, you can't really do it in a query so you will need an intermediate process / bit of code (similar to Stored Proc) that can evaluate whether or not to run the query

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Ok, Thanks for your help xlbo! I'm going to try another option...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top