Web Report Viewer Troubleshooting
This article applies to Presage Web and ITrack Chromium. The web Report Viewer will give a general error, error details are logged to the reportqueue table and can be viewed in the "History" (web) or "Print Queue" (desktop) tab of the Report Viewer screen.
Terms
- Crystal Server - the Node.JS application that uses Report Commander to generate the report PDF. Runs on Bunnahabhain
- Report Commander - command line application used to generate report PDFs by the Crystal Server (and Report Queue)
- Report Queue - python application that reads from reportqueue table to send emails and print to a printer. Report Queue is separate from Crystal Server, and the two systems do not interact.
- reportqueue - a table in the database that logs report runs.
- reportparameter - a table in the database that associates parameters to reports
Common Errors
Error Running Report
This means that Report Commander encountered an error running the report. If you get this error, check the reportqueue error for a more detailed error message. Listed below are some common ones.
"Missing parameter values" or "Double check the parameters..."
This means that Report Commander did not receive all required parameters for the report. Often times, the report will run fine on desktop, because the Crystal SDK can "fill in the gaps", while the web Report Viewer cannot, and needs a row in reportparameter for every parameter.
Solution
Since this is caused by missing rows in the reportparameter table, re-running the adder scripts will generally fix the issue.
If it doesn't, the adder script could be out of date or otherwise missing parameters.
Parameter not found in report: <parametername>
This means that a report was passed a parameter it doesn't expect.
Solution
Make sure the report is up to date
(I can't remember the error message)
Missing / invalid ODBC configuration. I think this presents as "could not connect to the database" or something to that effect.
Solution
Brian can make sure the ODBC connection is valid, and give Charles the name to check that the ODBC connection name in the Crystal Server config is correct.
Invalid Value for <parameter>
Report Commander received an invalid value for the specified parameter
Invalid Session
This error is caused by the Crystal Server failing to verify the session token it was passed.
Solution
Most likely, if logging out and back in doesn't fix it, this means that the Crystal Server configuration is either missing, or configured with a different database host URL than the API. Charles can check the logs to double check, as well as update the config file. Brian can then restart the Crystal Server service to load the updated configuration.
Invalid Report
The Crystal Server failed to find the report with the specified name/type. Or, the report is missing its corresponding file
data.
The file or directory is corrupted and unreadable
Once or twice the cached .rpt file on Bunnahabhain was corrupted or something. We fixed it by reuploading the report to the customer's db and deleting the cached .rpt file from \\192.168.5.18\Node\crystal-reports-server\cache
It's possible it was because the D drive was failing. Cache has been moved to M:\report_cache
Other Errors
Error: WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
- Disable "Auto Reconnect" on ODBC. Presents as "Unkown Error" or "Internal Server Error" in the UI
Common Errors (Table Mode)
Error | Description | How to Fix |
---|---|---|
Invalid Session. Try logging out and logging back in. | This means that the report server was not able to verify your session. Either your session has expired, or the Crystal Server is not configured for that database. The most likely cause of this is, if logging out and back in doesn't fix it, is that the (generally Presage) customer hasn't been set up on the Crystal Server, or some configuration has changed. | If the config for that customer is missing, then add it matching the template. If it is present, make sure that the Crystal Server and Chromium/Presage API are configured with the same DB URL. Otherwise, check the ODBC connection and DB credentials. Charles can check the logs to double check the URLs are good, as well as update the config file. Brian can then restart the Crystal Server service to load the updated configuration. |
Error running report. Double check the report parameters and try again. | This means that Report Commander did not receive the correct amount of parameters for the report. Often times, the report will run fine on desktop, because the Crystal SDK can "fill in the gaps" or ignore extra parameters, while the web Report Viewer cannot, and needs a row in reportparameter for every parameter. Check the Report Viewer > History tab for more error details |
Generally, update the report and re-run adders, but See Below for more details, and check Report Viewer > History for more parameter and error details. If updating the report and adder doesn't fix it, it's possible that they are out of date and need fixed.
|
"Invalid value for <parameter>" means Report Commander received an invalid value for the listed parameter. Usually this just means you forgot to fill a parameter out, but could be caused by by an outdated report / adders. | Make sure all parameters are filled out. | |
"Parameter not found in report: <parameter>" means that a parameter was passed to the report that the report doesn't expect. | If caused by an out-of-date report (more common), update the report. If caused by out-of-date adders, re-run adders. | |
"Missing parameter values" means that the report was not passed all expected parameters. Normally, this is because a parameter was added to the report, and the adders are out of date. | Re-run adders. | |
(I can't remember the error message) | Missing / invalid ODBC configuration. I think this presents as "could not connect to the database" or something to that effect. | Brian can make sure the ODBC connection is valid, and give Charles the name to check that the ODBC connection name in the Crystal Server config is correct. |
Invalid Report | The Crystal Server failed to find the report with the specified name/type. | Make sure the report exists in the customer database with the given name and type, and a valid report.fileid . In Presage, there used to be a bug where running reports with a non-English language selected would fail with this error.
|
The file or directory is corrupted and unreadable | This would come up every so often because the D drive on Bunnahabhain was failing. It shouldn't happen anymore. | It shouldn't happen again, but if it does, delete the cached report file from M:\report_cache on Bunnahabhain. Maybe reupload the report if it persists after that.
|
Logs
The log file lives at:
\\192.168.5.18\Node\crystal-reports-server\crystalserverservice.log
A normal log entry for a report job looks like this:
Connection created for 'hosteddb-southeast.isoftdata.com.373487' args [ '-report="D:\\Node\\crystal-reports-server\\cache\\A95AC82D42C7A2A9AFF9F720DA5F3159.rpt"', '-login!={server:reporting_hosted_southeast}{database:373487}', '-exportfile="D:\\Node\\crystal-reports-server\\cache\\output\\default_invoice_2024-12-03T19-20-25.872Z.pdf"', '-exportformat="PDF"', '-namedparameters invoicenum="5150"' ] Destroying connection for 'hosteddb-southeast.isoftdata.com.373487'
If you see a message like this, then the Crystal Server (not ODBC) failed to connect to the database, and there will probably be a logged request body right below it. The logged request body should have the db host sent from the application, which can be compared to the valid hosts in the config file
Destroying connection for 'iceriver.presageanalytics.com.UNKNOWN DATABASE'
The most common errors you'll see start like this and will show the command used to run Report Commander as well as a more-detailed error message in a mess of JSON.
ReportError: A Report Commander error has occurred
Configuration
This will go over how to configure a customer on the Crystal Server, not so much how to deploy and configure a new Crystal Server.
The config file lives at:
\\192.168.5.18\Node\crystal-reports-server\config.json
Chromium
Does not have to be configured per-customer. One config per VM. The users have more security and so they use more of the SSL options than other users
Presage Web/API
REPORT_SERVER_URI
specifies the report server URI used by the server, and MYSQL_HOST
specifies the DB host. EXTERNAL_DB_HOST
will be sent to the Crystal Server instead of MYSQL_HOST
, if specified. Either MYSQL_HOST
or EXTERNAL_DB_HOST
MUST match the host
in the Crystal Server config file or it will not work!
SMB
Currently (12/04/2024), Culligan GI is the only Presage SMB customer, and was configured individually. Maybe in the future, Presage SMB will work like Chromium and just have one config per VM, but that's not currently the case.
Since the setup for SMB clients is slightly different, the MYSQL_HOST
is an "internal" IP, but we need an external host that matches what the Crystal Server knows. To get around this, specify this ENV variable:EXTERNAL_DB_HOST: <customername>-database.presageanalytics.com
. Make sure the URL matches the one in the Crystal Server config. Apparently, SMB DB URLs will always have -database
in them since the SMB docker containers don't run on the same iron as MySQL.
Self-Hosted
If they're okay hitting our Crystal Server, we just need to make sure that their database can be reached on Bunnahabhain, then the setup is the same as a hosted yard.
If not, we'll have to deploy it to a Windows server they control, and set the REPORT_SERVER_URI
ENV variable in the API to the proper URI
Enterprise Web/API
TBD! But we probably aren't going to have anyone configured with a print server URL by default, since each customer will have to be set up manually. In theory if they open a port to us, they can be configured to use our Crystal Server, but they might not want to. In that case, we'll have to deploy Crystal Server to a Windows server that they control.
Updating
Not 100% sure since it's been awhile, but I'm pretty sure the process is basically: 1. Build the Crystal Server to an exe again 2. Replace the old exe on BH 3. Restart CrystalServer service
Deployment
For 99% of customers, this section will not apply. But in the event that a self-hosted customer wants to host their own Crystal Server, this is probably how.
- Locate a Windows Server
- Install Report Commander on it
- Run CrystalServerSetup.exe from dl.isoftdata.com, I think this sets up the service to make it run in the background and on startup?
- Get the latest EXE or build a new one from https://github.com/ISoft-Data-Systems/crystal-reports-server and replace the old EXE from the installer
- Restart the CrystalServer service
- Make sure the service is reachable from wherever the Presage API is running
- At this point, they should be able to make a request to
serveruri
/process_report and get a report back.
Misc / Notes
Housby has Crystal Server deployed to generate invoice PDFs for an ecommerce integration. They're using a version before we compiled it to an exe, so if they ever run into bugs or need an update it will be a little different