cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Running a report in batch; getting an unhandled exception - can i suppress the parameter query?

theresa_campbell
Explorer
0 Kudos
703

I am trying to get this report to run in batch overnight (bursts hundreds of two page reports into their own files). This report, when run interactively, has a parameter query. I am handing it the answer, but it is giving me this error - is there a way to suppress it when run in batch? Or any other ideas? The report is run on a server in a proprietary database app.

Unhandled Exception: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
at System.Windows.Forms.MessageBox.Show(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
at Microsoft.VisualBasic.Interaction.MsgBox(Object Prompt, MsgBoxStyle Buttons, Object Title)
at AdmCrvBatch.modMain.showError(String err)
at AdmCrvBatch.modMain.Main()

Accepted Solutions (1)

Accepted Solutions (1)

theresa_campbell
Explorer
0 Kudos

Please accept my apologies - this was a data issue that was resolved by the developer serving up the data. Thank you again for all the assistance.

Answers (4)

Answers (4)

See the download WIKI: https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

There is a test app I wrote for setting parameters, see if that helps with your work flow.

FYI - CR for VS does have limits, Report Bursting is not something this version does well.

You will find it does have it's limitations for the number and speed you want to use, this may be the issue youa re seeing, does it work at all of works and then starts throwing that error?

For better performance you may need to go to CR Server, it has RAS running as a Service and you can add up to 4 RAS servers.

https://www.sap.com/products/crystal-server.html

Another option is to export the report to RPT format so it has saved data.

Now use the SavedData filtering API's and set the filter per Batch value and export again, change filter and apply again.

DellSC
Active Contributor

You have three options, none of which are related to the Crystal SDK:

1. Remove the modal form.

2. Add a parameter to the program that will allow you to suppress the modal form when running in batch mode.

3. Add error handling to catch the error and take appropriate action.

-Dell

theresa_campbell
Explorer
0 Kudos

Thank you both for the replies. I removed the parameter queries completely but I still get the error. I think I am out of my depth on this one; and I apologize.