on 2013 Jul 18 5:04 PM
Hi,
I have an urgent problem. In a system that has been in production for more than a year an error has been happening intermittently during the last few weeks. The application code has not changed. When this error occurs all reports fail. It is necessary to restart the IIS each time the error happens. After restarting the IIS the same reports that were failing start to work again. This leads me to think it is a problem independent of the application.
The error occurs exactly in the line that export to PDF: crReport.ExportToDisk(ExportFormatType.PortableDocFormat, sName). The error message is: "Missing parameter values".
The application is made in Visual Studio 2005, which uses Crystal Reports for Visual Studio 2005. However in the server is installed Crystal Reports XI. Product version: 11.5.8.826.
I have found in the web that sometimes this error happens because the report parameters are set before setting the data source, but I've checked and the data source is set before setting the parameters. Also this would not explain why the same reports that were failing work after restarting the IIS, with exactly the same parameters.
This system has a heavy use from the web. I tried changing the registry value PrintJobLimit. Yesterday it was set to 5000 and the error happened this morning again. Today I changed it to -1, I don't know if this will work. I think that if the cause of the problem were this registry entry then the error message would be different.
Could this be a bug in Crystal Reports? What could be done?
Request clarification before answering.
It seems this problem was caused by the amount of RAM in the server. When it was increased to the maximum allowed for Windows Server 2003 (4 GB) the problem was apparently solved. At least the problem happens with much less frequency.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Geronimo
Strange that this would star to happen only lately. But I suppose that may depend on all kinds of things; OS updates, other apps installed, virus checkers, fire walls, etc., etc.
Changing PrintJobLimit to -1 will not help as that setting is for embedded RAS servers only anyhow (I should have been more clear on that in one of the articles I wrote about it). And like you, I am dubious that this is related to PrintJob limits.
Start with the search string 'missing parameter crystal net' in the search box at the top right corner of this web page. Filter the result set for "Support Notes".
You should also be on Service Pack 6. Version 11.5.8.826 tells me that you are on a lower SP that that. See this blog on how to get to SP6.
As far as any other steps. CR XI is out of support, so you can not even create a phone case. And of course no fixes. Upgrading to CR 2008 or CR for VS 2010 / 2012 would be the only option to get phone support.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ludek,
Thanks for your answer.
Actually the problem had happened before but rarely, and it has been happening with more frequency in the last few days. I suppose it is due to the fact that the number of users has increased.
I think I didn't find exactly the problem I have in the articles of the site, because in this case one report can work many times with similar parameters, and suddenly it can fail, working again with the same parameters after restarting the IIS.
Since CR XI is out of support (I had read your article but I had the doubt if CR XI R2A was still being supported or not) I suppose that I will have to modify the application to bypass this problem. I think it would be possible, because the data source of the report is a DataTable that is populated before the report is loaded. Some parameters are passed to the report itself, but this can be changed. The idea is to eliminate the parameters from the report. I suppose that should work.
Thanks
Geronimo
Hello Geronimo
Sorry to be the bringer of bad news
One thing I zeroed in on was this:
because the data source of the report is a DataTable that is populated before the report is loaded.
Could it be that the DataTable is not fully populated / committed before CR attempts to retrieve the data from it? A simple addition of a timer delay (say 1/2 a second to start off with) between data write and data read by CR would test that quite quickly.
Other than that I am assuming you are using .Close and .Dispose on the rpt objects as you get done with them.
Oh, and SP 6 may still be worthwhile - may be simpler too as opposed to modification of the app.
- Ludek
Hello Ludek,
This has been a difficult problem.
The report initially was based on a .NET DataTable object that was fully populated before loading the report and before setting it as the DataSource of the report.
The root problem has not being solved yet, although it has changed its form.
Below are the stages that the problem has had:
I think the main things to notice here are:
These things indicates that this could be a bug of some kind, related to Crystal Reports and also related to the work load of the server, because the problem is not reproduced in the test environment, using similar conditions.
I have tried to overcome the problem by changing the design of the reports, but it seems that suddenly there is a failure and once it occurs it can't be solved by a way other than restarting the IIS.
Maybe there is a way of generating the reports that would avoid this problem, but I have come to think that to solve this it would be necessary to use another reporting tool, not Crystal Reports.
Hello Geronimo
The fact that after redesigning the report you got a database log on fail, indicates that this is a database / datasource issue. To me, the behavior indicates that the report engine is finding some sort of an incompatibiity or change in the datasource that it does not understand. Or, the datasource is not available when the engine needs to retrieve the data. See if enabling the option, "Verify on first refresh" will help. This will help if the detected inconsistency in the datasource is minor.
As far as suspecting a CR bug. The question that would need to be answered is; why is it happening in this case only? E.g.; I know I'd never be able to reproduce the issue.
To that end, an interesting test may be the following;
Run the report until it fails
Leave the app running
As soon as the report fails, create an xml off of the datasource
Open the report in the CR designer and point it at the above xml. See this blog on the details of how to.
It will be interesting to see how the report work when going against the xml - my suspicion is that it will either not work at all, or that yo will get a field mapping dialog - confirming there is something in the datasource the engine does not understand.
- Ludel
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 7 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.