Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Suppress Lines Post Reply Post New Topic
Author Message
useless
Newbie
Newbie


Joined: 21 Sep 2012
Online Status: Offline
Posts: 3
Quote useless Replybullet Topic: Suppress Lines
     Posted: 21 Sep 2012 at 1:04am
I am having trouble to suppress lines with no data.
The lines look like this
ItemNo   Descrip QTY QTY QTY QTY
0011abc black     0    0    0    0
0022def green     5    8    0    1

I want to suppress the line if there is no QTYs for the line.
In the detail line I have the following fields
Table.ItmRef, table.Desc, table.QTY1, table.QTY2 etc.

I went to the field properties -> commen -> suppress formula and added the following
if ({ITMMVT.PHYSTO_0} = 0)
    and ({ITMMVT.CTLSTO_0} = 0)
    and ({ITMMVT.REJSTO_0} = 0)
    and ({ITMMVT.PHYALL_0} = 0)
    and ({ITMMVT.CTLALL_0} = 0)
    and ({ITMMVT.REJALL_0} = 0)
    and ({ITMMVT.PLFPHYSTO_0} = 0)
    and ({ITMMVT.PLFCTLSTO_0} = 0)
    and ({ITMMVT.PLFREJSTO_0} = 0)
    and ({ITMMVT.ORDSTO_0} = 0)
    and ({ITMMVT.SALSTO_0} = 0)
    and ({ITMMVT.DETSHT_0} = 0)
    and ({ITMMVT.GLOSHT_0} = 0)
    and ({ITMMVT.GLOALL_0} = 0)
then true
else false

It suppresses the line but it leaves a gap between the lines eg.
ItemNo   Descrip QTY QTY QTY QTY
                   
0022def green     5    8    0    1
0033efg yellow    0    1    5    9

0084aed green     4    2    0    0

9800qwe white     1    2    3    4

How do I resolve this problem???
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 21 Sep 2012 at 4:19am
Use your suppress formula in the Section Expert for your details section instead of on the fields.  Also, you don't really need the "If..then true else false" because your expression already evaluates to true or false.  An even easier way to do this would be something like this:
 
{ITMMVT.PHYSTO_0} + {ITMMVT.CTLSTO_0} + {ITMMVT.REJSTO_0} +
{ITMMVT.PHYALL_0} + {ITMMVT.CTLALL_0} + {ITMMVT.REJALL_0} +
{ITMMVT.PLFPHYSTO_0} + {ITMMVT.PLFCTLSTO_0} + 
{ITMMVT.PLFREJSTO_0} + {ITMMVT.ORDSTO_0} + {ITMMVT.SALSTO_0} +
{ITMMVT.DETSHT_0} + {ITMMVT.GLOSHT_0} + {ITMMVT.GLOALL_0} = 0
 
This will evaluate to True if everything is 0 and false if it's not.
 
-Dell
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum