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

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: Kuldeep_R_Nayak
Message 1 in Discussion

Hi Chaps,     1) I have a problem in Crystal Reports.I have some crystal reports made 
in version 8.5. I have to export them to .PD file. I am using a datatable as a 
datasource to the reports. Most of the reports do not give any error except for 2 of 
them.(They throw the same type of error).I get the following error:-   Query Engine 
Error: 'C:\GSPC CCD\CCD Application\Report Definitions\Reports\crptPtyMan.rpt'

CrystalDecisions.CrystalReports.Engine.DataSourceException     2)Plz note, this 
problem is occuring at my company and the product is yet to be installed at the 
client's place. I have gone thru the foll link:- 
http://support.crystaldecisions.com/library/kbase/articles/c2011164.asp  and i think 
that this solution is not applicable in my case.   3)Plz go thru the code below for u 
r reference and let me know if there is any solution to the problem:- Note:- rpt is an 
object of ReportDocument The error occurs at :- rpt.Export() (Try Catch Block) Code:-  
Private Sub SendReportInPdfFormat() 
If System.IO.File.Exists(strReportName) Then 
rpt.Load(strReportName) 
rpt.SetDataSource(dt) 
If Not Request.QueryString("Comments") Is Nothing Then 
rpt.SummaryInfo.ReportComments = Server.UrlDecode(Request.QueryString("Comments")) 
ElseIf strComments <> String.Empty Then 
rpt.SummaryInfo.ReportComments = strComments 
Else 
rpt.SummaryInfo.ReportComments = "" 
End If 
Dim filename As String, filepath As String 
Dim DiskOpts As CrystalDecisions.Shared.DiskFileDestinationOptions = New 
CrystalDecisions.Shared.DiskFileDestinationOptions 
rpt.ExportOptions.ExportDestinationType = 
CrystalDecisions.[Shared].ExportDestinationType.DiskFile 
rpt.ExportOptions.ExportFormatType() = 
CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat 
filename = System.Guid.NewGuid().ToString() + ".pdf" 
filepath = Request.ServerVariables("APPL_PHYSICAL_PATH") & "Reports\temp\" & filename 
DiskOpts.DiskFileName = filepath 
rpt.ExportOptions.DestinationOptions = DiskOpts 
Try 
rpt.Export() 
Catch ex As Exception 
Response.Write(ex.Message.ToString) 
Response.Write("<br>") 
Response.Write("<br>") 
Response.Write(ex.GetType.ToString()) 
Response.End() 
End Try 
  
With Response 
.ClearContent() 
.ClearHeaders() 
.ContentType = "application/pdf" 
.WriteFile(filepath) 
.Flush() 
.Close() 
End With 
System.IO.File.Delete(filepath) 
End If 
  
  
  
End Sub  

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

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to