on 03-01-2010 5:47 PM
Hello,
I am using crystal reports version 9 and i have a requirement as below.
main report has a sub report in the page header section and the sub report gets data of the customer names linked to the customer in main report.
my sub report output currently shows as
NAME A
NAME B
but i want it to appear as NAME A, NAME B so that all the customer names appear in a line instead of seaprate rows on the report. is there a way to do this?
Thanks in advance for your help.
Suppress the detail section, and use this formula to concatenate all of the values (basic syntax):
WhilePrintingRecords
global nameList as string
if len(nameList) = 0 then
nameList = {db.name}
else
nameList = nameList + ", " + {db.name}
end if
formula = ""
Then in the subreport's footer, print the names:
WhilePrintingRecords
global nameList as string
formula = nameList
HTH,
Carl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you carl for your help.
the customer names are now coming in the same line separated by a comma, but if my main report results have more than one page, the subreport results appear to be duplicated for each page. for example,
first page shows NAMEA, NAMEB
Second page shows NAMEA, NAMEB, NAMEA, NAMEB
third page shows NAMEA, NAMEB, NAMEA, NAMEB, NAMEA, NAMEB
and so on..
How can we suppress the duplicates or show NAMEA, NAMEB on all the main report pages?
thank you in advance.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.