Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    4

    Unanswered: Single line horizontal a,b,c,

    I have the following tables:
    Encounter, Exam and Procedure

    Encounter *-1 Exams, Exam 1-1 Proc

    I need to create a form letter that lists all Proc.Names in a sentence like this:
    The following procedures were performed: CT, MR, MRI .

    How do I get all the Proc's to show on one page like this?

    Many Thanks!

  2. #2
    Join Date
    Jun 2008
    Posts
    9
    Try join(proc.names, ",")

  3. #3
    Join Date
    Mar 2009
    Posts
    4
    I'm not sure that will work for me, but I may be too new to CR to know how to use your suggestion.
    Proc.name is a single string value, I believe you need to pass an array to the join function.

    I found the following but haven't tried it yet, seems like a lot to do to get values onto one line....

    How do you get a list of detail strings to print on one line? So that a list of detail items like:

    ItemA
    ItemB
    ItemC

    prints out as one line like:

    ItemA, ItemB, ItemC

    The solutions requires three formulas, and assumes that the items are within an existing group on the report:

    1) In the Group Header place the @reset formula:

    WhilePrintingRecords;
    StringVar chain := '';
    NumberVar ChCnt := 1


    2) On the Details place the @Accum formula, putting your field into the second line:

    WhilePrintingRecords;
    StringVar Item:= {Your.Field}; // place your field in place of {Your.Field}
    StringVar Chain;
    NumberVar ChCnt;

    if ChCnt = 1
    then (ChCnt:= 2; chain := Item)
    else
    if Length(Chain) + Length(Item) > 254 //see note about this number below
    then Chain := Chain else
    chain := chain + ', ' + Item


    3) On the Group Footer place the @Display formula:

    WhilePrintingRecords;
    StringVar Chain

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •