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!

Conditional suppressing on an already suppresed field

Status
Not open for further replies.

NickIntersoft

Technical User
Mar 5, 2007
12
BE
I'm using crystal reports 8,

my detail section is being supressed like this:
{adorecordset_ttx.TypeLijn}='ORK' OR
{adorecordset_ttx.refklbarcode}<>'' and {adorecordset_ttx.Aantal}=0 and {adorecordset_ttx.NEHPRIJS}=0

This works, but when a detail line is linked with this suppressed line. The detail line is still showing.

Is there a way to suppress this linked line too? It always ends in the field {adorecordset_ttx.refklbarcode} on _OMS. But it should only be supressed if the original line was supressed.

Please let me know if you need more info. Or when i don't make a lot of sense...

thanks
Nick
 
I don't know what you mean by a detail line "linked" to a suppressed line. Note that your suppression formula should contain parens to clarify which parts of the "or" statement belong together. Could be one of these:

{adorecordset_ttx.TypeLijn}='ORK' OR
(
{adorecordset_ttx.refklbarcode}<>'' and
{adorecordset_ttx.Aantal}=0 and
{adorecordset_ttx.NEHPRIJS}=0
)

Or,

(
{adorecordset_ttx.TypeLijn}='ORK' OR
{adorecordset_ttx.refklbarcode}<>''
) and
{adorecordset_ttx.Aantal}=0 and
{adorecordset_ttx.NEHPRIJS}=0

-LB
 
Let me try to clarify with an example:

1st detail line= article123
2nd detail line= article123_OMS
...

Now if the 1st line is being suppressed, the 2nd should be also suppressed because it has the same name (i use field {adorecordset_ttx.refklbarcode}) but ends on _OMS
I call it "linked" 'cause it has the same name, but always ends on _OMS.

Grtz
Nick

 
It does not have the same name. As you pointed out, it ends in "_OMS".

So do you want to suppress the field if the previous record has all the same characters prior to "_OMS"?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
The name is the same until _OMS. It's important that the line is only suppressed if the other detail line is already suppressed AND the name is exactly the same until _OMS

thanks
Nick
 
You have to show us the criteria you are using to suppress the first line, since that will need to be used also to suppress the second line. For the second line, you could use something like:

{table.field} startswith previous({table.field})

-LB
 
The first line is supressed on the detail section with:

{adorecordset_ttx.TypeLijn}='ORK' OR
(
{adorecordset_ttx.refklbarcode}<>'' and
{adorecordset_ttx.Aantal}=0 and
{adorecordset_ttx.NEHPRIJS}=0
)

I cannot use the same formula on the the 2nd line, because the fields {adorecordset_ttx.Aantal}and {adorecordset_ttx.NEHPRIJS} stay empty.

Nick
 
Try:

right({adorecordset_ttx.refklbarcode},4) <> "_OMS" and
(
{adorecordset_ttx.TypeLijn}='ORK' OR
(
{adorecordset_ttx.refklbarcode}<>'' and
{adorecordset_ttx.Aantal}=0 and
{adorecordset_ttx.NEHPRIJS}=0
)
) or
right({adorecordset_ttx.refklbarcode},4) = "_OMS" and
(
previous({adorecordset_ttx.TypeLijn})='ORK' OR
(
previous({adorecordset_ttx.refklbarcode}) <>'' and
previous({adorecordset_ttx.Aantal})=0 and
previous({adorecordset_ttx.NEHPRIJS})=0
)
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top