Printing an array on a report

Newbie question:

I need to print sales line comments in a different area of a report (I can get them out in the comments body section ofcourse).

Instead, I popuplate text array with each commment to store it to print it later in the report where it should go.

Now the problem is that number of actual comments is different ofcourse. The text array is set to have 10 dimensions, there will seldom be 5.
I als have a variable with actual number of dimensions that were populated.

I can get 5 firm text fileds, each displaying textarray[0]…textarray[4] for this.

But this means that there is a fixed height of such section… instead, I would like to do something like a loop print for those comments that were populated only… so it could be 1 line or 10 lines but next info then printed right after this… So the height would be variable just like if it would be printed in the Sales Line Comment Body…

Tried to merge texts with CRLF into one text variable and print it, but this doesn’t work in classinc client… CRLF is displayed as two squares, line does not wrap…

Any ideas please??

May be a bad Idea but you can try…

If it is fixed between 1 to 10 only then you can create 10 sections with different text boxes and show the section based on the count…

You can give each comment it’s own section and add

OnPreSection()
IF CommentText[1] = ‘’ THEN
CurrReport.SHOWOUTPUT := FALSE;

on section1

OnPreSection()
IF CommentText[2] = ‘’ THEN
CurrReport.SHOWOUTPUT := FALSE;

on section2
See Picture

Thank you guys!

I’m familiar with CurrReport.SHOWOUTPUT and actually using it in the repor already… didn’t think this would be the way to get around the variable number of comment lines too, thought there is a cleaner way of handling this!

It does work correctly like this!

Why wouldn’t you just use an Integer data item? The text box would have SourceExpr = CommentText[Number]. You could either keep track of how many lines there actually are or just do a CURRREPORT.SKIP on the blank ones.