If you are unable to create a new account, please email support@bspsoftware.com

 

how can i optimize report - cum. month, and single month,current year,last year

Started by tequila, 12 Jun 2014 09:28:56 AM

Previous topic - Next topic

tequila

hello,

i have a income report for a html portal,

requirement

crosstab and 3 prompt

1. prompt  - year (2014)
2. prompt - month
3. static prompt - (1)cumulative; (2)month

e.g. when i select month - may with (1)cumulative - I have worth of the month 1-5 of 2014; or select static prompt (2) then i only have  worth of 'may' of 2014.

implementation

Year Prompt

Datalement- current_year - #prompt('Jahrneu'; 'interger';'[Jahr Defaultwert]')#
Dataelement - Jahr Defaultwert  - extract(year;current_date)
Dataelement - Last year - ([current year]-1)

month prompt

Dataelement - current month - #prompt('monatneu';'integer';'[Monat Defaultwert]')#
Dataelement - Monat Defaultwert - extract(month;current_date)-1

static prompt

1 = cumulative
2 = month

in the main querry
Dataelement - Month_from - if (?Darstellung? = 1) then (1) else([month_till])
Dataelement - Month_till - #prompt('monatneu','integer','[Monat Defaultwert]')#

measure

Dataelement - (aggragation -sum) - current year measure - if([Monat Lfd. Nummer]>=[Monat_from] and [Monat Lfd. Nummer]<=[Monat_till] and [Jahr]=[current_year]) then ([Saldo kumuliert * -1]) else (0)
Dataelement - (aggragation -sum) - last year measure - if([Monat Lfd. Nummer]>=[Monat_from] and [Monat Lfd. Nummer]<=[Monat_till] and [Jahr]=[current_year]-1) then ([Saldo kumuliert * -1]) else (0)


It work, but the static prompt with month_from, month_till make the runtime of the report very very slowly.

Can anybody help or have other solution to optimize my report to have a better performance?

thnx.