CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2013
    Posts
    6

    Crystal reports 11 printing occurances

    The table items I am trying to print occurs up to 12 times (each occurance stored as a record with an incremented occurs number). The report needs to print the occurances across the page for export to excel. My problem is how to get the items on one line while reading thru the records.

  2. #2
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Crystal reports 11 printing occurances

    Study the next solution, where we are concatenating a field and display the
    resulting string at group or report footer in only one line

    To do that, you have to create 3 formulas:

    The first one, let's call it @null:
    Code:
    whileprintingrecords;
    stringvar names := "";
    Place it in your GH section, it will return you null.



    The second one, let's say @comma_field:
    Code:
    whileprintingrecords;
    stringvar names;
    names := names & ", " & {table.field};
    Place it in your Detail section which you can suppress; the formula will return you next:
    , Jules, Christina, Paul


    and the 3rd formula, let's call it @final (or whatever you like):
    Code:
    whileprintingrecords;
    stringvar names;
    Mid(names, 3);
    Place it in your GF or report section.
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  3. #3
    Join Date
    Jan 2013
    Posts
    6

    Re: Crystal reports 11 printing occurances

    Thank you, worked like a charm the first pass.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured