Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: how suppress group header when not data on detail Post Reply Post New Topic
Author Message
Annec
Newbie
Newbie


Joined: 17 Feb 2017
Online Status: Offline
Posts: 6
Quote Annec Replybullet Topic: how suppress group header when not data on detail
    Posted: 21 Feb 2017 at 12:01pm
hi,
How can I suppress a group header when I have a condition that suppress the detail in section expert.
if I put the same formula in group header section expert . this suppress the the group header for every thing.
the formula work well suppressing on detail all what I don't need. But I need to keep the group header when it have detail show on the report.

The problem is that my condition formula depend of the summary of a running total. because of that i cannot make a total of that summary and put it on the group header.

also I've create another formula :
If previous({vwDocument.DocumentNumber})=({vwDocument.DocumentNumber}) Then
  1
Else
 0

but crystal see that as a summary  also. and I cannot insert a summary of this and insert in the group header.

I will appreciate if any body can help me





IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Feb 2017 at 2:49am
what is your suppression criteria and your RT set up?
IP IP Logged
Annec
Newbie
Newbie


Joined: 17 Feb 2017
Online Status: Offline
Posts: 6
Quote Annec Replybullet Posted: 22 Feb 2017 at 3:43am
My Detail section expert formula is:
IF ISNULL({#count3})  OR {#count3} = 1 THEN TRUE ELSE FALSE.
-------------------------------------------------

I have a formula where I get the first character on a document Number
ex: my documentNumber is  SO2-0004567
but on the line
SO2-0004567-23456
SO2-0004567-36782
SO2-0004567-23189
 so this invoice have 3 item line.
the only way for my to know how many line an invoice number have is getting the first 11 character of the invoice .
because I have group for customer number .


I have a formula named:fist11-character:
left({vwFedEx.DocumentNumber},instr(strreverse({vwFedEx.DocumentNumber}),"*")+11)
base on that, I have a running total
as  follow:
Running total name: count3
field to summarize: @fist11-character
Evaluate for each reacord
reset on change of field @fist11-character


on my suppression I only need customer with invoice that have more than one line.  Invoice with only 1 line I don't need it.

thanks

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Feb 2017 at 4:37am
This is a bit confusing as I am not understanding your raw data set from your view.
It looks like you are over complicating it though.
If you can grab the left 11 characters from DocumentNumber and group on that and then do a group count of that field (not a RT just a summary) and you can suppress the entire group if the group count<=1

Edited by DBlank - 22 Feb 2017 at 4:45am
IP IP Logged
Annec
Newbie
Newbie


Joined: 17 Feb 2017
Online Status: Offline
Posts: 6
Quote Annec Replybullet Posted: 22 Feb 2017 at 4:55am
the problem i can't count that field because when the document number change  example:
Customer  Pedro Pablo
SO2-0050836-150567
SO2-0050836-150568
SO2-0050836-150569
SO2-0050864-150669
SO2-0050864-150671
SO2-0049753-146599

on this example this customer have 3 different Document number  ,
SO2-0050836 with 3 line
SO2-0050864  with 2 line
SO2-0049753 with 1 line

 that's why I had to make a running total to count and diferenciate when the document number change.
If I count in the way you said  , It will take total as only 1 document number.

thanks

IP IP Logged
Annec
Newbie
Newbie


Joined: 17 Feb 2017
Online Status: Offline
Posts: 6
Quote Annec Replybullet Posted: 22 Feb 2017 at 5:12am
ok,

I did what you said,
and
It work!!!!!!!

thanks you !!!  thank you !!!


IP IP Logged
Annec
Newbie
Newbie


Joined: 17 Feb 2017
Online Status: Offline
Posts: 6
Quote Annec Replybullet Posted: 24 Feb 2017 at 11:37am
Well, today I realize that it doesn't work at all.
Becuse if the customer Group at least it have one invoice number with total count <=1 , it suppress the complete group header.
exam:
Group Header Customer  Pedro Pablo
 Group by Invoice@fist11-character  
        SO2-0050864
              SO2-0050864-150669
                Count 1
        SO2-0050836
          SO2-0050836-150567
          SO2-0050836-150568
          SO2-0050836-150569
               Count 3
      
Because at least one of the count is equal to 1  , it remove the customer header.

but the suppression on detail work fine.

the problem is I have detail without customer name.
I have tried  different think on the suppress for Customer group but without any luck.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Feb 2017 at 2:59am
If I understand your need correctly for the customer group header use a comparison do a distinct count compared to a count
DISTINCTCOUNT(@formula,customer)=COUNT(@formula,customer)
IP IP Logged
Annec
Newbie
Newbie


Joined: 17 Feb 2017
Online Status: Offline
Posts: 6
Quote Annec Replybullet Posted: 27 Feb 2017 at 5:52am
That's was the part that was missing.

It work.
Thank you!!   Thank you!!
You saved me.

IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.