Shivkumar Deshmukh
Shivkumar Deshmukh

Reputation: 1148

How to Merge Rows in Crystal Report?

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

enter image description here

but i want to display in report as shown below

enter image description here

thanks in advance

Upvotes: 4

Views: 11621

Answers (3)

asif
asif

Reputation: 1

First step

  1. create running total
  2. select com no
  3. summary will be count
  4. for each record.
  5. reset select on change group
  6. save the running total as rtotal

2nd step

  1. create a formula name will be total
  2. add this "ceiling(count(Status,ComNo)/2)" this formula will find the middle point.
  3. save the formula

Third step

  1. create another formula name will be isSupress
  2. add this "if(#rtotal=total) then false else true"
  3. save the formula

4th step

  1. select com no.
  2. format object->suppress->formula
  3. just place issupress formula
  4. save the suppress formula.

Run the report.

Upvotes: 0

Kangkan
Kangkan

Reputation: 15571

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

Initially it will 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 overlay on for the group. So you will get the following:

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

Putting the value of Com No and Desc in the middle of the box is tricky. If you know the number of rows in the detail section, you can increase the height of the group header in proportion can give you the result:

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

Upvotes: 9

Lee Tickett
Lee Tickett

Reputation: 6027

Alternatively you could use a cross-tab to display the data.

Upvotes: 0

Related Questions