Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Crystal Report ExportToHttpResponse Error Post Reply Post New Topic
Author Message
arian4uin
Newbie
Newbie


Joined: 12 May 2010
Online Status: Offline
Posts: 2
Quote arian4uin Replybullet Topic: Crystal Report ExportToHttpResponse Error
    Posted: 12 May 2010 at 11:52pm
Hi frnds' I m working on project VS2008 C# and Crystal Report now my problem is when I am trying display report in PDF format direct when user want to view report we are directly opening in new browser in pdf format the below function is being used by us to create it. Its working properly so far on development machine but when we try to dynamically view this reprt on production machine where in we are passing the production machine details at runtime then it is throughing error sayin :-{"Missing parameter values."}

*****************************************************
        public void showSOAReport(string fromNo, string toNo, string reportMode)
        {
            string main = "rptSOAPreview.rpt";
            string subRpt1 = "rptSOAPreviewsub1.rpt";
            string subRpt2 = "rptSOAPreviewsub2.rpt";
            string subRpt3 = "rptSOAPreviewsub3.rpt";

            ReportDocument rptDoc = new prjBEW0910.Reports.rptSOAPreview();
            ReportDocument rptDoc1 = new prjBEW0910.Reports.rptSOAPreviewsub1();
            ReportDocument rptDoc2 = new prjBEW0910.Reports.rptSOAPreviewsub2();
            ReportDocument rptDoc3 = new prjBEW0910.Reports.rptSOAPreviewsub3();

            rptDoc.SetDatabaseLogon(UserId,Pwd,Server,DB);
            rptDoc1.SetDatabaseLogon(UserId,Pwd,Server,DB);
            rptDoc2.SetDatabaseLogon(UserId,Pwd,Server,DB);
            rptDoc3.SetDatabaseLogon(UserId,Pwd,Server,DB);

            rptDoc.ParameterFields["@Mode"].CurrentValues.AddValue ((int)1);
            rptDoc.ParameterFields["@SOANoFrom"].CurrentValues.AddValue ((string)fromNo);
            rptDoc.ParameterFields["@SOANoTo"].CurrentValues.AddValue((string)toNo);

            rptDoc1.ParameterFields["@Mode"].CurrentValues.AddValue ((int)2);
            rptDoc1.ParameterFields["@SOANoFrom"].CurrentValues.AddValue((string)fromNo);
            rptDoc1.ParameterFields["@SOANoTo"].CurrentValues.AddValue((string)toNo);

            rptDoc2.ParameterFields["@Mode"].CurrentValues.AddValue ((int)3);
            rptDoc2.ParameterFields["@SOANoFrom"].CurrentValues.AddValue((string)fromNo);
            rptDoc2.ParameterFields["@SOANoTo"].CurrentValues.AddValue((string)toNo);

            rptDoc3.ParameterFields["@Mode"].CurrentValues.AddValue((int)4);
            rptDoc3.ParameterFields["@SOANoFrom"].CurrentValues.AddValue((string)fromNo);
            rptDoc3.ParameterFields["@SOANoTo"].CurrentValues.AddValue((string)toNo);

            ExportOptions exportOpt = new ExportOptions();
            exportOpt.ExportFormatType = ExportFormatType.PortableDocFormat;
            exportOpt.ExportDestinationType = ExportDestinationType.DiskFile;

            HttpContext.Current.Response.Buffer = false;
            HttpContext.Current.Response.ClearContent();
            HttpContext.Current.Response.ClearHeaders();

            rptDoc.ExportToHttpResponse(exportOpt, HttpContext.Current.Response, false, "Report"); //Error is coming over here {"Missing parameter values."}
        }
*****************************************************
Please help me frnd to know where I m going wrong. To make this report work properly on production we again need to do Set Datasource location on production machine and then its working fine. What is going wrong or where I have done mistake.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.