Author Topic: Dynamic columns and calculations  (Read 643 times)

Offline dammora

  • Full Member
  • ***
  • Posts: 16
  • Forum Citizenship: +0/-0
Dynamic columns and calculations
« on: 24 Jul 2006 10:13:23 am »
Hi All,

I need help with developing a report that uses prompt values to create a dynamic calculation.

Please see example below:

Column 1           Column 2                                 Column 3                                            Column 4
XYZ                  (currency based                  (currency based on 
                         on a prompt value)              on a prompt value)                          (column 2 - column 3

Column 2 and three would be have prompts associated to them for Year and Month.  When the user enters the date parameters, Column 4 should calculate the values accordingly. 

Any ideas? 

Thanks

Offline krogovin

  • Full Member
  • ***
  • Posts: 9
  • Forum Citizenship: +0/-0
Re: Dynamic columns and calculations
« Reply #1 on: 21 Aug 2006 06:46:03 pm »
Hi!

I think you can try to create columns 2, 3, and 4 as query calculations, using a case when statement.

For instance,

column2 = case when year = ?yr? then data item (ie revenue, qty, etc) else 0 end

column3 = case when month = ?month? then data item (ie revenue, qty, etc) else 0 end

column4 = column2 + column4

hopefully, that works..