on 08-13-2009 9:09 AM
I have a report that I'm calling from a .NET windows application using the CrystalDecisions.Windows.Forms.CrystalReportViewer class. The report takes several parameters but I'm not passing any through from .NET (I'm leaving crystal to prompt for the parameters manually before producing the report).
For some reason (and not all of the time) after the parameter selection page comes up from crystal and ALL of the parameters are entered in manually then click 'OK' I get a message 'Missing Parameter' followed by another message 'Object reference not found'. The report still appears to bring up the data but when I export the data I get an exception error of the type CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException (more detail below)
The code I'm using the execute the crystal report is as follows
CrystalDecisions.Windows.Forms.CrystalReportViewer m_CrystalReportViewerOne;
m_CrystalReportViewerOne.ReportSource = ReportToLoad; (a CrystalDecisions.CrystalReports.Engine.ReportDocument object)
m_CrystalReportViewerOne.ShowFirstPage();
The report itself is very straightforward, just 2 tables used (no views or procedures and no sub-reports).
The version of Crystal is XI and .NET 1.1.
Has anybody else come across this problem before and if so is there a way to fix it? Please help!
Thank you
Error Message :
CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException, CrystalDecisions.Shared, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
Message : Missing parameter values.
Source : CrystalDecisions.ReportAppServer.DataSetConversion
Help link :
PromptEngineAvailable : False
ErrorID : MissingParameterFieldCurrentValue
TargetSite : Boolean ThrowDotNetException(System.Exception)
Stack Trace : at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.y(ExportOptions R)
...
First place to start is with the most recent update for CR XI. The latest update is here:
https://smpdl.sap-ag.de/~sapidp/012002523100006008952008E/crXIwin_sp4.zip
Next, try it without the line:
m_CrystalReportViewerOne.ShowFirstPage();
It should not be neccessary.
Make sure you are using .close and .dispose once you are done with the report.
If none of the above helps;
are you using sessions / postbacks, etc?
what version of .NET are you using?
confirm that this is happening on your development computer?
Ludek
Edited by: Ludek Uher on Aug 13, 2009 6:30 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks very much for the help. It was the ShowFirstPage() that caused the trouble. Using Show() avoided the problem.
Thanks again
Simon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.