Sheridan Posted July 31, 2025 Posted July 31, 2025 We've started to run an automated report using the CommandReporter (on a scheduled task) to run a simple report overnight This works but the report output is showing the filename as name.txt.csv - the report in the designer is a .txt output and the path in the batch file has the output file as /OUTPUT:\\PATH\file.txt. Running the report via the designer works fine So its working but adding the .csv extension on after the .txt even though this isn't specified anywhere - are there parameters for the commandreporter to make sure it uses the name & path as in the designer or use the OUTPUT path correctly?
David44 Posted July 31, 2025 Posted July 31, 2025 (edited) The relevant part of the command line for us is this... /OUTPUT:"c:\automation\para.xml" I don't think the output settings in the Report Designer are relevant when the report is run by CommandReporter. Try enclosing the path in quotation marks. Try a simpler path. It looks like you are outputting to a network share, if it works with a simpler path but not to a network share, maybe some slashes need to be escaped. Failing that, mount the network share with a drive letter and try that. Edited July 31, 2025 by David44
Sheridan Posted July 31, 2025 Author Posted July 31, 2025 8 minutes ago, David44 said: The relevant part of the command line for us is this... /OUTPUT:"c:\automation\para.xml" I don't think the output settings in the Report Designer are relevant when the report is run by CommandReporter. Try enclosing the path in quotation marks. Try a simpler path. It looks like you are outputting to a network share, if it works with a simpler path but not to a network share, maybe some slashes need to be escaped. Failing that, mount the network share with a drive letter and try that. Yes we are outputting to a network path. It appears to work fine in that sense - it appears in the right place in the right format and name, just with an additional .csv tagged on the end! I've tried running the report without the OUTPUT parameter at all to see if it just uses the designer ones but as you say it seems to ignore those
Zedster1974-MGS Posted July 31, 2025 Posted July 31, 2025 Command Reporter User Guide - The system will only output a csv file, if you require excel etc, you must manipulate the script further.
Sheridan Posted July 31, 2025 Author Posted July 31, 2025 1 minute ago, Zedster1974-MGS said: Command Reporter User Guide - The system will only output a csv file, if you require excel etc, you must manipulate the script further. Its the 'you must manipulate the script further' bit I can't seem to find docs for - we're just running it as a batch file
Zedster1974-MGS Posted July 31, 2025 Posted July 31, 2025 To be honest, that's where ChatGPT comes in... Previously, i wanted to take a csv output with headings Name, Year, RegGroup, AM register Mark and AM Mark Date and convert it into a word document - so i asked ChatGPT. IT chucked me a load of powershell and i started from there. What I was basically trying to achieve was a word document that updated several times during the day with different columns for all the lessons and AM/PM registration - so in the event of loss of access to SIMS Connected, we'd still have a relatively up to date register output, that could be printed and manually filled in. Think of it as two steps.. Step1 is Command Reporter to output the data; Step 2 is all the other manipulation that you'd like to do and has nothing to do with Command Reporter. Or at least that's the only way I managed to do the output creation I needed without loosing my mind (too much).
Sheridan Posted August 5, 2025 Author Posted August 5, 2025 I just simplified it even more - ran the commandreporter which always outputs .csv and then a second script renames it back to .txt The content of the file it creates is exactly the same so renaming it after the report finishes was the easiest if slightly clumsy way of doing it!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now