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

checking for empty data from within .net

Status
Not open for further replies.

ratjetoes

Programmer
May 24, 2002
30
NL
hi,

i want to check if the report has empty data so i can display a custom message instead of showing an empty report.

t.i.a.,
ratjetoes.
 
You could execute the sql or stored procedure for the report and then read the result and display the message if no records are returned before calling the report.


Regards
Chuck LaRue
ADRS Computer Services
 
You could use a formula like the following in the report header:

if isnull({table.ID}) then "No Report Results"

...where {table.ID} is a field that recurs with each record.

-LB
 
hi,

tnx 4 your responses. i like the third option best, but the thing is, i can't find the method???

code:

Me.oRpt = New CrystalDecisions.CrystalReports.Engine.ReportDocument
Me.oRpt.Load(Server.MapPath("reportName.rpt"))

According to the article, something like Me.oRpt.ReadRecords should be available. Anyone an idea to what namespace the method belongs?

t.i.a.,
ratjetoes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top