How to merge rows in a Crystal report?

I am using Crystal Report Version = 10.2, Visual Studio 2008, and display the result of the stored procedure in the crystal report, my stored procedure returns the output as shown below.

enter image description here

but I want to display in the report as shown below

enter image description here

early

+4
source share
3 answers

Use group for Com No. and put the Sub-Status and Date information in the details section.

It will initially look like

 --------------------------------------------- Com No. | Desc. | Status | Date | --------------------------------------------- 1 | a | | sub | 01/01/2012| | ack | 02/01/2012| | inv | 03/01/2012| --------------------------------------------- 

Then:

Use the section expert and set the overlay for the group. So you get the following:

 --------------------------------------------- Com No. | Desc. | Status | Date | --------------------------------------------- 1 | a | sub | 01/01/2012| | ack | 02/01/2012| | inv | 03/01/2012| --------------------------------------------- 

Putting the values ​​of Com No and Desc in the middle of the window is not easy. If you know the number of lines in the details section, you can increase the height of the group header in a proportion that can give you the result:

 --------------------------------------------- Com No. | Desc. | Status | Date | --------------------------------------------- | sub | 01/01/2012| 1 | a | ack | 02/01/2012| | inv | 03/01/2012| --------------------------------------------- 
+6
source

Alternatively, you can use the cross tab to display the data.

0
source

First step

  • create total
  • select com no
  • resume will be considered
  • for each entry.
  • reset select in change group
  • save total as rtotal

2nd step

  • create a formula name will be complete
  • add this β€œceiling (score (status, ComNo) / 2)”, this formula will find the midpoint.
  • save formula

Third step

  • create another formula name will be isSupress
  • add this "if (# rtotal = total), then false else true"
  • save formula

4th step

  • select com number.
  • format object-> suppress-> formula
  • just place the isupress formula
  • keep the suppression formula.

Run the report.

0
source

Source: https://habr.com/ru/post/1399328/


All Articles