TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Madhav
NA
196
43.3k
not able to generate pdf file from crystal report
Dec 10 2015 2:17 AM
i have done code for pdf generation and that is absolutly working on local host but on another machine i am accessing the same application with the help of IIS server ,But the code i have done that is not able to generate PDF file on another machine and also not able to generate file name dyanamically,where as these things absolutly working on local host(machine on which i have developed application)
the code is as bellow
protected void Button2_Click(object sender, EventArgs e)
{
int QuotationId = Convert.ToInt32(Session["QuotationId"]);
lbl_QuotationId.Text = QuotationId.ToString();
CrystalReportViewer1.Visible = true;
SqlConnection connection = new SqlConnection(CS);
SqlConnection connection1 = new SqlConnection(CS);
connection.Open();
SqlCommand command = new SqlCommand("Select QuotationId,Comp_CompanyName,Comp_CompanyCity,Comp_CompanyAddress,comp_Pin,comp_ContactNo,cust_CustomerName,Desccription,Price,Quantity,LineTotal,Country,DeliveryPeriod,Excise,Taxes,Freight,PayementTerms,RexrothPartNo From quotation where QuotationId=" + lbl_QuotationId.Text.Trim() + "", connection);
SqlDataAdapter adapter = new SqlDataAdapter(command);
FinalQuotation1 dataset = new FinalQuotation1();
adapter.Fill(dataset);
ReportDocument Report = new ReportDocument();
Report.Load(Server.MapPath("FinalQuotationReport.rpt"));
Report.SetDataSource(dataset.Tables[1]);
CrystalReportViewer1.ReportSource = Report;
Report.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, true,"IND " + lbl_QuotationId.Text.Trim()+"_FY15_16"+".pdf");
}
need help
Thanks in advance
Reply
Answers (
1
)
show data in WPF entity framework
how to select data in databsae using jquery ajax and c# code