How to create cross-tab report as the following report?

前端 未结 1 1925
北恋
北恋 2021-01-17 01:13

Is it possible to use Crystal Report cross-tab to create the following report?

Here is the report:

\"Sam

相关标签:
1条回答
  • 2021-01-17 01:45

    I've taken your example data and pulled into a csv: http://speedy.sh/cY9d2/test.txt

    Then built a report showing what you want: http://speedy.sh/XC4VJ/test.rpt

    enter image description here

    I'm sure there's an easier way but CrossTabs do introduce some difficulties. Here's the formula i've used in conjunction with a calculated member:

    (
     (
      GridValueAt (CurrentRowIndex, GetNumColumns - 3, 0) 
      -
      GridValueAt (CurrentRowIndex, 0, 0) 
     )
     / GetTotalValueFor ("test_txt.Year")
    )
    * 100
    

    Simply the GridValueAt (CurrentRowIndex, GetNumColumns - 3, 0) line takes the last value, the GridValueAt (CurrentRowIndex, 0, 0) line takes the first value and / GetTotalValueFor ("test_txt.Year") line the total.

    Let us know how you get on and if needed we can come up with some alternative solutions.

    0 讨论(0)
提交回复
热议问题