Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I make multiple records display on one row?

Status
Not open for further replies.

pb100

Programmer
Aug 31, 2006
36
US
Using CRXI Developer and SQL 2005, I have data with records that include an event date and an event name. I want to display the dates in columns by month for each event name. Group 1 = event name and Group 2 = dates. Event name shows up in the Group 1 header. The dates show up in Group 2 footer. Currently, the report prints a new row for each date in the appropriate month column so the height of each event name section can get pretty high. I want to be able to print all the dates on the same row or with minimal number of rows (there may be more than one date in the same month). Any ideas on how this could be accomplished??

I really appreciate it!!
 
You can collect details from a group and show them all in the group footer. Try adapting something I wrote to collect postcodes:
Code:
// Accumulate using a formula field (suppressed) in the detail line.  Allow for nulls and blanks.
whileprintingrecords;
if not isnull({Recc.Postcode}) and {Recc.Postcode} <> " "
then stringvar pst := pst + {Recc.Postcode} +", "
else if length(pst) = 0 
then stringvar pst := pst + "Excluding blanks; "
else stringvar pst := pst
Code:
// Show in using a formula field in the group footer.
whileprintingrecords;
stringvar pst;
left(pst,len(pst)-2)
Code:
//  Clear using a formula field using in the group header.
whileprintingrecords;
stringvar pst := "";
Note that clearing in the footer avoids problems with group headers repeating on a new page, which does clear everything for the group. Provided the 'clear' is placed in the section AFTER the display, it will do them in that order.

You can turn a date into a string using something like ToText({your.date}, "dd/MM/yyyy")

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top