Expression Needed

K

Karen

Hi,

I am creating a report and need help with an expression. The report is
based on a query that groups by month and sums the total revenue. In my
report, I need to create an expression that multiplies the monthly revenue by
a certain number, based on the month. For example, Jan Revenue * 12, Feb
Revenue * 11, March Revenue * 10.

Thanks for any help
 
O

Ofer

there are few ways to do that
1. create a table with two fields; month and number to multiplies by. join
that table to the query and muliply the two fields.

2. on the on print of the report section you can enter the code;
dim MyNum as int

select case me.month
case "Jan"
MyNum =12
case "Feb"
MyNum =11
case "Mar"
MyNum =10
..
..
..
end select
me.calcultefield=me.ravenue * MyNum

3. In the source of the calculated field you can write
iif (me.month="Jan",12, iif(me.month="Feb",11,iif(......))))) *
me.ravenue
 
Top