Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Delete a section group without details section Post Reply Post New Topic
Author Message
florinette164
Newbie
Newbie


Joined: 15 Jul 2010
Location: Togo
Online Status: Offline
Posts: 3
Quote florinette164 Replybullet Topic: Delete a section group without details section
     Posted: 15 Jul 2010 at 1:06am
Hi to you all,

please i'm encountering a problem and want to ask for your help.
i'm working on Crystal Reports XI; i've created a group based on a formula field. it's working well.
Now i want to delete the groups which didn't have a detail section , mean which section detail contain nothing.
I know that i have to tape some code on delete condition, but don't know what to write.

Can somebody help me please?

Thks

(P.S. Excuse my english)
IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet Posted: 15 Jul 2010 at 1:49am
a group will be printed if there are some data meet the condition for that group.
if there is no data then it will not print (blank).
 
in this case you can remove the group from the report.
this will not delete/remove your detail information.
 
 
hope it help.
 
Emir W
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Jul 2010 at 3:55am

What are you displaying in the detail section that is 'blank' for the groups you want to remove?

IP IP Logged
florinette164
Newbie
Newbie


Joined: 15 Jul 2010
Location: Togo
Online Status: Offline
Posts: 3
Quote florinette164 Replybullet Posted: 15 Jul 2010 at 7:10am
in fact, i have a subreport in the report; so i wanted to display information of the subreport even if there's no equivalence in the report.
eg: the main report display info about sales group by "accountacy compte"; the subreport gives infos about budget for each "accountacy compte"; now what i want is to display the "accountacy compte" if there is sales OR budget info; so i make outer join in linking the tables.
Now it shows me all "accountacy compte" (now i want to delete all of them which didn't have neither sales nor budget info)

P.S. excuse me but don't know how to translate some terms
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Jul 2010 at 9:42am
That is tricky because one of your conditions is to remove a group based on data from the subreport which does not have data returned until after the report is rendered.
Nothing is coming to mind how to fix that issue.
If you moved the subreport into the group header a and used a shared variable to flag the it as Hide or Show (0 or 1), suppress all of the items in the subreport, DO Not suppress the subreport but rather suppress if blank, move the headers to group header B, you could hide or show these based on the 1 or 0 rom the subreport in header A.
IP IP Logged
florinette164
Newbie
Newbie


Joined: 15 Jul 2010
Location: Togo
Online Status: Offline
Posts: 3
Quote florinette164 Replybullet Posted: 15 Jul 2010 at 9:51pm
hi,
thanks for your answer;
in fact, i've found a solution; i delete all groups which have data=0 or verify this condition isnull(data); so i finally jave what i want

Thanks for all your helps
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