Page 1 of 1

repeat data column on the same line

Posted: Thu Jun 19, 2008 4:34 pm
by shmuly
Is there a way to repeat a data field within a band instead of listing each row on a separate line besides using columns? I do not want to use columns because I would then have to specify the width of the column, instead I want to fit as many possible values on one line.

example:
instead of displaying following-
Parents: Sara and Michael Lehman
Children: John
Children: Mike
Children: Dora
Children: Kelly

I would like to display it as-
Parents: Sara and Michel Lehman
Children: John, Mike, Dora, Kelly

repeat data column on the same line

Posted: Sun Jun 22, 2008 3:11 am
by Vital
Hello,

Create master-detail report. Set height of detail report to 0. After then add detail text box (summary for all detail strings) to master band. In GetValueEvent of this text box type following code:

Code: Select all

Products.First();
string text = "";
while (!Products.IsEof)
{
  if (text.Length != 0)text += ", ";
  text += Products.ProductName;
  Products.Next();
}
Set WordWrap and CanGrow properties to true.

In attachment you can find sample report which you can run from Demo application.

Thank you.