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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delivery rule, need to not send report when it contains no value

Status
Not open for further replies.

nattyborneo

Technical User
Feb 1, 2011
29
DE
Dear all,

in publication, there is function for delivery rule.
Deliver individual document when condition is met
then I choose deliver only when report contains data

I already put formula in the report, to supress report if no value. So it means if there is no value, report will be empty.

but somehow when I run publication.
These empty reports are still come with the not empty reports.

Any one has idea , how to only deliver not empty reports?
thx

rgds,
Nat
 
I use some SQL code so that the report fails if there is no data to send.

Kevin.
 
Hi Kelvin,

may you share the code?
how to make it fails?

rgds,
Nat
 
Basically in the SQL code I put in:

update #ktemp
set TOUPDATE = 'Y'
where TOUPDATE = 'N'
if @@rowcount = 0 raiserror 31000 'no rows'

I create a temp table and add a column to update. If there is no data and therefore no update made the code errors out and stops the report from running.

Hope it helps.

Kevin.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top