I've just finished configuring Cognos to save results to a shared file system.
It is working, but I have a couple of related questions regarding my first test:
I've created and run a report (Scorecard) and I get the following outputs in the expected directory:
• Scorecard -en-us.pdf
• Scorecard -en-us-pdf_desc.xml
This leads to two questions:
1. How can I get rid of the -en-us that has been added to the report name?
2. How can I prevent the .xml file from being generated at all?
Also, further down the road, I am going to have to place bursted reports in the file system.
If I have a report called District Scorecard that produces bursted output for Districts 1, 2, 3, and 4, how can I get the reports to be saved as District 1 Scorecard, District 2 Scorecard etc...?
Any thoughts would be greatly appreciated.
Thanks in advance,
Adam.
HI
I don't think you should automatically get an xml version of the report. Check the report properties, have you selected xml and pdf versions?
The file name of the output is the report name, does the report name have the en-us in the name? If it does, rename the report.
When you burst the report to a file system the file name should be the report name + the value of the bust variable so you should be OK.
Good luck :-)
Thanks!
The bursting works, but it still appending the "-en-us" to the report name (it is not in the report name).
It is also producing the .xml output even though I am not selecting it to create an .xml output.
Is there something in the run-time setting prompts that is causing these to occur?
Have you tried the Archive file location option.
You can set this in Cognos Configuration > Global Settings > General
This option gives you (when everything is correctly set) a new option called "Save to file system" when you select "Run with options.." and choose background.
The locale is still added to the report name and also an xml file is created. But it works like a charm.
That's exactly what I have done... (and you're right, it works like a charm).
However, is it possible to prevent the locale from being added to the report name or the .xml descriptor file from being created?
From your reply, I'm guessing not!
I'm pushing these directly to a network share and these will add a layer of confusion for our business users.
In researching, it seems it is possible to create a post report output script that could be used to clean these up.
Something that would delete the .xml files and rename all files containing "-en-us" in the name.
If so, can someone point me in the direction of how this might look?
I hoping that this is fairly standard.
Also, is this post report script a global setting or can it be controlled on a report by report basis?
Thanks in advance,
Adam.
OK, I'm understanding where I need to go with this in the long run...
Just one more quick question, I now want to burst into a sub-directory in the Output folder based on the burst key.
I have set CM.OUTPUTBYBURSTKEY = true in the Content Manager Service (no other CM. parameters are set).
However, the output is still being placed in the Location I select in the run options when setting the report to run.
For example:
Reports are saved in \Scorecards (when I choose Scorecards as the save to file system location).
I need it to save to \Scorecards\District 1 or \Scorecards\District 2 depending on the burst key.
What am I missing?
Thanks in advance,
Adam.
Adam: The option with CM.OUTPUTLOCATION is a global setting. So it applies to all bursted reports.
Furthermore you can specify only one location. Different locations can be handled by the script.
So this is why I prefer the archive location option.
If the report name is very important why don't you set a file monitor on the folders that rename the reports after they are created there?
Btw: I haven't used this option for many years now so I have to do it from memory.
You must specify the option: CM.OUTPUTLOCATION AND you must BURST the report in order to get it working. You don't have to use the option "Save to file system"
Might want to have a look at this as well...
http://www.ibm.com/developerworks/data/library/cognos/page190.html
You can define sub folders from within the Admin Tool. Have you checked this out?
Launch Cognos Admin and select the Configuration tab then select "Dispatchers and Services" from the options on the left, then select "Define File System Locations" from the menu items above the Action column.
Nuff
Thanks for everyone's help, I've created a manageable solution:
1. Created a global Archive file location option (in Cognos Configuration > Global Settings > General).
2. Created sub-directores (in Cognos Connection > Configuration > Dispatchers and Services > Define File System Locations).
3. Created various Report Studio Reports (with appropriate Burst Key if necessary).
4. Scheduled these to run with appropriate save to file system option.
5. Created a post-report run .bat file on Cognos Server that does necessary clean-up (deletes *_desc.xml files, renames
-en-us to an underscore, and then moves files to appropriate shared directory for field associate viewing).
6. Created a pre-report run .bat file on Cognos Server that Archives previous weeks files.
It seems that there should be an easier way to this, but this works.
Another great learning opportunity - BTW, I suck at .bat file programming!
Thanks again.
Adam.
Quote from: adam_mc on 01 Nov 2013 01:38:18 PM
Thanks for everyone's help, I've created a manageable solution:
1. Created a global Archive file location option (in Cognos Configuration > Global Settings > General).
2. Created sub-directores (in Cognos Connection > Configuration > Dispatchers and Services > Define File System Locations).
3. Created various Report Studio Reports (with appropriate Burst Key if necessary).
4. Scheduled these to run with appropriate save to file system option.
5. Created a post-report run .bat file on Cognos Server that does necessary clean-up (deletes *_desc.xml files, renames
-en-us to an underscore, and then moves files to appropriate shared directory for field associate viewing).
6. Created a pre-report run .bat file on Cognos Server that Archives previous weeks files.
It seems that there should be an easier way to this, but this works.
Another great learning opportunity - BTW, I suck at .bat file programming!
Thanks again.
Adam.
You may suck at it, but the more you play with it the easier it gets. Only way is up my friend. :)
Glad to hear that you got it all sorted out.
Hi, Could you please let me know how you created .bat file and executed?
Thank you.
SwapRa...
It is a Windows .bat file scheduled to run at a specific time on one of my Cognos Servers.
The timing is such that it kicks off at a similar time to the report starting and the first thing the .bat file does is look for the existence of a finish file (an extra quick running report that I add to the end of the job that also exports to the same file system location).
The .bat file looks something like below:
@ECHO OFF
cls
:start
if exist "\\myserver\Cognos_Output\Finish*.csv" (
echo File is there!
del "\\myserver\Cognos_Output\Finish*.csv"
del "\\myserver\Cognos_Output\*_desc.xml"
goto final
) else (
echo File not found!
ping 1.1.1.1 -n 1 -w 60000 > NUL
goto start
)
:final
rem Rename files with -en-us- in filename
setlocal enabledelayedexpansion
set "Pattern=-en-us-"
set "Replace=_"
for %%# in ("\\myserver\Cognos_Output\*.*") do (
set "File=%%~nx#"
ren "%%#" "!File:%Pattern%=%Replace%!"
)
rem Rename files with -en-us at end of filename
setlocal enabledelayedexpansion
set "Pattern=-en-us"
set "Replace="
for %%# in ("\\myserver\Cognos_Output\*.*") do (
set "File=%%~nx#"
ren "%%#" "!File:%Pattern%=%Replace%!"
)
rem Move all Export Files to Alternate location
for %%a in ("\\myserver\Cognos_Output\*.*") do (
if not exist "\\otherserver\output_directory\" md "\\otherserver\output_directory\"
move "%%a" "\\otherserver\output_directory\"
)
:end
Hope this helps.
Adam.
Thank You Adam.