cancel
Showing results for 
Search instead for 
Did you mean: 

Can't print from an ASP.NET 2.0 app

Former Member
0 Kudos

I get an "The resource cannot be found error" when trying to print a Crystal Report from my app. Any thoughts on what would cause this. Thanks


        <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" 
            DisplayGroupTree="false" 
            PrintMode="ActiveX"
            DisplayBottomToolbar="false"
            AutoDataBind="true" 
            ToolbarImagesFolderUrl="/crystalTemplate/toolbar/" 
            SeparatePages="true" 
            HasCrystalLogo="false"
            HasExportButton="True"
            HasRefreshButton="true"
            HasToggleGroupTreeButton="false"
               />

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, Evan;

Is this happening on your development computer, or a client?

If it is a client, how did you distribute the Crystal Reports Runtime?

Which version of Crystal Reports are you using?

Best Regards,

Jonathan

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for your suggestions.

Ludek - I used your code and yes it did list the available printers.

Amit - I'm using VS2005 and I'm coding in C#. The report does print just fine in the designer.

Evan

former_member183750
Active Contributor
0 Kudos

OK. Let's take a look at the code used. Can you copy and paste it here, please?

Also, can you try our sample apps? Here is a file that contains a number of C## samples:

https://smpdl.sap-ag.de/~sapidp/012002523100006252712008E/csharp_web_smpl.exe

One of the samples is called printtoprinter, see if that works

.

Oh, just as a reference, this White Paper is very helpful:

http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf

Ludek

Former Member
0 Kudos

This app is still in development so it's on my dev pc. I can't roll it out without the ability to print. I'm using CR Developer 11.5.3.417.

Thanks

Former Member
0 Kudos

Hi,

What version of visual studio you are using.

Is this the issue with .net environment only?

Is the report prints fine from the crystal reports designer?

Regards,

Amit

former_member183750
Active Contributor
0 Kudos

Are the printers visible to the asp .net worker process? Try this code to see if that is so:

Dim cePrinter As String

For Each cePrinter In System.Drawing.Printing.PrinterSettings.InstalledPrinters

Response.Write(cePrinter)

Response.Write("<BR>")

Next

Ludek