2 weeks ago
Crystal reports 2013
As per above screenshot - all rows have same LINE_TYPE = "D". For now the report uses DETAILS section SUPPRESS <> "D" but it prints everything on single lines as in the DB. How to combine everything into one single line?
Hi borozu, one way of doing this is via a string running total / string aggregation. Chances are your database has a string agg function in it, but you can also do this in Crystal Reports using a set of formulas.
e.g. For this example I'm assuming that you are grouping on that product name field.
// group header formula...reset the stringvar at the group level
whileprintingrecords;
stringvar allDescriptions:= "";
// details section formula...stringvar does the aggregation
whileprintingrecords;
stringvar allDescriptions;
if instr(allDescriptions, {your description field}) = 0
and {your LINE_TYPE field} = "D"
then allDescriptions:= allDescriptions + {your description field} + ", ";
// group footer formula...display formula
whileprintingrecords;
stringvar allDescriptions;
if length(allDescriptions) > 2
then allDescriptions:= allDescriptions[1 to length(allDescriptions) -2];
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.