Ejemplo n.º 1
0
        // Obtain the data for the report
        internal void RunGetData(Report rpt, IDictionary parms)
        {
            // Step 1- set the parameter values for the runtime
            if (parms != null && ReportParameters != null)
            {
                ReportParameters.SetRuntimeValues(rpt, parms);                  // set the parameters
            }
            // Step 2- prep the datasources (ie connect and execute the queries)
            if (this._DataSourcesDefn != null)
            {
                _DataSourcesDefn.ConnectDataSources(rpt);
            }

            // Step 3- obtain the data; applying filters
            if (_DataSetsDefn != null)
            {
                ResetCachedData(rpt);
                _DataSetsDefn.GetData(rpt);
            }

            // Step 4- cleanup any DB connections
            if (_DataSourcesDefn != null)
            {
                if (!this.ContainsSubreport)
                {
                    _DataSourcesDefn.CleanUp(rpt);                      // no subreports means that nothing will use this transaction
                }
            }

            return;
        }
Ejemplo n.º 2
0
        // Obtain the data for the report
        public void RunGetData(IDictionary parms)
        //Called from RdlViewer.GetPages (line836)
        {
            _ExecutionTime.StartReport = DateTime.Now;

            // Step 1- set the parameter values for the runtime
            if (parms != null && ReportParameters != null)
            {
                ReportParameters.SetRuntimeValues(parms);                       // set the parameters
            }
            // Step 2- prep the datasources (ie connect and execute the queries)
            if (DataSources != null)
            {
                DataSources.ConnectDataSources();
            }

            // Step 3- obtain the data; applying filters
            if (DataSets != null)
            {
                ResetCachedData();
                DataSets.GetData();
            }

            // Step 4- cleanup any DB connections
            if (DataSources != null)
            {
                DataSources.CleanUp();
            }

            return;
        }