p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Crystal Reports (http://p2p.wrox.com/forumdisplay.php?f=113)
-   -   Problem integrating Crystal Report withe .Net (http://p2p.wrox.com/showthread.php?t=34666)

beechan October 27th, 2005 05:14 AM

Problem integrating Crystal Report withe .Net
 
Hi,
I am having this weird problem which i cannot locate the cause of it.

When i did not pass in parameters, the following error is being generated.

------------------------------------------------------------------------------------------------------------------------------------------


Missing parameter field current value.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: CrystalDecisions.CrystalReports.Engine.ParameterFi eldCurrentValueException: Missing parameter field current value.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ParameterFieldCurrentValueException: Missing parameter field current value.]
   .F(String  , EngineExceptionErrorID 
) +574
   CrystalDecisions.CrystalReports.Engine.FormatEngin e.internalSetReportInfo(RequestContext reqContext) +1293
   CrystalDecisions.CrystalReports.Engine.FormatEngin e.internalGetViewContext(ReportPageRequestContext reqContext, * viewContext) +217
   CrystalDecisions.CrystalReports.Engine.FormatEngin e.GetPage(PageRequestContext reqContext) +280
   CrystalDecisions.ReportSource.LocalReportSourceBas e.GetPage(PageRequestContext pageReqContext) +189
   CrystalDecisions.Web.ReportAgent.u(Boolean N) +164
   CrystalDecisions.Web.CrystalReportViewer.OnPreRend er(EventArgs e) +108
   System.Web.UI.Control.PreRenderRecursiveInternal() +62
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Page.ProcessRequestMain() +1499




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

------------------------------------------------------------------------------------------------------------------------------------------


When i do pass in parameters, the follow error is being generated.

------------------------------------------------------------------------------------------------------------------------------------------


Exception of type System.Exception was thrown.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Exception of type System.Exception was thrown.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[Exception: Exception of type System.Exception was thrown.]
   CrystalDecisions.Web.ReportAgent.u(Boolean N) +358
   CrystalDecisions.Web.CrystalReportViewer.OnPreRend er(EventArgs e) +108
   System.Web.UI.Control.PreRenderRecursiveInternal() +62
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Control.PreRenderRecursiveInternal() +125
   System.Web.UI.Page.ProcessRequestMain() +1499




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
----------------------------------------------------------------------------------------------------------------------------------------------------------------------

My codes are very simple. For first case is (no parameters),


crv.ReportSource=new report1();


For the second case is (with parameters),


ParameterFields paramFields = new ParameterFields ();
ParameterField paramField = new ParameterField ();
ParameterDiscreteValue discreteVal = new ParameterDiscreteValue ();
ParameterRangeValue rangeVal = new ParameterRangeValue ();
paramField.ParameterFieldName = "countryString";

discreteVal.Value = "india";
paramField.CurrentValues.Add (discreteVal);

discreteVal = new ParameterDiscreteValue ();
discreteVal.Value = "japan";

paramField.CurrentValues.Add (discreteVal);

paramFields.Add (paramField);
crv.ParameterFieldInfo = paramFields;

crv.ReportSource=new report1();
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

i had tried setting reportsource before i assign my parameters but the Exception type of Exception is still being thrown. I had looked around but could not find the answer.

Thanks for the help




All times are GMT -4. The time now is 12:53 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.