Print Page | Close Window

Crystal Report exception -- Missing parameters

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4980
Printed Date: 02 May 2024 at 9:46am


Topic: Crystal Report exception -- Missing parameters
Posted By: sarvesh
Subject: Crystal Report exception -- Missing parameters
Date Posted: 11 Dec 2008 at 3:42am

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.ExportToStream(ExportOptions options)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportOptions options, HttpResponse response, Boolean asAttachment, String attachmentName)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportFormatType formatType, HttpResponse response, Boolean asAttachment, String attachmentName)

at CarrerVidyaUI.Resume.OnePageExport.Page_Load(Object sender, EventArgs e) in D:\cv\CareerVidyaUI\ResumeCenter\OnePageExport.aspx.cs:line 88

what is this exception?


-------------
Sarvesh



Replies:
Posted By: Imtiaz Ahmed
Date Posted: 12 May 2009 at 12:00am
Hi,
 
The below code shows how to pass the paramater and export it to the PDF format...
This message is appering when you try to export report and having parameters in that report...
Passing the paramter in below format will export the report without any errors...

' The Below code passes parameter to Crystal Report

Dim discretevalue As ParameterDiscreteValue

Dim values As ParameterValues

discretevalue = New ParameterDiscreteValue

discretevalue.Value = "Imtiaz" ' Assign parameter

values = New ParameterValues

values.Add(discretevalue)

crReportDocument.DataDefinition.ParameterFields(0).ApplyCurrentValues(values)

' The below code converst into PDF file format

Dim oStream As New MemoryStream

oStream = crReportDocument.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)

Response.Clear()

Response.Buffer = True

Response.ContentType = "application/pdf"

Response.BinaryWrite(oStream.ToArray())

 
 
 



Print Page | Close Window