Pergunta

I am using crystal report for printing . But after hosting in the server i got a page with following url while printing from a client machine

http://192.168.50.104/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer4/html/crystalexportdialog.htm

and shows

Page not found

error

It is displayed in the report viewer, but the problem comes after clicking the print button of crystal report.

I am using the following code to bind report

 CrystalReportViewer1.ReportSource = CrystalReport;
 CrystalReportViewer1.DataBind();

If anybody knows the solution please help me.... Thanks in advance....

Foi útil?

Solução

On a similar problem, this is what I did

This happens because crystal repots viewer assumes a very specific directory structure for the images and scripts. If you are running IIS on your development machine, you can find the structure here "C:\inetpub\wwwroot\aspnet_client\System_Web\2_0_50727\CrystalReportWebFormViewer4"

Now all you have to do is that copy the content of this whole structure, right from aspnet_client to your webserver and create a virtual directory to point to this path. Even if you dont want to create a virtual directory or dont have access to do so, you can simply copy the full structure to the root of your webapp and that should do the magic.

If you are not using IIS and using a inbuilt webserver with Visual studio (cassini i.e.), still you will have this structure , only thing that in this case it would be available at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top