Click here to Skip to main content
15,905,504 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to show crystal report pdf view into panel my code is like that

MainClass main = new MainClass(); //main is private class
main.Qurrystring = "SELECT * FROM Vehicle_Propfit_Loss";
main.Report_Call(main.Qurrystring);
ReportDocument rpt = new ReportDocument();
rpt.Load(Server.MapPath("Vehicle_Propfit_Loss.rpt"));
rpt.SetDataSource(main.dt);
rpt.SetParameterValue("fdt",txtfdt.Text);
rpt.SetParameterValue("tdt",txttdt.Text);

rpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "ExportedReport");

C#
it works but,it should be priview in panel
Posted
Updated 2-Dec-13 0:23am
v2
Comments
thatraja 2-Dec-13 6:17am    
I understand your question, what's the issue with panel?
dhiraj mane 2-Dec-13 6:22am    
ok, thanks i want to use panel, so what code to use
thatraja 2-Dec-13 7:29am    
Isn't working?(putting report viewer inside a panel), please give use full details
dhiraj mane 3-Dec-13 1:21am    
i am not using crystal report viewer to show i am directly show in pdf
thatraja 3-Dec-13 2:11am    
oh, you want to show pdf inside a panel?

1 solution

Hereafter mention all details clearly in your question if you want quick & right answer.

Based on your question(?) & comment(s), here answer.

IFrame[^] is quick solution. Put IFrame inside a Panel & load the PDF into IFrame. That's it.

Or if you want to make easy job then check these articles
ASP.NET PDF Viewer User Control Without Acrobat Reader Installed on Client or Server[^]
How to Display PDF documents with ASP.NET[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900