CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Hide Display of Titles if no records are found

Print topic Send  topic

Author Message
Bill Church
Posted: 04/18/2002, 2:06 PM

Okay, this one's got me stumped. I browsed the articles and threads here and haven't found out how to get rid of it.

I have a grid form, if it doesn't return any rows I don't want the titles displayed along with the NoRecords html. I'm using ASP 2.0 with HTML Templates.

The grid name is SiteJobs

I assume I need to do something like:

if SiteJobsNoRecords = True then
SetVar "FormSiteJobs",""
Exit Sub
end if

But if I set the above to True or False it either hides the form all the time or displays it all the time regardless of records returned. HELP!

Nicole
Posted: 04/19/2002, 1:53 AM

Bill,
to find whether the recordset is empty you should build full sql statement and execute it. While no records are returned, hide the form. E.g.:
sSQLcheck = sSQL & sWhere & sOrder
openrs rscheck, sSQLcheck
if rscheck.eof then
SetVar "FormFormName", ""
exit sub
end if
Bill Church
Posted: 04/19/2002, 5:29 AM

You're up pretty late or really early! :)

That did it. Boy if feel like a goob, I was about 2 feet away from trying that. I guess I was just looking at it too hard.

Thanks for the help.

-Bill

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.