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!

Getting the no of records read from ASP

Status
Not open for further replies.

mukhbens

Programmer
Jan 12, 2001
3
US
hi,
Is there a way to find out how many records have been fetched by the crystal report after passing the selection formula.
Actually I want to show the report only if there is data. otherwise I want to display only a message stating "no data found".
I want to export the report only if there is data.
I want to do all this from ASP.
have a look at the following code....

<%
session(&quot;oRpt&quot;).recordselectionformula = SelectionFrmla
if (&quot;there is data&quot;) then
'Export the report in excel.
else
response.write (&quot;No data Found&quot;)
%>
thanking u in advance...
--Mukhben
 
Mukhben: You can use the following:

Report.PrintingStatus.NumberOfRecordSelected to enable you to do what you want.

Hope this helps David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
Dear dcm,
I am sorry but I am not an expert at crystal reports.
Could u please be more elaborate?
what do u mean when u say
Report.PrintingStatus.NumberOfRecordSelected

I mean where do u set this? In ASP or in the rpt file?
Could u please tell me the exact syntax.
Thanks a lot.
--Mukhben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top