Esempio n. 1
0
        /// <summary>
        /// Called before the report starts processing.
        /// This is where report object initialization occurs.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void rptDetails_ReportStart(object sender, EventArgs e)
        {
            VWA4Common.GlobalSettings.SubReportWasPrinted = false;
            if (_InputParameters["Filter"] != null && _InputParameters["Filter"].ParamValue != "")            //add type to filter
            {
                _InputParameters["Filter"].ParamValue = _InputParameters["DetailsType"].ParamValue + "TypeID = '" + _InputParameters["DetailsParameter"].ParamValue + "' AND (" +
                                                        _InputParameters["Filter"].ParamValue + ")";
            }
            else
            {
                _InputParameters["Filter"].ParamValue = _InputParameters["DetailsType"].ParamValue + "TypeID = '" + _InputParameters["DetailsParameter"].ParamValue + "'";
            }

            _rptARTrend = new rptARTrend(_InputParameters);
            if (_InputParameters["Title"] != null && _InputParameters["Title"].ParamValue != "")
            {
                this.lblTitle.Text = _InputParameters["Title"].ParamValue;
            }
            else
            {
                this.lblTitle.Text = "Close-Up View Report for " + _InputParameters["DetailsType"].ParamValue + ": " + _InputParameters["DetailsParameter"].DisplayValue;
            }
            txtSubTitle.Text = _InputParameters["SubTitle"].ParamValue;
            SetLogo();
            if (_InputParameters["Filter"].ParamValue != "")
            {
                this.lblFooter.Text = "Filter used: " + _InputParameters["Filter"].DisplayValue;
            }
            this.lblDB.Text                 = "Current DataBase:" + UserControls.VWAPath.ViewWasteDBName;
            this.subARTrend.Report          = _rptARTrend;
            this.subReport1.Report          = new rptTopReport(_InputParameters, "Food", 4);
            this.subReport2.Report          = new rptTopReport(_InputParameters, "Loss", 4);
            this.subReport3.Report          = new rptTopReport(_InputParameters, "Daypart", 4);
            this.subReport4.Report          = new rptTopReport(_InputParameters, "Station", 4);
            this.subReport5.Report          = new rptTopReport(_InputParameters, "Disposition", 4);
            this.subReport6.Report          = new rptTopReport(_InputParameters, "User", 4);
            this.Document.Printer.Landscape = true;
            //if (!VWA4Common.GlobalSettings.SubReportWasPrinted && !bool.Parse(VWA4Common.GlobalSettings.ShowEmptyReports))
            //this.Cancel();
            this.Document.Printer.Landscape = true;
            //this.PrintWidth = this.PageSettings.PaperHeight - (this.PageSettings.Margins.Top + this.PageSettings.Margins.Bottom);
        }
Esempio n. 2
0
 private void ARTrend_ReportStart(object sender, EventArgs e)
 {
     _rptARTrend            = new rptARTrend(_InputParameters);
     this.subARTrend.Report = _rptARTrend;
 }