error in exporting report to pdf

When I am trying to export the report to pdf it is giving me this error:

Invalid file name.
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.LoadSaveReportException: Invalid file name.
This is my code
Dim oConnection As New SqlClient.SqlConnection("server=(local); database = Medisys; Trusted_connection=yes ")
Dim oCommand As New _
SqlClient.SqlCommand("select * from tmpRptCheckRegister", oConnection)
Dim ds As New DataSet()
Dim oDataAdapter As New SqlClient.SqlDataAdapter(oCommand)
oDataAdapter.Fill(ds, "oClaims")
Dim rpt As New CrystalReport1()
CrystalReportViewer1.ReportSource = rpt
CrystalReportViewer1.DisplayGroupTree = False
CrystalReportViewer1.Visible = True
Dim myExportOptions As ExportOptions = New ExportOptions()
Dim myDiskFileDestinationOptions As DiskFileDestinationOptions = New DiskFileDestinationOptions()
Dim myFormatTypeOptions As PdfRtfWordFormatOptions = New PdfRtfWordFormatOptions()
myDiskFileDestinationOptions.DiskFileName = "C:\inetpub\wwwroot\testFold\"
myExportOptions = rpt.ExportOptions
myExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
myExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
myExportOptions.DestinationOptions = myDiskFileDestinationOptions
myExportOptions.FormatOptions = myFormatTypeOptions
when I changed diskfileName from C:\inetpub\wwwroot\testFold\ to C:\CrystalReport then it gave me this error:
Error in File C:\WINDOWS\TEMP\temp_80b4fd0b-3493-46e6-b939-118efb5cbab4.rpt: Access to report file denied. Another program may be using it.
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.
Please let me know why it is giving this error
Any help will be greatly appreciated.
3/20/2004 6:03:53 PM 7043 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 27


Did you give the file name along with Path like C:\CrystalReport\test.pdf.
3/23/2004 2:23:18 PM

Similar Artilces:

Converting Crystal Reports 9 report to Crystal Reports .NET report
I have a web page that is supposed to display a crystal report.  The report is fully written and functional in crystal 9 (non-.Net)  .  Is there a way to convert my .rpt so that I can just include it in the new web site? why you don't try to compile project with .net and include your report. then if crystal report is power tool will suggests you with conversation tool    My blog is here.Please remember to 'Mark as Answer' if this post answered your question! Wow it really was that easy!  I just added the old crystal report into my .NET proj...

