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!

Supprressing zeros in a row

Status
Not open for further replies.

leslied

MIS
May 29, 2003
108
US
Is there a way to suppress a row that has all zeros in it?
For example:

Item Amt Amt AMt Amt Total

Item Name 0.00 0.00 0.00 0.00 0.00
Item Name 1.00 1.00 0.00 1.00 3.00

What i want to do is supress the row where the item name(doesn't matter what item name it is) contains zero amount throughout.

Thanks
 
Hi

Why not suppress it in the underlying query on which the report/form is based with a suitable criteria, if you are not using a query, then paerhaps you should be

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
I am using a query.... but i don't know how to do it...

This is the SQL for the query:

SELECT [account] & " " & [project] & " " & [sof] & " " & [sector] & " " & [lastcode] AS udak_field, dbo_DCA_ldr_acct_bal_ext.ministry, qry_ministry.ministry_desc AS min_desc, dbo_DCA_ldr_acct_bal_ext.program, qry_program.prog_desc, dbo_DCA_ldr_acct_bal_ext.subprog, qry_subprog.subprog_desc AS sub_desc, dbo_DCA_ldr_acct_bal_ext.account, dbo_DCA_ldr_acct_bal_ext.project, dbo_DCA_ldr_acct_bal_ext.sof, dbo_DCA_ldr_acct_bal_ext.sector, dbo_DCA_ldr_acct_bal_ext.lastcode, dbo_DCA_ldr_acct_bal_ext.acct_descp_1, dbo_DCA_ldr_acct_bal_ext.acct_descp_2, dbo_DCA_ldr_acct_bal_ext.auth, dbo_DCA_ldr_acct_bal_ext.estm, dbo_DCA_ldr_acct_bal_ext.prevbal, dbo_DCA_ldr_acct_bal_ext.total, dbo_DCA_ldr_acct_bal_ext.per_amt, IIf([estm]=0 And [auth]=0 And [per_amt]=0,0,1) AS Expr1, dbo_DCA_ldr_acct_bal_ext.soc, dbo_DCA_ldr_acct_bal_ext.soc_chr, qry_soc.soc_desc, [auth]-[total] AS bal, qry_period.END AS prd_end_date
FROM ((((dbo_DCA_ldr_acct_bal_ext LEFT JOIN qry_ministry ON dbo_DCA_ldr_acct_bal_ext.ministry = qry_ministry.ministry_id) LEFT JOIN qry_program ON dbo_DCA_ldr_acct_bal_ext.program = qry_program.program) LEFT JOIN qry_subprog ON dbo_DCA_ldr_acct_bal_ext.subprog = qry_subprog.subprog) LEFT JOIN qry_period ON dbo_DCA_ldr_acct_bal_ext.period = qry_period.pd_nbr) LEFT JOIN qry_soc ON dbo_DCA_ldr_acct_bal_ext.soc = qry_soc.soc
WHERE (((dbo_DCA_ldr_acct_bal_ext.account) Not In ("99999","REV","EXP")));


can you figure this one out?

Thanks
 
HI

you need to extend the WHERE cluase, but you do not say which columns in the query equate with which column in the query, so I can only give a limited example

SELECT [account] & " " & [project] & " " & [sof] & " " & [sector] & " " & [lastcode] AS udak_field, dbo_DCA_ldr_acct_bal_ext.ministry, qry_ministry.ministry_desc AS min_desc, dbo_DCA_ldr_acct_bal_ext.program, qry_program.prog_desc, dbo_DCA_ldr_acct_bal_ext.subprog, qry_subprog.subprog_desc AS sub_desc, dbo_DCA_ldr_acct_bal_ext.account, dbo_DCA_ldr_acct_bal_ext.project, dbo_DCA_ldr_acct_bal_ext.sof, dbo_DCA_ldr_acct_bal_ext.sector, dbo_DCA_ldr_acct_bal_ext.lastcode, dbo_DCA_ldr_acct_bal_ext.acct_descp_1, dbo_DCA_ldr_acct_bal_ext.acct_descp_2, dbo_DCA_ldr_acct_bal_ext.auth, dbo_DCA_ldr_acct_bal_ext.estm, dbo_DCA_ldr_acct_bal_ext.prevbal, dbo_DCA_ldr_acct_bal_ext.total, dbo_DCA_ldr_acct_bal_ext.per_amt, IIf([estm]=0 And [auth]=0 And [per_amt]=0,0,1) AS Expr1, dbo_DCA_ldr_acct_bal_ext.soc, dbo_DCA_ldr_acct_bal_ext.soc_chr, qry_soc.soc_desc, [auth]-[total] AS bal, qry_period.END AS prd_end_date
FROM ((((dbo_DCA_ldr_acct_bal_ext LEFT JOIN qry_ministry ON dbo_DCA_ldr_acct_bal_ext.ministry = qry_ministry.ministry_id) LEFT JOIN qry_program ON dbo_DCA_ldr_acct_bal_ext.program = qry_program.program) LEFT JOIN qry_subprog ON dbo_DCA_ldr_acct_bal_ext.subprog = qry_subprog.subprog) LEFT JOIN qry_period ON dbo_DCA_ldr_acct_bal_ext.period = qry_period.pd_nbr) LEFT JOIN qry_soc ON dbo_DCA_ldr_acct_bal_ext.soc = qry_soc.soc
WHERE (dbo_DCA_ldr_acct_bal_ext.total<>0 AND ((dbo_DCA_ldr_acct_bal_ext.account) Not In (&quot;99999&quot;,&quot;REV&quot;,&quot;EXP&quot;)));


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top