Here's a puzzle for Tek-Tips!
Using Crystal Reports 2008, with data that looks something like this:
Abbrev Name Property_1 Property_2 Property_Etc
BTL Long name for BTL 4 5 7
CDV Long name for CDV 7 6 8
EFB Long name for EFB 7 2 3
In the Details section of the report, there is room to display the Abreviation and all the numerous Property field columns. There is insufficient room to display the Name. For improved readability, every other row in the Details section is shaded a light gray using the following formula in the Section Expert > Details > Color area:
The Abreviation and Name are displayed in the Report Footer using a series of 3 formulas (a technique I learned several years ago thanks to Tek-Tips!):
The {@Display_ListNames} formula is formated so that it can grow. When the report is run, the Details appear in the main body of the report (with every other row shaded) and the Abbreviations and Names successfully appear at the end of the report on separate lines or "rows" for each Abbreviation and Name - kind of like a footnote at the end of the report explaining what the abbreviations mean.
So far so good. Now, is it possible to shade every other "row" in the concatenated text field in the Report Footer in a fashion similar in appearance to shading every other row in the Details section?
Using Crystal Reports 2008, with data that looks something like this:
Abbrev Name Property_1 Property_2 Property_Etc
BTL Long name for BTL 4 5 7
CDV Long name for CDV 7 6 8
EFB Long name for EFB 7 2 3
In the Details section of the report, there is room to display the Abreviation and all the numerous Property field columns. There is insufficient room to display the Name. For improved readability, every other row in the Details section is shaded a light gray using the following formula in the Section Expert > Details > Color area:
Code:
if remainder(recordnumber,2) = 0 then color(240,240,240) else crnocolor
The Abreviation and Name are displayed in the Report Footer using a series of 3 formulas (a technique I learned several years ago thanks to Tek-Tips!):
Code:
//{@Clear_ListNames}
//Placed in the Report Header
//Clears the variable
whileprintingrecords;
global stringvar ListNames;
ListNames:= "";
Code:
//{@Form_ListNames}
//Placed in the Details section
//Forms or concatenates the Abbreviation and Name fields,
//and adds a carriage return between each series.
whileprintingrecords;
global stringvar ListNames;
ListNames:= ListNames & {ABBREV_FIELD} & " - " & {NAME_FIELD} & chr(13);
Code:
//{@Display_ListNames}
//Placed in the Report Footer
//Displays the concatenated field
whileprintingrecords;
global stringvar ListNames;
ListNames;
The {@Display_ListNames} formula is formated so that it can grow. When the report is run, the Details appear in the main body of the report (with every other row shaded) and the Abbreviations and Names successfully appear at the end of the report on separate lines or "rows" for each Abbreviation and Name - kind of like a footnote at the end of the report explaining what the abbreviations mean.
So far so good. Now, is it possible to shade every other "row" in the concatenated text field in the Report Footer in a fashion similar in appearance to shading every other row in the Details section?