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

Report Conditions

Status
Not open for further replies.

charbrad

Technical User
Nov 7, 2002
132
US
I have a report that gives total pounds produced in a day. My question is if there is a way to add a condition to my report so that if lbs = 0 the report will not generate?
 
How are you generating the report in the first place and what type of report is it? An example of your code will help identify a possible solution.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
I apologize for not being clear as I am just beginning to work with ASP. The report is generated using ASP..below is the SQL Query used in the report
Code:
SQLQuery = "SELECT ISNULL(SUM(LaborVariance),0) LaborVariance, ISNULL(SUM(MaterialVariance),0) MaterialVariance, ISNULL(SUM(LBSProduced),0) LBSProduced, CASE WHEN ISNULL(SUM(ConsumedQTY),0) = 0 THEN 0 ELSE ISNULL(SUM(LBSProduced),0)/SUM(ConsumedQTY)*100 END Yield, COUNT(DISTINCT Item) ItemsProduced, COUNT(MO) JobsClosed FROM ReportsMOVariance (NOLOCK) WHERE CloseDate = '" & ReportDate & "'"
rs.Open SQLQuery, MyConn 
p=rs.GetRows()
rs.close
 
Are you sure that is ASP.NET as that looks like ASP code to me? Also, what is this report? Is it an object? Is is a rpt file? Are you writing it to the page as HTML?


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Yes, this is ASP code and it is a report file being written to the page as HTML.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top