|
I'm an overall novice when it comes to CR, and am having some issues getting results of a field to display on a single line for an individual user.
Essentially I need to report a user's classification (and there can be many) on a single line when their userID pops up for a transaction. I can get it to report on multiple lines when I just use the column that's in the table, however our customer needs it to be separated by comma and not by line.
The classification is generated by a flag on a user's account that is checked off.
My report essentially needs to generates this:
TranDate userID Classification
08/08/19 25 Student, Staff, Hourly Staff
08/08/19 20 Faculty, Student
08/08/19 74 Student, Contractor
However, my current report seems to have taken a mind of its own, and will display like a million flags that aren't actually even checked off on a user's account.
My three part formula looks like this:
@null (Located in Report Header):
whileprintingrecords;
stringvar description := "";
@comma_field AKA where I want to actually display the data separated by a comma (location in Details):
whileprintingrecords;
stringvar description;
description := description & ", " &
{FLAGINFO.DESCRIPTION};
@final (located in Page Footer):
whileprintingrecords;
stringvar description;
Mid(description, 3);
My report is also spitting out a comma at the beginning of the result, should I remove that ", " in there to get it to not do that?
Any help on this would be greatly appreciated! I'm so close to the end of this report, however we absolutely have to have the results on one line, and I just can't seem to get it where it needs to go.
Thanks all!
Edited by jefferydh - 08 Aug 2019 at 6:29am
|
|
HI Jeff,
You can remove the comma by writing below statement :
whileprintingrecords;
stringvar description;
Mid(right(description,len(description)-1), 3);
I am not sure why you are using Mid() function here.
If mid() is not required, then use only :
right(description,len(description)-1)
it will remove comma before the line.
Thanks,
Sastry
|