Crystal Report.NET: Error occurred when export to PDF
I encountered this error when attempting to export a report to PDF in a Window Form application: System.NotSupportedException: Error in File C:\DOCUME~1\tnguyen1\LOCALS~1\Temp\temp_a605641b-1f63-401d-b8e3-710c095306bd.rpt: Operation not yet implemented. at .A(Int16 , Int32 ) at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export() at WinFormReport.ReportManager.ExportToPdf(ReportDocume...

Export Crystal report to PDF report
Hello, Does anyone knows how to export the Crystal report (.rpt) to the PDF report in c#?  Thanks  Don't say thanks rather mark my reply as "Answer" if it helps you ,Doing so u'll get points tooamiT jaiNC#.NET Articles Hi, You can use the following  rptDoc.ExportToHttpRespons...

crystal reports .net -> crystal reports .net 2003
recently converted a project from .net to .net 2003. The 2 crystal reports I had in the project do not load when executing the application. The project itself within 2003 will allow me to multiplat the crystal reports, however when it comes to execution time I get the error: Invalid Data Source. If this isn't the right forum please point me to the right one as this is really the only website I know of with a large reader base. >to multiplat the crystal reports To what the crystal reports? Do you have the same database connections established and verified in your 2003 s...

Crystal Reports error exporting to a pdf. Use to work now it gives error.
Our website generates numerous reports using crystal reports 8.5 and VS 2005. They have always worked in the past and just today they started giving an error. We tried unistalling CR and reintalling but it still didn't help. It says the error is on the line that exports the file. In SQL it shows that user for that report logging in and shows a select statement but it does not generate the report. The reports are stored in a temp folder and then displayed back to the browser. We deleted all the files in the temp folder and still no luck. We can open CR and run the report from there. We ra...

Crystal reports error when exporting to pdf....
Can anyone give me any suggestions?? It works on the local machine but when it is on the web server it crashes when I try and export. What folder do I have to set permissions to. I have done add view modify to the IIS folder where the app lies is there somewhere else I have to put this as well. PLEASE HELP!!! Here is the code on the button and the error.crReportDocument = New ReportDocument         crReportDocument.Load("\Inetpub\wwwroot\WebApp\CrystalReport2.rpt")         Fname = "c:\exports" & Session.Sessi...

Crystal report Export to pdf error
Hi I have CR 11 to develop my reports and display them in .Net 2005 . The printing option works only for Activex (manually changed the Printmode setting to activex ) . Both export to pdf and printing using pdf is not working for me. Please help  What version crystal report you are using?  When you export into PDF what problem you are facing?If this post is answer of your question then don't forgot to Click Mark As Answer  I use Crystal reports 11 . When i click on export button, i see a list of options (formats) , when i select pdf , the pdf window opens wi...

Export Crystal Report to Crystal Report format
I looked at some sample code provided by crystaldecisions, and they have the ability to export a web crystal report to a crystal report. I was assuming that this would cause the local instance of Crystal reports on the client machine to be invoked. I tried this in my project, and I get the following error: Error Encountered by Crystal Web Report Server -------------------------------------------------------------------------------- The error message returned is: Connection to Report Server Failed. It creates the file as an .rpt file in the directory it should. Do I need a dif...

when i try to export the report to pdf format in button click event it gives me LOGON error.I am using push method to create the report .The code to create the report is written in page load
Calling this function in button click eventPrivate Sub ExportToPDF() Try Dim crExportOptions As New ExportOptions Dim crReportDocument As New ReportDocument Dim crDiskFileDestinationOptions As DiskFileDestinationOptions Dim ExportPath As String Dim ExportedFileName As String Session("ReportName") = " CrystalReport1" Dim rpt1 As New CrystalReport1 Session.Add("ActiveReport", rpt1) crReportDocument = Session.Item("ActiveReport") ExportPath = Request.PhysicalApplicationPath + "ReportOutput\" If System.IO.Directory.Exists(ExportPath) = False Then System.IO.Directory.CreateDirector...

Crystal report exporting to PDF giving error.
Dear Friends, I am facing a silly problem. The code is as follows, oStream = Report.ExportToStream(ExportFormatType.PortableDocFormat) Response.Clear() Response.Buffer = True Response.ContentType = "application/pdf"Response.AddHeader("Content-Disposition", "inline; filename=eBook.pdf") Response.BinaryWrite(oStream.ToArray()) Response.End() Report.Close() When the line Response.End() is executed it gives a thread abort exception. Can someone tell me any thing external or from a tool can be done to over come the error. The report gets exported into pdf...

Logon error while exporting crystal report to pdf file
iam having problem exporting the crystal report from my .aspx page. first iam displaying the crystal report in .aspx page.from tha t page iam exporting it to a pdf file.i have provided a button to export the report to a pdf file. the problem is coming in exporting the report to pdf file iam getting logon error i.e CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed. the code for export button is Dim myReport As New Employee()                Dim strExportFile As String       &nb...

Crystal Reports Error: Memory full. Failed to export the report. Not enough memory for operation.
In my ASP.NET 2.0 (C#) application, the following line of code gives the error "Memory full. Failed to export the report. Not enough memory for operation." myReport.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, blnAsAttachment, strAttachmentFilNam); The same code is working fine on many other installations. The server in question has plenty of memory available. Any help is appreciated.    Hi scptech,That's stupid remark about your problems, but do you used some OLE object inside your report ?Do you have try to export the export as Excel or ...

data truncation problem while Exporting report to PDF using Crystal Reports 11.0
hi, I need a solution for data truncation problem while Exporting report to PDF using Crystal Reports 11.0 version.    ...

Errors with all my reports after upgrade from Bundeled Crystal.NET (VS2003) to Crystal XI Developer for .NET
All my Crystal reports were developed using the bundled Crystal in VS 2003.  I just installed the Crystal XI for .NET Developer version that we purchased and now I get an error when running my reports.  (I am running them in debug mode on my development machine). I have tested it on several different reports.  I did not change the code, this worked fine in the previous version. First I reference my report (AccountList is the AccountList.rpt report that is in my project): Dim myReport As New AccountList Then I start rolling through the report's tables to update the log...

Export Crystal Report to PDF -error missing parameter value
i want to export my crystal report to pdfi wrtie my codewhen i pass the perameter,crystal report export pdf that give me error of missing perameter valuehere i m write my code below! ]using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using CrystalDecisions.Shared;using CrystalDecisions;using System.Data.SqlClient;using CrystalDecisions.CrystalReports.Engine;//using CrystalDecisions.Report...

Web resources about - error in exporting report to pdf -

Gas Exporting Countries Forum - Wikipedia, the free encyclopedia
The Gas Exporting Countries Forum ( GECF ) is an intergovernmental organization of 11 of the world's leading natural gas producers made up of ...

Facebook policy now clearly bans exporting user data to competing social networks
... of account settings, so it’s unlikely that many users have done this. Google and Facebook blocked or put up roadblocks on importing and exporting ...

Lower dollar a boon for Canberra's wine exporting king
It may mean more expensive holidays for some, but one ACT registered company has enjoyed a profitable time thanks to the sharp fall in the Australian ...

Irish plant shut for exporting horsemeat
Sky News is Australia's leader in 24-hour news.

New online freight marketplace Cargohound aims to be the Uber of exporting
Cargo Hound wants to revolutionise the way goods are shipped from Australia.

Exporting the desperate; out of sight ... and mind
The boats have stopped, the point's been made, so why continue to treat those already ''here'' with such unconscionable cruelty?

Meat market: Andrew Forrest sees fortune in exporting beef to China
China is so desperate for good beef that Australian billionaire Andrew Forrest will be taking sample parcels of steak in his luggage on his next ...

Exporting carbon and hypocrisy: our big growth industry
Never mind our modest cuts to local emissions, new research shows Australia is heading into a carbon export boom.

Montreal men accused of illegally exporting railway equipment to Iran
Two Montreal men are charged with illegally exporting American-made railway equipment to Iran, violating Canada's Export and Import Permit Act ...

Canada's Most Unequal Provinces: Energy Exporting Regions See Growing Inequality
StatsCan’s new survey of top income taxfilers shows the country’s one-percenters are taking home slightly less of the national income pie than ...

Resources last updated: 12/28/2015 12:44:54 AM