Пример #1
0
        // we modify the report data source so it uses the CSReportWebServer instead of a real sql engine (SqlServer, PostgreSQL or Oracle)
        //
        public void init(JObject request)
        {
            m_webReportId = request["message"]["webReportId"].ToString();
            m_reportId    = Guid.NewGuid().ToString();
            m_database    = Guid.NewGuid().ToString();
            m_report      = new cReport();

            m_report.setDatabaseEngine(csDatabaseEngine.CSREPORT_WEB);

            m_report.Progress   += reportProgress;
            m_report.ReportDone += reportDone;

            cReportLaunchInfo oLaunchInfo = new cReportLaunchInfo();

            oLaunchInfo.setPrinter(cPrintAPI.getcPrinterFromDefaultPrinter(null));

            registerDataSource(request);

            if (!m_report.init(oLaunchInfo))
            {
                return;
            }

            m_report.setPathDefault(Application.StartupPath);
        }