• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 648
  • Last Modified:

In Crystal Reports II I need a footnote formula field that returns a list of data that was returned in the detail section.

In Crystal Reports II I need a footnote formula field that returns a list of data that was returned in the detail section.

My detail section will return something like this:
Fund I
Fund II
Fund II

I need a footnote at the bottom of the page that will take the detail data and put it into a string so it shows up in the footnote like this:

Fund I, FundII, Fund III
0
TimFred
Asked:
TimFred
  • 3
  • 3
1 Solution
 
bdreed35Commented:
You will need 3 formulas.

Formula 1: Place in the Page Header section and suppress it
//@Init Var
whileprintingrecords;
global stringvar detail_data := "";

Formula 2: Place in the Detail section and suppress it
//@Incr Var
whileprintingrecords;
global stringvar detail_data := detail_data & ", " & {table.field};

Formula 3: Place in the Page Footer section
//@Display Var
whileprintingrecords;
global stringvar detail_data;
mid(detail_data,3)
0
 
TimFredAuthor Commented:
Awesome!  It works almost completely except for one thing ....

It is not resetting the data on a page by page basis.  the string keeps growing.  The footnote needs to just show what is in the detail section on that page.  I am surprised it is not working.  What are we missing?
0
 
bdreed35Commented:
Where did you put the first formula?  That is the one that does the reset.
Make sure it is in the Page Header section and not the Report Header.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
TimFredAuthor Commented:
Yes, it is in the page header.
0
 
bdreed35Commented:
Hmm...I just recreated the scenario and everything worked fine for me.
Do you have the Init Vars formula exactly the same as this:

whileprintingrecords;
global stringvar detail_data := "";
0
 
TimFredAuthor Commented:
Works,  didn't have the variable as a global before ... now it works.

Many thanks!!!!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now