is this noway? My Cr Report export to pdf error occurshttp://forums.asp.net/t/151113.aspx/1?is+this+noway+My+Cr+Report+export+to+pdf+error+occursSat, 06 Sep 2003 01:41:23 -0400151113151113http://forums.asp.net/p/151113/151113.aspx/1?is+this+noway+My+Cr+Report+export+to+pdf+error+occursis this noway? My Cr Report export to pdf error occurs hi eyevy1: When I run my app in my computer's IE,display errormessage as below(but yesterday my app eyerything is ok!): Error in File c:\inetpub\wwwroot\hhmxposystem\report\crReportPo.rpt: Error detected by export DLL: 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.ExportException: Error in File c:\inetpub\wwwroot\hhmxposystem\report\crReportPo.rpt: Error detected by export DLL: Source Error: ine 48: .ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat Line 49: End With Line 50: crReportDocPo.Export() Line 51: 'With HttpContext.Current 'don't display the word,but can save the file Line 52: ' .Current.Response.ClearHeaders() so what's problem ? how can I to slove it ? thanks in advanced! 2003-02-19T14:55:18-05:00151285http://forums.asp.net/p/151113/151285.aspx/1?Re+is+this+noway+My+Cr+Report+export+to+pdf+error+occursRe: is this noway? My Cr Report export to pdf error occurs Hi, this is my procedure to export my .rpt to pdf, xls, doc or rtf. it works fine in my intranet, but I can´t get it to work on my extranet. still working on it. hope it helps you. <pre class="prettyprint">Private Sub ExecutaReportFormato() Dim objCrystalReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument() Dim objCrystalFileDestinationOptions As New CrystalDecisions.Shared.DiskFileDestinationOptions() 'indica o nome do relatório objCrystalReportDocument.Load(Server.MapPath(&quot;relat.rpt&quot;)) 'indica informações de logon Dim crLogonInfo As TableLogOnInfo crLogonInfo = objCrystalReportDocument.Database.Tables(0).LogOnInfo crLogonInfo.ConnectionInfo.ServerName = BuscaParam(&quot;BDRelat&quot;) crLogonInfo.ConnectionInfo.UserID = BuscaParam(&quot;UserRelat&quot;) crLogonInfo.ConnectionInfo.Password = BuscaParam(&quot;PasswordRelat&quot;) objCrystalReportDocument.Database.Tables(0).ApplyLogOnInfo(crLogonInfo) 'seta formatação objCrystalReportDocument.FormatEngine.PrintOptions.PaperOrientation = PaperOrientation.Landscape objCrystalReportDocument.FormatEngine.PrintOptions.PaperSize = PaperSize.Paper11x17 ' Seta arquivo de destino do report Dim strExtesion As String Select Case drpFormatos.SelectedItem.Text Case &quot;PDF&quot; strExtesion = &quot;pdf&quot; objCrystalReportDocument.ExportOptions.ExportFormatType = PortableDocFormat Case &quot;Excel&quot; strExtesion = &quot;xls&quot; objCrystalReportDocument.ExportOptions.ExportFormatType = Excel Case &quot;Word&quot; strExtesion = &quot;doc&quot; objCrystalReportDocument.ExportOptions.ExportFormatType = WordForWindows Case &quot;RTF&quot; strExtesion = &quot;rtf&quot; objCrystalReportDocument.ExportOptions.ExportFormatType = RichText End Select Dim strFile As String = &quot;relat.&quot; &amp; strExtesion Dim strPath As String = &quot;c:\inetpub\wwwroot\sampleNet\temp\&quot; Dim strUrl As String = &quot;temp/&quot; 'Response.Write(&quot;nome do arquivo: &quot; &amp; strFile) objCrystalFileDestinationOptions.DiskFileName = strPath &amp; strFile 'seta propriedades do relat para export objCrystalReportDocument.ExportOptions.DestinationOptions = objCrystalFileDestinationOptions objCrystalReportDocument.ExportOptions.ExportDestinationType = DiskFile objCrystalReportDocument.Export() Response.Redirect(strUrl &amp; strFile) End Sub</pre> 2003-02-19T17:22:47-05:00151463http://forums.asp.net/p/151113/151463.aspx/1?Re+is+this+noway+My+Cr+Report+export+to+pdf+error+occursRe: is this noway? My Cr Report export to pdf error occurs you may be using the version 9.1 of crystal .NET components (that comes with the regular installation of VS.NET). you need to update your components to 9.2. This components use the latest versions of export format types (ExcelRecord, PortableDocFormat, etc). you need to get the crystal decisions 9 .NET redistribution files here: http://support.crystaldecisions.com/communityCS/FilesAndUpdates/cr9netredist.zip.asp it took me about 2 weeks to find what was going on!!! (along with about 4 emails to crystal technical support).. agghh..... 2003-02-19T20:02:45-05:00154028http://forums.asp.net/p/151113/154028.aspx/1?Re+is+this+noway+My+Cr+Report+export+to+pdf+error+occursRe: is this noway? My Cr Report export to pdf error occurs dear javiguillen: I already downloaded the file from you give me the url,but when I installed in mycomputer . It need fill the &quot;Production ID &quot; no. can you give me this no ? thanks in advanced! 2003-02-22T19:20:25-05:00155233http://forums.asp.net/p/151113/155233.aspx/1?Re+is+this+noway+My+Cr+Report+export+to+pdf+error+occursRe: is this noway? My Cr Report export to pdf error occurs is not &quot;production ID&quot; but product ID, your need to fill it out with your Crystal registration number 2003-02-24T16:56:20-05:00155482http://forums.asp.net/p/151113/155482.aspx/1?Re+is+this+noway+My+Cr+Report+export+to+pdf+error+occursRe: is this noway? My Cr Report export to pdf error occurs Yes .I tried to fill with my cr register No .But the system showed &quot;Invalid product code or expired&quot; My register ID: AAP5GKS0000GDE100DS So can you give me another &quot;valid&quot; product ID ? THANKS A LOT 2003-02-24T20:55:19-05:00156518http://forums.asp.net/p/151113/156518.aspx/1?Re+is+this+noway+My+Cr+Report+export+to+pdf+error+occursRe: is this noway? My Cr Report export to pdf error occurs 1-800-GET-YOUR-OWN-LICENSE (Can't give you mine, my company owns it) 2003-02-25T19:04:35-05:00328595http://forums.asp.net/p/151113/328595.aspx/1?Re+is+this+noway+My+Cr+Report+export+to+pdf+error+occursRe: is this noway? My Cr Report export to pdf error occurs Why don't you call crystal to find out what is wrong with your product code? 2003-09-03T19:35:37-04:00331291http://forums.asp.net/p/151113/331291.aspx/1?How+to+resolve+this+problem+with+vb+net+asp+net+How to resolve this problem with vb.net(asp.net) Logon failed. 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.LogOnException: Logon failed. Topic ID: Q319264 Topic Title: Q319264 - PRB: Crystal Report in Web Application Fails to Log On to SQL Server URL: ms-help://MS.MSDNQTR.2003FEB.1028/enu_kbvstudionetkb/en-us/vstudionetkb/Q319264.htm Browser: Microsoft Internet Explorer 4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705) Comments: How to resolve this problem with vb.net(asp.net) This is my code:<pre class="prettyprint">&lt;script runat=&quot;server&quot;&gt; sub page_load(obj as object,e as eventargs) ''CrystalReport1' must be the name the CrystalReport ' dim crTableLogOnInfo as new TableLogOnInfo 'dim crConnectionInfo as new ConnectionInfo() '//Crystal Report Properties 'dim crDatabase as CrystalDecisions.CrystalReports.Engine.Database 'dim crTables as CrystalDecisions.CrystalReports.Engine.Tables 'dim crTable as CrystalDecisions.CrystalReports.Engine.Table 'crConnectionInfo.ServerName = &quot;zhongsb&quot; 'crConnectionInfo.DatabaseName = &quot;project_manager&quot; 'crConnectionInfo.UserID = &quot;sa&quot; 'crConnectionInfo.Password = &quot;3&quot; 'crDatabase = crReportDocument.Database 'crTables = crDatabase.Tables 'crTableLogOnInfo = crTable.LogOnInfo 'crTableLogOnInfo.ConnectionInfo = crConnectionInfo 'crTable.ApplyLogOnInfo(crTableLogOnInfo) role() bindreport() end sub sub bindreport() dim jobcatstr,jobnostr,sdatestr,edatestr,path,sqlstr as string jobcatstr=request(&quot;jobcatstr&quot;) jobnostr=request(&quot;jobnostr&quot;) sdatestr=request(&quot;sdatestr&quot;) edatestr=request(&quot;edatestr&quot;) if jobcatstr&lt;&gt;&quot;&quot; and jobnostr&lt;&gt;&quot;&quot; and sdatestr&lt;&gt;&quot;&quot; and edatestr&lt;&gt;&quot;&quot; then sqlstr=&quot;select * from viewcompt where jobcat like '%&quot;&amp; jobcatstr &amp;&quot;%' and jobno like '%&quot;&amp; jobnostr &amp;&quot;%' and AcutalComptDate between '&quot;&amp; sdatestr &amp;&quot;' and '&quot;&amp; edatestr &amp;&quot;'&quot; elseif jobcatstr&lt;&gt;&quot;&quot; and sdatestr&lt;&gt;&quot;&quot; and edatestr&lt;&gt;&quot;&quot; then sqlstr=&quot;select * from viewcompt where jobcat like '%&quot;&amp; jobcatstr &amp;&quot;%' and AcutalComptDate between '&quot;&amp; sdatestr &amp;&quot;' and '&quot;&amp; edatestr &amp;&quot;'&quot; elseif sdatestr&lt;&gt;&quot;&quot; and edatestr&lt;&gt;&quot;&quot; then sqlstr=&quot;select * from viewcompt where AcutalComptDate between '&quot;&amp; sdatestr &amp;&quot;' and '&quot;&amp; edatestr &amp;&quot;'&quot; else sqlstr=&quot;select * from viewcompt&quot; end if path=server.mappath(&quot;comptpjrpt.rpt&quot;) dim dataset1 as dataset=new dataset() dim objcmd as oledbdataadapter=new oledbdataadapter(sqlstr,objcon) objcmd.fill(dataset1,&quot;viewcompt&quot;) dim orpt as reportdocument=new reportdocument orpt.load(path) orpt.setdatasource(dataset1) CrystalReportViewer1.ReportSource = orpt end sub ' Define Crystal Reports variables 'Dim crReportDocument As ReportDocument 'Dim crExportOptions As ExportOptions 'Dim crDiskFileDestinationOptions As DiskFileDestinationOptions 'Dim Fname as String ' ??????????? ' ???????? InitializeComponent() ????, ' ???? Button_Click ???,???? ' ??????????????????? sub btnclick(obj as object, e as eventargs) 'crReportDocument = New ReportDocument() ' ????????? ' ????:Chart.rpt 'dim path as string 'path=server.mappath(&quot;comptpjrpt.rpt&quot;) 'crReportDocument.Load (path) 'Fname = &quot;c:\exports\&quot; &amp; Session.SessionID.ToString &amp; &quot;.pdf&quot; 'crDiskFileDestinationOptions = New DiskFileDestinationOptions() 'CrDiskFileDestinationOptions.DiskFileName = Fname 'crExportOptions = crReportDocument.ExportOptions 'With crExportOptions '.DestinationOptions = crDiskFileDestinationOptions ' .ExportDestinationType = ExportDestinationType.DiskFile ' .ExportFormatType = ExportFormatType.PortableDocFormat 'End With 'crReportDocument.Export() ' ??????? pdf ? ' ?????????? 'Response.ClearContent() 'Response.ClearHeaders() 'Response.ContentType = &quot;application/pdf&quot; 'Response.WriteFile(Fname) 'Response.Flush() 'Response.Close() ' ?????????? 'System.IO.File.Delete(Fname) ExecutaReportFormato() end sub Private Sub ExecutaReportFormato() Dim objCrystalReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument() Dim objCrystalFileDestinationOptions As New CrystalDecisions.Shared.DiskFileDestinationOptions() 'indica o nome do relatório objCrystalReportDocument.Load(Server.MapPath(&quot;comptpjrpt.rpt&quot;)) 'indica informações de logon Dim crLogonInfo As TableLogOnInfo crLogonInfo = objCrystalReportDocument.Database.Tables(0).LogOnInfo 'crLogonInfo.ConnectionInfo.ServerName = BuscaParam(&quot;zhongsb&quot;) 'crLogonInfo.ConnectionInfo.UserID = BuscaParam(&quot;sa&quot;) 'crLogonInfo.ConnectionInfo.Password = BuscaParam(&quot;3&quot;) crLogonInfo.ConnectionInfo.ServerName = &quot;zhongsb&quot; crLogonInfo.ConnectionInfo.UserID = &quot;sa&quot; crLogonInfo.ConnectionInfo.Password = &quot;3&quot; objCrystalReportDocument.Database.Tables(0).ApplyLogOnInfo(crLogonInfo) 'seta formatação objCrystalReportDocument.FormatEngine.PrintOptions.PaperOrientation = PaperOrientation.Landscape objCrystalReportDocument.FormatEngine.PrintOptions.PaperSize = PaperSize.Paper11x17 ' Seta arquivo de destino do report Dim strExtesion As String ' Select Case drpFormatos.SelectedItem.Text ' Case &quot;PDF&quot; strExtesion = &quot;pdf&quot; objCrystalReportDocument.ExportOptions.ExportFormatType =ExportFormatType.PortableDocFormat ' Case &quot;Excel&quot; ' strExtesion = &quot;xls&quot; ' objCrystalReportDocument.ExportOptions.ExportFormatType = Excel ' Case &quot;Word&quot; ' ' strExtesion = &quot;doc&quot; ' objCrystalReportDocument.ExportOptions.ExportFormatType = WordForWindows ' Case &quot;RTF&quot; 'strExtesion = &quot;rtf&quot; 'objCrystalReportDocument.ExportOptions.ExportFormatType = RichText 'End Select Dim strFile As String = &quot;relat.&quot; &amp; strExtesion Dim strPath As String = &quot;c:\inetpub\wwwroot\sampleNet\temp\&quot; Dim strUrl As String = &quot;temp/&quot; 'Response.Write(&quot;nome do arquivo: &quot; &amp; strFile) objCrystalFileDestinationOptions.DiskFileName = strPath &amp; strFile 'seta propriedades do relat para export objCrystalReportDocument.ExportOptions.DestinationOptions = objCrystalFileDestinationOptions objCrystalReportDocument.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile objCrystalReportDocument.Export() Response.Redirect(strUrl &amp; strFile) End Sub &lt;/script&gt; &lt;form id=&quot;Form1&quot; method=&quot;post&quot; runat=&quot;server&quot;&gt; &lt;/form&gt;</pre> 2003-09-06T01:37:44-04:00