Why do you not want to do this by using objects from your universe (or even variables in the report) that return these values rather than doing it programmatically?
Let me explain further -
The report I’m using is getting the month and the year by a report variable from the user (not with a universe variable). I need the report to run every 1st of the month and run itself for shipments from last month.
Lets say it runs on Oct 1st 2009 - it would generate the report for Sep 2009.
OK, I think I understand what you are trying to do.
You could create two universe objects
The first would give you the 1st day of the previous month
The second would give you the last day of the previous month
In the conditions of your report add the condition date between [start of month object] and [end of month object]
then schedule your report to run on the first of each month.
I have a report with two sections on it say A and B, the macro is used to generate PDFs for each value of A when B value (one value) is passed through the prompt. This is working fine but when I try to pass morethan one value through prompt (B) then it has to generate two PDFs.
For Example: "B" values are : 2002;2007
"A" values are : 123;234;543;576 etc
then the output I need is : 2002_123.pdf
2007_123.pdf
2002_234.pdf
2007_234.pdf
2002_543.pdf
2007_576.pdf
but its not generating that way, its generating for “A” value 123 as 2002_123.pdf only when I open that pdf I can see 2007_123 details.
How to generate 2 seperate PDFs for “A” (123)? any thoughts appreciated.