Jump to content

Recommended Posts

Posted

Looking on these forums I see there may be a way to get sims on a schedule to run a report and export it to a .csv file to a drive.

 

Can anyone point me in the right direction? or a guide? Totally new to sims really but trying to create something.

 

Thanks

Posted

You'll need to use commandreporter.exe, which lives in the SIMS .Net folder wherever SIMS is installed. If you run it, you'll see all of the switches you can use.

I have it installed onto one of my servers, and I run a batch file every night to do an export to a CSV. An example of the command line in the batch file is:

 

"c:\program files\sims\sims .net\commandreporter.exe" /user: /password: /report:"SIMS Report to Export" /output:"C:\sims export\sims export.csv"

 

You'll need to replace and with a valid user in SIMS that has access to the data you want to export, and "SIMS Report to Export" is the name of the report you've created in SIMS.

  • Thanks 1
Posted

I wrap it into a powershell script - for example, below is a copy and paste from a report I run/created that gives me a list of staff who don't have a photo on sims:

 

I've got about 15-20 of these which I run once a day to flag up housekeeping stuff :) this script is run by another powershell script that sends an email each day of any issues i.e. if script output is not blank

 


$pinfo = New-Object System.Diagnostics.ProcessStartInfo
$pinfo.FileName = "c:\program files (x86)\sims\sims .net\CommandReporter.exe"
$pinfo.RedirectStandardError = $true
$pinfo.RedirectStandardOutput = $true
$pinfo.UseShellExecute = $false
$pinfo.Arguments = "/USER:***USERNAME*** /PASSWORD:*****PASSWORD**** /REPORT:""LAT-DataCheck-StaffPhoto"" /QUIET"
$p = New-Object System.Diagnostics.Process
$p.StartInfo = $pinfo
$p.Start() | Out-Null
$stdout = $p.StandardOutput.ReadToEnd()
$stderr = $p.StandardError.ReadToEnd()
$p.WaitForExit()

#Write-Host "stdout: $stdout"
#Write-Host "stderr: $stderr"
#Write-Host "exit code: " + $p.ExitCode

$xml = [xml]$stdout

if( $xml.SuperStarReport.Record ) {
Write-Host "This Script Checks for staff users with no photo set
"
Write-Host "

Action Required: Allocate photo to staff in SIMS

"
Write-Host "
"
Write-Host "

Staff Missing photos:

"

$xml.SuperStarReport.Record | Select-Object primary_id,Full_x0020_Name,Photo_x0020_Available | ConvertTo-Html -Fragment
}

[/Code]

  • Thanks 2

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...