Author Topic: Dynamically Change Report Output File Name  (Read 129 times)

Offline yeluri9

  • Full Member
  • ***
  • Join Date: Oct 2013
  • Posts: 12
  • Forum Citizenship: +0/-0
Dynamically Change Report Output File Name
« on: 07 Feb 2018 12:35:29 am »
I have requirement need to concatenate Prompt values to report output file .

Example :

Report name : Sales Report.PDF

Prompt Values : India

Final report output name :Sales report_India.PDF

Offline Redrichmond

  • Full Member
  • ***
  • Join Date: Jun 2008
  • Posts: 27
  • Forum Citizenship: +1/-0
Re: Dynamically Change Report Output File Name
« Reply #1 on: 21 Feb 2018 06:05:29 am »
We had a similar issue at a past client. Theres not a way to do it... We got round this by using Bursting.

So we had a 100 customers... The burst key was a  3 digit number (Customer number) and we put the reports in a job and burst to a network drive.

1)When we burst the reports it would come out like "Sales Report_001.pdf,Sales Report_002.pdf,Sales Report_003.pdf,Sales Report_004,etc,etc..So you would have 100 reports (if there was data)

2)We then had a vbscript that would scrape through each file looking for the 3 digits and it would create a folder based on the 3 digit code...  so 001,002,003,004,005
3)The report would then be moved into the folder...So report 'Sales Report_001.pdf' would be moved into folder 001, 'Sales Report_002.pdf' would be moved into folder 002
4)The script would create a log and delete any stubs or anything left (the mht extensions when running in excel 2002 but move the excel files into the folders but delete the IE files)

You could try and create a burst key on Country and then you will need some mechanism to move the reports (if you wanted to move them - also security may be an issue as well for you, so you may not want people in one country seeing other reports - so you could lift and shift the whole folder to a network location that's secured by AD. - We had one root location cognos would save to which we supported (it was easier to check at month end)  then it was up to the business to move their reports out - of course you could just burst the reports direct to a country location on the network if you map your saved outputs.

Our Script moved the folders to another server where an application would link to the folder, so a user would be able only to see their folder.
« Last Edit: 21 Feb 2018 06:15:50 am by Redrichmond »