Home > database >  # crystal report to find out the data grouping, as shown in figure
# crystal report to find out the data grouping, as shown in figure

Time:09-22

As is shown above, the original demand is to put the data displayed lines went, now need according to the stock desc field to group, and the stock qty for peace, and the combined form of id together

Group I will, but how to make multiple form id in the figure shown on the right?
Just contact with crystal reports, hope everybody to help!!!!!

CodePudding user response:

SELECT the CASE WHEN MIN (FORM) & lt;> MAX (FORM) THEN CAST (MIN (FORM) AS VARCHAR (10)) + '-' + CAST (MAX (FORM) AS VARCHAR (10)) ELSE CAST (MIN (FORM) AS VARCHAR (10)) END AS the FORM, the remaining fields
FROM the TABLE
GROUP BY [STOCK DESC]

CodePudding user response:

Thank you for your bosses can solve
  • Related