Hai, i have one crystal report in my web portal but i can't export report to PDF,its showing one error like this..can u any tell me what is the exact problme below i attched the code and error
CrystalDecisions.Shared.ParameterFields pfields = new CrystalDecisions.Shared.ParameterFields(); CrystalDecisions.Shared.ParameterField pfield1 = new ParameterField();
Failed to export using the options you specified. Please check your options and try again.
I Solved this Issue Using this Code. if any one have like this issue please use this technique,
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared;
public partial class ClientKickOffMeetingReport : System.Web.UI.Page {
ParameterFields pfields = new CrystalDecisions.Shared.ParameterFields(); ParameterField pfield1 = new ParameterField(); ParameterDiscreteValue disvalue1 = new ParameterDiscreteValue(); protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Session.Remove("rep"); Session.Clear();
<div>TO</div> <div> </div> <div>Sujeet Bhujbal SIR</div> <div> </div> <div>Re: Crystal Report Exporting issue.</div> <div>01-20-2012 07:07 AM</div> <div></div> <div>Very... Very Much Thanking you , because of your code above ref. my report print options is doing well</div> <div></div> <div>But problem is that my
report page heading not coming on second page</div> <div></div> <div>Thanks </div> <div>From</div> <div>HASANA COMPUTER - ZINDAGI BANANA</div> <div>M.H.SANADI - 9975376688</div> <div>KABNUR , ICHALKARANJI , HATKANGALE, DIST. KOLHAPUR</div>
sujilkumar
Member
115 Points
135 Posts
Crystal Report Exporting issue.
Jan 20, 2012 05:42 AM|LINK
Hai, i have one crystal report in my web portal but i can't export report to PDF,its showing one error like this..can u any tell me what is the exact problme below i attched the code and error
Sujeet Bhujb...
Member
306 Points
81 Posts
Re: Crystal Report Exporting issue.
Jan 20, 2012 06:07 AM|LINK
Hi
Use following
CrystalReportViewer1.ReportSource = report;
CrystalReportViewer1.Visible = true;
MemoryStream oStream;
oStream = (MemoryStream)report.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(oStream.ToArray());
Response.End();
Regards
Sujeet
Sujeet Bhujbal
Sujeet Bhujbal's Blog
--------------------------------------------------------
If the post is useful don't forget to MARK as Answer
hasanahn
Member
2 Points
1 Post
Re: Crystal Report Exporting issue.
Jan 07, 2013 05:57 AM|LINK
</div> <div>Sujeet Bhujbal SIR</div> <div>
</div> <div>Re: Crystal Report Exporting issue.</div> <div>01-20-2012 07:07 AM</div> <div></div> <div>Very... Very Much Thanking you , because of your code above ref. my report print options is doing well</div> <div></div> <div>But problem is that my report page heading not coming on second page</div> <div></div> <div>Thanks </div> <div>From</div> <div>HASANA COMPUTER - ZINDAGI BANANA</div> <div>M.H.SANADI - 9975376688</div> <div>KABNUR , ICHALKARANJI , HATKANGALE, DIST. KOLHAPUR</div>