Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            RptSummaryOfMonthlyPilferage rpt = new RptSummaryOfMonthlyPilferage();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void InitializeReport()
        {
            ReportDocument REPORT_DOC = new ReportDocument();
            REPORT_DOC = new RptSummaryOfMonthlyPilferage();
            DataBaseLogIn(REPORT_DOC);

            ParameterField prmDateFrom = new ParameterField();
            ParameterField prmDateTo = new ParameterField();
            ParameterField prmBrand = new ParameterField();
            ParameterField prmInventoryGroupNumber = new ParameterField();
            ParameterField prmInventoryGroupName = new ParameterField();
            ParameterFields prmList = new ParameterFields();

            prmDateFrom.ParameterFieldName = "@DATE_FROM";
            prmDateTo.ParameterFieldName = "@DATE_TO";
            prmBrand.ParameterFieldName = "@BRAND_NAME";
            prmInventoryGroupNumber.ParameterFieldName = "@INVENTORY_GROUP";
            prmInventoryGroupName.ParameterFieldName = "group_name";

            ParameterDiscreteValue prmDateFromValue = new ParameterDiscreteValue();
            ParameterDiscreteValue prmDateToValue = new ParameterDiscreteValue();
            ParameterDiscreteValue prmBrandValue = new ParameterDiscreteValue();
            ParameterDiscreteValue prmInventoryGroupNumberValue = new ParameterDiscreteValue();
            ParameterDiscreteValue prmInventoryGroupNameValue = new ParameterDiscreteValue();

            prmDateFromValue.Value = Request.QueryString["DateFrom"];
            prmDateToValue.Value = Request.QueryString["DateTo"];
            prmBrandValue.Value = Request.QueryString["Brand"];
            prmInventoryGroupNumberValue.Value = Request.QueryString["InventoryGroupNumber"];
            prmInventoryGroupNameValue.Value = Request.QueryString["InventoryGroupName"];

            prmDateFrom.CurrentValues.Add(prmDateFromValue);
            prmDateTo.CurrentValues.Add(prmDateToValue);
            prmBrand.CurrentValues.Add(prmBrandValue);
            prmInventoryGroupNumber.CurrentValues.Add(prmInventoryGroupNumberValue);
            prmInventoryGroupName.CurrentValues.Add(prmInventoryGroupNameValue);

            prmList.Add(prmDateFrom);
            prmList.Add(prmDateTo);
            prmList.Add(prmBrand);
            prmList.Add(prmInventoryGroupName);
            prmList.Add(prmInventoryGroupNumber);

            this.SummaryOfMonthlyPilferage.ParameterFieldInfo = prmList;
            SummaryOfMonthlyPilferage.ReportSource = REPORT_DOC;
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     RptSummaryOfMonthlyPilferage rpt = new RptSummaryOfMonthlyPilferage();
     rpt.Site = this.Site;
     return rpt;
 }