That’s cool!
From: The Museum System (TMS) Users [mailto:[log in to unmask]] On Behalf Of Carole Campbell
Sent: Thursday, November 29, 2012 3:52 PM
To: [log in to unmask]
Subject: Re: Crystal Reports - concatenating values
Hi Jeri,
I use Minimum, Maximum and NthLargest when I know I have a limited number of possibilities and want to change up the text between the values:
SourceMin Formula:
Minimum{Constituent.DISPLAYNAME}, {Objects.SORTNUMBER})
SourceMid Formula:
NthLargest(2,{Constituent.DISPLAYNAME}, {Objects.SORTNUMBER})
The "2" chooses the second occurrence
SourceMax Formula:
Maximum({Constituent.DISPLAYNAME}, {Objects.SORTNUMBER})
Print Source Formula:
If DistinctCount ({Constituent.CONSTITUENTID}, {Objects.SORTNUMBER}) = 1 then
{Constituent.DISPLAYNAME}
Else
If DistinctCount ({Constituent.CONSTITUENTID}, {Objects.SORTNUMBER}) = 2 then
{@Source Max} + " and " + {@Source Min}
Else
If DistinctCount ({Constituent.CONSTITUENTID}, {Objects.SORTNUMBER}) = 3 then
{@Source Max} + " , " + {@Source Mid} + " and " + {@Source Min}
I group by Object SortNumber and place my final formula in the Group Footer area.
Thanks,
Carole
Carole Campbell
Registrar for Collections Management
J. Paul Getty Museum
1200 Getty Center Drive, Suite 1000
Los Angeles, CA 90049
Tel: (310) 440-7083
Fax: (310) 440-7746
>>> On Thursday, November 29, 2012 at 12:12 PM, <[log in to unmask]> wrote:
NICE! Thanks, Ariana! On Thu, Nov 29, 2012 at 3:07 PM, French, Ariana <[log in to unmask]> wrote: Forgot to mention: you'll need to suppress group header and details, and the group footer display formula is what you actually display (i.e. the concatenated list of names). Ariana From: The Museum System (TMS) Users [mailto:[log in to unmask]] On Behalf Of French, Ariana Hi Jeri, Here's what I use for a similar purpose: In group header, use a formula (I call it "reset"): whileprintingrecords; stringvar x := ""; In details, use a formula (I call it "accumulate"): whileprintingrecords; stringvar x := x & {Constituents.DisplayName} & ", "; In group footer, use a formula (I call it "display"): whileprintingrecords; stringvar x; if length(x) > 2 then left(x,len(x)-2); and adjust the "-2" portion to whatever makes sense for your particular formatting needs to lop off the final comma. Hope this helps, Ariana From: The Museum System (TMS) Users [mailto:[log in to unmask]] On Behalf Of Moxley, Jeri Hi All, To have all of the co-curators of an exhibition, or multiple artists of an artwork, appear in a Crystal Report as a single string: Name, Name, Name How would you do that? Thanks!
To unsubscribe, send an email to [log in to unmask] with the following commands in the body of the email: signoff TMSUSERS // eoj You will receive a confirmation that your subscription has been removed. To unsubscribe, send an email to [log in to unmask] with the following commands in the body of the email: signoff TMSUSERS // eoj You will receive a confirmation that your subscription has been removed. To unsubscribe, send an email to [log in to unmask] with the following commands in the body of the email: signoff TMSUSERS // eoj You will receive a confirmation that your subscription has been removed.
signoff TMSUSERS // eoj You will receive a confirmation that your subscription has been removed. |
To unsubscribe, send an email to [log in to unmask] with the following commands in the body of the email:
signoff TMSUSERS
// eoj
You will receive a confirmation that your subscription has been removed.