Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Displaying multiple values in group header Post Reply Post New Topic
Author Message
barry.ein
Newbie
Newbie
Avatar

Joined: 18 Feb 2015
Location: Israel
Online Status: Offline
Posts: 12
Quote barry.ein Replybullet Topic: Displaying multiple values in group header
    Posted: 18 Oct 2015 at 5:42am
Hi all,

I have a sub-report with 5 groups.
One of the fields in the sub-report displays multiple values so I am using formulas to reset (Group Header), calculate (Details) and display (Group Footer).

Now I need to place a display formula in the group header but I cannot figure out where to place the initialization and calculation formulas.

My formulas are:
Init formula
Shared stringVar Department:=chr(13);

Calc formula
Shared stringVar Department;
if ({DATA_FIELDS.NAME}="Department")
    then
    (
        if (InStr(Department,chr(13)+{TYPE.NAME}+chr(13))=0)
            then Department:=Department+{TYPE.NAME}+chr(13)
    )
;

Display formula
Shared stringVar Department;
if (Department=chr(13))
    then ""
    else Right(Left(Department,Length(Department)-1),Length(Department)-2)
;

Any ideas would be highly appreciated,

Barry
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Oct 2015 at 2:57am
I am unclear on what you are trying to do. Are you trying to display the results of sub-report in the GH of the main report or are you trying to display the results in the gh of the sub-report(s) ?
If this is all in the sub reports your process will not support display in the GH. Have you considered a cross tab? Maybe with a suppressed values?
IP IP Logged
barry.ein
Newbie
Newbie
Avatar

Joined: 18 Feb 2015
Location: Israel
Online Status: Offline
Posts: 12
Quote barry.ein Replybullet Posted: 19 Oct 2015 at 11:12pm
I am trying to display the data in the GH of the subreport.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Oct 2015 at 4:53am
try the cross tab trick.
shared variables only display results in details and footers. the results for a group do not exist for a header display.
IP IP Logged
barry.ein
Newbie
Newbie
Avatar

Joined: 18 Feb 2015
Location: Israel
Online Status: Offline
Posts: 12
Quote barry.ein Replybullet Posted: 22 Oct 2015 at 8:45am
I will give it a try, thanks.

Edited by barry.ein - 22 Oct 2015 at 8:45am
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.047 seconds.