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

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

'Current Month' calculated member error only in Scheduled report

Started by Corrigon, 01 Dec 2016 04:59:54 PM

Previous topic - Next topic

Corrigon

Hi, I have an issue with a report I am attempting to schedule. We are using Cognos 10.2.1 and data source is an MSAS cube.

The report contains a crosstab with the columns being set by a data item called [Rolling 12 Months]:

lastPeriods(12, [PromptMonth])

[PromptMonth] is a data item containing the Financial Month level and a simple prompt expression:

[GL Cube].[GL Period].[Financial Year].[Fin Month] -> ?pFinMonth?

The report has a Prompt page with a Prompt on ?pFinMonth?. This Prompt shows Financial Months, and also has some Static Choices which allow the user to select Relative periods e.g. Current Month, Previous Month, Next Month.

The Current Month 'use' static choice expression is as follows:

#'[GL Cube].[GL Period].[Financial Year].[Fin Month]->:[M8].[[GL Period]].[Financial Year].[Fin Month]].&['+timestampMask(_add_months(_first_of_month(_add_days($current_timestamp,-1)),6),'yyyymm')+']]]'#

So - the user selects the Static Choice of Current Month, which calculates the [PromptMonth] data item, which fills in the [Rolling 12 Month] lastPeriods expression and voila! The user sees the selected month plus the previous 11, giving them a 12 month view of their revenue.

This all works fabulously - until I come to schedule the report.

If I create a View of the report and set the Prompt for Current Month and schedule that to the user, it will behave as if I have used Previous Month in the Prompt.
If I schedule it using Previous Month in the prompt, it will work as expected.
If I schedule it using Next Month in the prompt it will ALSO work as expected!

It seems that this issue only presents when I use the Current Month expression, and only when Scheduled (it will work perfectly when I run the Report manually using Current Month.) It will also work as expected when I schedule the report having selected the actual Month member from the prompt list e.g. [Dec 2016] will produce results for December.

This has been maddening, especially as my organisation is aggressively moving towards reporting that shows them Current Month to Date results.

Can anyone see what I am doing wrong here, or have any suggestions for workarounds? I'm looking at the grim possibility of manually prompting 300+ report views on the last night of each month and I'd like to avoid that if possible!

thanks in advance,
Dave