For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Crystal Reports > January 2006 > Suppress if duplicated still uses space on the page









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Suppress if duplicated still uses space on the page
Gav

2006-01-18, 7:07 pm

Hi all,

If you format a field to suppress if duplicated it does give me the desired
effect however the suppressed fields are still taking up blank space on the
page, is there a way to stop this?

Thanks
Gav


Jay Taplin

2006-01-19, 8:04 am

Instead of suppressing the field, I believe you want to suppress the
whole detail section. I'd do this:

1) Go to the suppression formula for the detail section (which is what
I assume you want to suppress)
2) Add the following code:
Shared strLastText As String

If IsNull({Table1.Text1}) Then
If strLastText = "" Then
formula = True
Else
formula = False
End If

strLastText = ""
Else
If strLastText = {Table1.Text1} Then
formula = True
Else
formula = False
End If

strLastText = {Table1.Text1}
End If

3) Change the field name in the above formula to your own field name

That should be it.

Jay Taplin MCP

Gav

2006-01-19, 7:10 pm

Thanks for the help... however it seems to be working a little too well, is
there a way to reset the formula for each group?

Cheers
Gav

"Jay Taplin" <jaytaplin@integraware.com> wrote in message
news:1137677371.989734.138250@f14g2000cwb.googlegroups.com...
> Instead of suppressing the field, I believe you want to suppress the
> whole detail section. I'd do this:
>
> 1) Go to the suppression formula for the detail section (which is what
> I assume you want to suppress)
> 2) Add the following code:
> Shared strLastText As String
>
> If IsNull({Table1.Text1}) Then
> If strLastText = "" Then
> formula = True
> Else
> formula = False
> End If
>
> strLastText = ""
> Else
> If strLastText = {Table1.Text1} Then
> formula = True
> Else
> formula = False
> End If
>
> strLastText = {Table1.Text1}
> End If
>
> 3) Change the field name in the above formula to your own field name
>
> That should be it.
>
> Jay Taplin MCP
>



Jay Taplin

2006-01-22, 3:58 am

I would add in tracking of the group value (either the ID or value), and if
it changes, then set the last value to "" (nothing). If you need further
help, or the actual code, respond back.

Jay Taplin


Gav

2006-01-22, 7:57 am

Again, thanks for replying... you are a great help to struggling Crystal
users. On this occasion however I have managed to get the report to do
exactly what I wanted, I did it by moving my objects out of the detail
section and put them in the group header... it now only appears once per
group which is what I wanted.

Cheers
Gav

"Jay Taplin" <jtaplin@integraware.com> wrote in message
news:YcednWsM4_QTjE7enZ2dnUVZ_s6dnZ2d@ad
elphia.com...
>I would add in tracking of the group value (either the ID or value), and if
>it changes, then set the last value to "" (nothing). If you need further
>help, or the actual code, respond back.
>
> Jay Taplin
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com