Пример #1
0
        public void metareportAutoW3Parameter(string parameterSet1, string parameterSet2, string parameterSet3,
                                           string parm1, string parm2, string parm3, string filename,
                                           string reportName)
        {
            this.Cursor = Cursors.WaitCursor;
            MetaReportRuntime.App mm = new MetaReportRuntime.App();
            mm.Init(strMetaReportCode);
            mm.ProjectsPath = "c:\\icalc\\Harmony\\Phakisa\\" + strServerPath + "\\REPORTS\\";
            int repNo = mm.get_OpenReport(reportName);
            mm.SetStringParameter(parameterSet1, parm1.ToString().Trim(), repNo);
            mm.SetStringParameter(parameterSet2, parm2.ToString().Trim(), repNo);
            mm.SetStringParameter(parameterSet3, parm3.ToString().Trim(), repNo);
            mm.StartReportWithParameters(repNo, true);
            //mm.PrintToFile(repNo, filename, MetaReportRuntime.MRFileFormat.ffPDF);
            mm.CloseReport(repNo);
            //System.Diagnostics.Process.Start(filename);

            this.Cursor = Cursors.Arrow;
        }