Exemple #1
0
        private void SubreportProcessingHandler(object sender, SubreportProcessingEventArgs e)
        {
            var parameters = e.Parameters;
            var date       = DateTime.Parse(parameters["Date"].Values[0]);
            var shift      = parameters["Shift"].Values[0];
            var workArea   = parameters["WorkArea"].Values[0];

            e.DataSources.Add(new ReportDataSource("DataSet1"));
            e.DataSources["DataSet1"].Value = _journalRecords
                                              .Where(jr => jr.Date == date && jr.Shift.Value == shift && jr.WorkArea == workArea)
                                              .Select(jr => new Record
            {
                Defectoscope = jr.DefectoscopeName,
                Duration     = jr.Duration.TotalMinutes,
                Normative    = jr.Normative.TotalMinutes,
                End          = jr.End,
                Start        = jr.Start,
                Operation    = jr.OperationName,
                Description  = jr.Description
            })
                                              .ToList();

            e.DataSources.Add(new ReportDataSource("DataSet2"));
            e.DataSources["DataSet2"].Value = _journalRecords
                                              .Where(jr => jr.Date == date && jr.Shift.Value == shift && jr.WorkArea == workArea)
                                              .GroupBy(jr => jr.Operation.Work.OperationGroup)
                                              .Select(g => new Summary
            {
                OperationType = g.Key,
                Deviation     = Math.Round(g.Sum(jr => jr.Deviation.TotalMinutes), 2),
                Duration      = Math.Round(g.Sum(jr => jr.Duration.TotalMinutes), 2),
                Normative     = Math.Round(g.Sum(jr => jr.Normative.TotalMinutes), 2),
                Quantity      = g.Count()
            });
        }
Exemple #2
0
        private void InnerReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            if (this._subReports?.Count > 0)
            {
                var foundSubReport = this._subReports.FirstOrDefault(o => e.ReportPath.Equals(o.ReportEmbeddedResource?.Trim()));
                if (foundSubReport == null)
                {
                    foundSubReport = this._subReports.FirstOrDefault(o => e.ReportPath.EndsWith("." + o.ReportEmbeddedResource?.Trim()));
                }

                if (foundSubReport != null)
                {
                    var dataSources = this.GetSubReportDataSources(foundSubReport);
                    if (dataSources?.Count > 0)
                    {
                        foreach (var dataSource in dataSources)
                        {
                            e.DataSources.Add(new ReportDataSource()
                            {
                                Name = dataSource.Name, Value = dataSource.Value
                            });
                        }
                    }
                }
            }
        }
 void locReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     foreach (ReportDataSource dataSrc in ((Microsoft.Reporting.WebForms.LocalReport)sender).DataSources)
     {
         e.DataSources.Add(dataSrc);
     }
 }
Exemple #4
0
        private void SubChiTietSPProcessing(object sender, SubreportProcessingEventArgs e)
        {
            string           manx = e.Parameters["MaNX"].Values[0].ToString().Trim();
            ReportDataSource dts  = new ReportDataSource("dsKhachSubCTRP", rpBAL.ChiTietByMaNX(manx));

            e.DataSources.Add(dts);
        }
Exemple #5
0
        protected void ReportViewer1_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            //DataSet dataSet = new DataSet();
            //dataSet.ReadXml(MapPath("Employee.xml"));
            int id      = int.Parse(e.Parameters[0].Values[0]);
            var context = new Entities();

            var query = from c in context.EE_INGRESOS
                        join det in context.EE_DETALLES_INGRESO on c.ID_INGRESO equals det.ID_INGRESO
                        where c.ID_ORDEN_PRODUCCION == id
                        select det;

            var query1 = from c in context.EE_CORTES
                         where c.ID_ORDEN_PRODUCCION == id
                         select c;
            var query2 = from c in context.EE_DETALLES_SALIDA_OP
                         where c.ID_ORDEN_PRODUCCION == id
                         select c;
//            e.DataSources.Add(
//new
//ReportDataSource
//(
//"DataSetArticulos"
//,
//new
//ClaseLineas
//().Filtro(
//int
//.Parse(e.Parameters[0].Values[0]))));
            ReportDataSource dataSource = new ReportDataSource("DataSet1", query);

            e.DataSources.Add(new ReportDataSource("DataSetCorte", query1));
            e.DataSources.Add(new ReportDataSource("DataSetSalida", query2));
            e.DataSources.Add(dataSource);
        }
Exemple #6
0
        private void LocalReport_SubreportProcessing6(object sender, SubreportProcessingEventArgs e)
        {
            int maHDXuat = int.Parse(e.Parameters["paMaHDXuat"].Values[0]);
            List <rptCTHDXuatDTO> lsCTHDXuat = rptCTHDXuatBUS.ReportLayDSCTHDXuat(maHDXuat);

            e.DataSources.Add(new ReportDataSource("DSCTHDXuat", lsCTHDXuat));
        }
Exemple #7
0
        void CargarSubReporte(object sender, SubreportProcessingEventArgs e)
        {
            DataSet DS = DatosEntidad.Dataset("DescuentoGrupoMasora", "", this.Periodo, 0.00);

            //e.DataSources.Add(new ReportDataSource("DataSetSubReporte", (object)DBMETALDataSet.Rpt_LiquidacionMineraGrafica));
            e.DataSources.Add(new ReportDataSource("DataSet_DescuentosLiquidacionGrupoMasora", DS.Tables[0]));
        }
Exemple #8
0
        protected void onSubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            dbintegracaoDataSetTableAdapters.qryItemPedido_OticaTableAdapter itempedido = new dbintegracaoDataSetTableAdapters.qryItemPedido_OticaTableAdapter();
            DataTable dt = itempedido.GetData(Convert.ToInt64(Id));

            e.DataSources.Add(new ReportDataSource("DataSetItemPedido_Otica", (object)dt));
        }
        private void U_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            var d = (db.ToutSousEvenement().Where(sse => sse.noEvenement == int.Parse(e.Parameters.First(param => param.Name == "noEvenement").Values[0])));
            ReportDataSource datasource2 = new ReportDataSource("DataSet1", d);

            e.DataSources.Add(datasource2);
        }
Exemple #10
0
        /// <summary>
        /// Processa o sub relatório
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            string sObj_id = Request["id"];
            int    obj_id  = 0;

            if (Int32.Parse(sObj_id) > 0)
            {
                obj_id = Convert.ToInt32(sObj_id);
            }

            string sord_id = Request["ord_id"];
            int    ord_id  = 0;

            if (Int32.Parse(sord_id) > 0)
            {
                ord_id = Convert.ToInt32(sord_id);
            }


            e.DataSources.Clear();

            System.Data.DataSet ds_sub  = new RelatoriosDAO().GruposVariaveisValores_ListAll(obj_id, ord_id, 0);
            ReportDataSource    rds_sub = new ReportDataSource("dsFicha2_sub", ds_sub.Tables[0]);

            e.DataSources.Add(rds_sub);
        }
 protected void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     try
     {
         RDLReportDocument subReport = _reportDocument.SubReportList.Find(item => item.Name == e.ReportPath);
         if (subReport != null)
         {
             subReport.LoadSubReportSourceDataSet(e.Parameters);
             ReportDataSource rdSource = null;
             foreach (DataTable dtTable in subReport.DsSource.Tables)
             {
                 rdSource       = new ReportDataSource();
                 rdSource.Name  = dtTable.TableName;
                 rdSource.Value = dtTable.DefaultView;
                 e.DataSources.Add(rdSource);
             }
         }
         else
         {
             foreach (RDLReportDocument subSubReport in _reportDocument.SubReportList)
             {
                 SubSubreportProcessing(subSubReport, e);
             }
         }
     }
     catch (Exception ex)
     {
         throw (ex);
     }
 }
Exemple #12
0
 void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     foreach (RDLC r in SubReportList)
     {
         e.DataSources.Add(new ReportDataSource(r.DataSetName, r.Data));
     }
 }
Exemple #13
0
 /// <summary>
 /// Handles SubreportProcessing event for the subreport.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Microsoft.Reporting.WebForms.SubreportProcessingEventArgs"/> instance containing the event data.</param>
 /// <createdby>Amit Kumar Chandra</createdby>
 /// <createddate>30/06/2012</createddate>
 private void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     for (int index = 0; index < _lstSubReportDataSource.Count; index++)
     {
         e.DataSources.Add(_lstSubReportDataSource[index]);
     }
 }
Exemple #14
0
 void SubreportProcessingEventHandler(object sender, SubreportProcessingEventArgs e)
 {
     e.DataSources.Add(new ReportDataSource("DataSet1", (object)telefonos));
     e.DataSources.Add(new ReportDataSource("DataSet2", (object)correos));
     e.DataSources.Add(new ReportDataSource("DataSet3", (object)cuentas));
     e.DataSources.Add(new ReportDataSource("DataSet4", (object)direecciones));
 }
Exemple #15
0
        void report_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            string    str_tjbh = e.Parameters["pTjbh"].Values[0];
            DataTable dt1      = tjjgBiz.Get_TJ_TJJLB_XJ(str_tjbh);

            e.DataSources.Add(new ReportDataSource("PEISDataSet_v_tjjlmx", dt1));
        }
Exemple #16
0
        private void LayLuongSub(object sender, SubreportProcessingEventArgs e)
        {
            string          maLoaiNV  = e.Parameters["paLoaiNV"].Values[0].ToString();
            List <LuongDTO> lsLuongnv = lsLuong.FindAll(o => o.MaLoaiNV == int.Parse(maLoaiNV));

            e.DataSources.Add(new ReportDataSource("dsLuongnv", lsLuongnv));
        }
Exemple #17
0
 void report_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     foreach (ReportBase subReport in genReport.SubReports)
     {
         e.DataSources.Add(new ReportDataSource(subReport.DataSourceName, subReport.ExportedTable));
     }
 }
 private void Report_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     foreach (ReportDataSource rds in ((LocalReport)sender).DataSources)
     {
         e.DataSources.Add(rds);
     }
 }
Exemple #19
0
        public static void SetSubDataSource(object sender, SubreportProcessingEventArgs e)
        {
            var mainSource = ((LocalReport)sender).DataSources["DataSet2"];

            var dado = mainSource.Value;

            object subsource = null;

            if (dado is int || dado is long)
            {
                subsource = (int)dado;
            }

            if (dado is List <DTOTotalizador> )
            {
                subsource = dado as List <DTOTotalizador>;
            }



            if (subsource != null)
            {
                e.DataSources.Add(new ReportDataSource("SubDataSet1", subsource));
            }
        }
 private void FacturasVentaSub(object sender, SubreportProcessingEventArgs e)
 {
     int NumeroCaso = Convert.ToInt32(e.Parameters["NumeroCaso"].Values[0].ToString());
     DataTable dtFacturaVenta = reportes.reporteFacturasVenta(NumeroCaso.ToString());
     ReportDataSource ds = new ReportDataSource("FacturasVenta", dtFacturaVenta);
     e.DataSources.Add(ds);
 }
    void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
    {
      ObjectDataSource ods2 = this.ObjectDataSource2;
      {
        ods2.TypeName = " JMReports.WebApp.ReportBussiness.RoomCompeteReport";
        ods2.SelectMethod = "getReport2";
        ods2.SelectParameters.Clear();
        ods2.SelectParameters.Add("HotelId", this.selDept.SelectedValue.ToString());
        ods2.SelectParameters.Add("mYear", this.ddlYear.SelectedValue.ToString());
        ods2.SelectParameters.Add("mMonth", this.ddlMonth.SelectedValue.ToString());
        ods2.SelectParameters.Add("combination", e.Parameters["Combination"].Values[0]);
      }

      ObjectDataSource ods = this.ObjectDataSource3;
      {
        ods.TypeName = " JMReports.WebApp.ReportBussiness.RoomCompeteReport";
        ods.SelectMethod = "getRoomCompeteCurrentMonthDS";
        ods.SelectParameters.Clear();
        ods.SelectParameters.Add("HotelId", this.selDept.SelectedValue.ToString());
        ods.SelectParameters.Add("mYear", this.ddlYear.SelectedValue.ToString());
        ods.SelectParameters.Add("mMonth", this.ddlMonth.SelectedValue.ToString());
        ods.SelectParameters.Add("combination", e.Parameters["Combination"].Values[0]);
      }


      e.DataSources.Add(new ReportDataSource("RoomCompeteCurrentMonthDS", ods));
      e.DataSources.Add(new ReportDataSource("RoomCompeteDS2", ods2));
    }
Exemple #22
0
        void report_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            DataTable dt1  = zysBiz.GetZys(strTjbh);
            DataTable dt2  = GetZybRyxx(strTjbh, strTjcs);
            DataTable dt3  = zzBiz.GetZybZz(strTjbh, strTjcs);
            DataTable dtTz = zzBiz.GetTz(strTjbh, strTjcs);
            DataTable dt4  = rdlcbiz.Get_v_tj_tjdjb(strTjbh, strTjcs);
            DataTable dt5  = GetMobliePh(strTjbh);


            DataTable dtZhxmmx = new DataTable();

            dtZhxmmx = rdlcbiz.GetTjjlmx(strTjbh, strTjcs);


            if (dtTz.Rows.Count <= 0)
            {
                DataRow row = dtTz.NewRow();
                row["tjbh"] = strTjbh;
                row["tjcs"] = strTjcs;
                row["一般状况"] = DBNull.Value;
            }

            e.DataSources.Add(new ReportDataSource("PEISDataSet_v_zyb_zys", dt1));
            e.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_zyb_ryxx", dt2));
            e.DataSources.Add(new ReportDataSource("PEISDataSet_TJ_ZYB_ZZ", dt3));
            e.DataSources.Add(new ReportDataSource("PEISDataSet_v_zyb_zz", dt3));
            e.DataSources.Add(new ReportDataSource("PEISDataSet_Pro_zybtj_bg", dtTz));
            e.DataSources.Add(new ReportDataSource("PEISDataSet_v_tj_tjdjb", dt4));
            e.DataSources.Add(new ReportDataSource("PEISDataSet_v_tjjlmx", dtZhxmmx));
            e.DataSources.Add(new ReportDataSource("DataSet1", dt5));
            //e.DataSources.Add(new ReportDataSource("PEISDataSet_Pro_zybtj_bg", dt6));
        }
        void CargarSubReporte_GraficaGrupoDamasa(object sender, SubreportProcessingEventArgs e)
        {
            DataSet DS = DatosEntidad.Dataset("GraficoGrupoDamasa", "", 0, 0.00);

            //e.DataSources.Add(new ReportDataSource("DataSetSubReporte", (object)DBMETALDataSet.Rpt_LiquidacionMineraGrafica));
            e.DataSources.Add(new ReportDataSource("DataSetLiquidacionMineraGraficaGrupoDamasa", DS.Tables[0]));
        }
 private void FacturasSub(object sender, SubreportProcessingEventArgs e)
 {
     string ID = e.Parameters["NumeroCaso"].Values[0].ToString();
     DataTable dtFacturas = reportes.reporteFacturasCasoAlquiler(ID);
     ReportDataSource ds = new ReportDataSource("FacturasAlquiler", dtFacturas);
     e.DataSources.Add(ds);
 }
Exemple #25
0
        public void SubreportProcessing(SubreportProcessingEventArgs e)
        {
            if (OnSubreport != null)
            {
                OnSubreport(e);
                return;
            }
            string           fnm = ReportHelper.ReportNameFromPath(e.ReportPath);
            ReportViewerData rvd = SubReports[fnm];

            foreach (var link in rvd.SubreportLinks.Values)
            {
                DataTable dt = rvd.Sources[link.SourceName] as DataTable;
                DataView  dv;
                if (dt == null)
                {
                    dv = rvd.Sources[link.SourceName] as DataView;
                    if (dv == null)
                    {
                        throw new Exception("Not supported DataSource");
                    }
                    dt = dv.Table;
                }
                string filter = link.GetFilterString(e);
                dv = new DataView(dt, filter, null, DataViewRowState.CurrentRows);

                e.DataSources.Add(
                    new ReportDataSource(link.SourceName, dv.ToTable()));
            }
        }
Exemple #26
0
        private void LocalReport_SubreportProcessing7(object sender, SubreportProcessingEventArgs e)
        {
            int maHD = int.Parse(e.Parameters["paMaHD"].Values[0]);
            List <rptCTHDBanHangDTO> lsCTHDBanHang = rptCTHDBanHangBUS.ReportLayDSCTHDBanHang(maHD);

            e.DataSources.Add(new ReportDataSource("DSCTHDBanHang", lsCTHDBanHang));
        }
Exemple #27
0
        private void LocalReport_SubreportProcessing5(object sender, SubreportProcessingEventArgs e)
        {
            int maHDNhap = int.Parse(e.Parameters["paMaHDNhap"].Values[0]);
            List <rptCTHDNhapDTO> lsCTHDNhap = rptCTHDNhapBUS.ReportLayDSCTHDNhap(maHDNhap);

            e.DataSources.Add(new ReportDataSource("DSCTHDNhap", lsCTHDNhap));
        }
Exemple #28
0
 static void SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     foreach (var subReportDataSource in _subReportDataSources)
     {
         e.DataSources.Add(subReportDataSource);
     }
 }
 void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     // Author id is passed to the subreport as a parameter.
     //int authorId = int.Parse(e.Parameters[0].Values[0]);
     // Supply data for the subreport.
     e.DataSources.Add(new ReportDataSource("Accounting_Report_Accounts_BalanceSheets_BalanceSheetLine", mModel.Lines));
 }
Exemple #30
0
 void LegPlanSubreportProcessingEventHandler(object sender, SubreportProcessingEventArgs e)
 {
     if (ds != null)
     {
         e.DataSources.Add(new ReportDataSource("DataSetPLGO", ds.Tables["DataTable1"]));
     }
 }
        public void OnSubreportProcessing(ReportViewer reportViewer, SubreportProcessingEventArgs e)
        {
            var countryId = int.Parse(e.Parameters["CountryId"].Values.First());
            var cities    = LocalData.GetCitiesByCountryId(countryId);

            e.DataSources.Add(new ReportDataSource("Cities", cities));
        }
Exemple #32
0
        //Process subreport(s) which you include in main report (from ToolBox)
        public void SubreportProcessingEventHandler(object sender, SubreportProcessingEventArgs e)
        {
            ReportParameterInfoCollection infoParam = e.Parameters;
            string strCaseId = infoParam[0].Values[0].ToString();

            switch (e.ReportPath)
            {
            case "subreport1":
                ;
                break;

            case "ReportCustomersAddress":
                cmd.CommandText = strCustomerAddress + @" where ""CustomerID"" = '" + strCaseId + "'";
                var dtCustomersAddress = dc.GetDataSet(cmd, CommandType.Text, null).Tables[0];
                e.DataSources.Add(new ReportDataSource("dtCustomersAddress", dtCustomersAddress));
                break;

            case "subreport3":
                ;
                break;

            default:
                break;
            }
        }
        /// <summary>
        /// Popula os campos referentes ao dados de informação nuntricinal de cada etiqueta a ser impressa
        /// </summary>
        private void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            try
            {
                var          mainSource = ((LocalReport)sender).DataSources["DadosRelatorioEtiqueta"];
                ProdutoModel produto    = new ProdutoModel();
                produto.Id = ((EtiquetaBioMundo.RelatorioEtiqueta.DadosEtiqueta[])mainSource.Value)[indexSub].ProdutoId;
                e.DataSources.Clear();
                List <InformacaoNutricionalModel> infNutricionais = etiquetaController.BuscarTodasInformacoesNutricionais(produto);
                dadosInfNutricional = (from inf in infNutricionais
                                       select new DadosInfNutricional
                {
                    Descricao = inf.Descricao,
                    Qtd = inf.Quantidade,
                    Und = inf.UnidadeMedia,
                    VD = inf.ValorDiario
                }).ToArray();

                e.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DadosInfNutricional", dadosInfNutricional));
                indexSub += 1;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        public void SetSubDataSource(object sender, SubreportProcessingEventArgs e)
        {
            WSGestion.WSGestion wsgest = new WSGestion.WSGestion();
            wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs");
            DataTable dt = wsgest.REP_Detalle_Salida_Inventario(codigo_seleccionado, centro_seleccionado);
            ReportDataSource ds = new ReportDataSource();
            ds.Name = "DS_RPT_DETALLE_SALIDA_INVENTARIO";
            ds.Value = dt;

            e.DataSources.Add(ds);
        }
        //private void P()
        //{
        //    string DBConnectionCode = CommSetup.CommWebSetup.DB0_CodeString;
        //    ReportCenter reportLogic = new ReportCenter(DBConnectionCode);
        //    var getData = reportLogic.reportAply_Detail(238);
        //    //ReportViewer rptvw = new ReportViewer();
        //    rptvw.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing);
        //    rptvw.ProcessingMode = ProcessingMode.Local;
        //    ReportDataSource rds = new ReportDataSource("MasterData", getData);
        //    rptvw.LocalReport.DataSources.Clear();
        //    rptvw.LocalReport.ReportPath = @"_Code\RPTFile\Apply.rdlc";
        //    rptvw.LocalReport.DataSources.Add(rds);
        //    rptvw.LocalReport.SetParameters(new ReportParameter("applyName", "TEST"));
        //    rptvw.LocalReport.SetParameters(new ReportParameter("doc_name", "Jerry"));
        //    rptvw.LocalReport.Refresh();
        //}
        void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            var apply_detail_id = int.Parse(e.Parameters["apply_detail_id"].Values[0]);

            string DBConnectionCode = CommSetup.CommWebSetup.DB0_CodeString;
            ReportCenter reportLogic = new ReportCenter(DBConnectionCode);

            var getData = reportLogic.reportApply_Fuel(apply_detail_id);

            //繫結子報表
            e.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("SubData", getData));
        }
 private void LocalReportOnSubreportProcessing(object sender, SubreportProcessingEventArgs eventArgs)
 {
     var policy = eventArgs.Parameters["Policy"].Values.FirstOrDefault();
     var dateBeg = DateTime.Parse(eventArgs.Parameters["DateBeg"].Values.FirstOrDefault());
     var dateEnd = DateTime.Parse(eventArgs.Parameters["DateEnd"].Values.FirstOrDefault());
     IEnumerable dataList = null;
     if(eventArgs.ReportPath.Contains(@"ReportPolicyEvent"))
         dataList = ReportPolicyData.GetReportEvents(policy, dateBeg, dateEnd);
     else if(eventArgs.ReportPath.Contains(@"ReportPolicyLog"))
         dataList = ReportPolicyData.GetLogRecords(policy, dateBeg, dateEnd);
     eventArgs.DataSources.Add(new ReportDataSource("MainDataSet", dataList));
 }
 public void DemoSubreportProcessingEventHandler(object sender, SubreportProcessingEventArgs e)
 {
     DateTime fecha = DateTime.Parse(e.Parameters[0].Values[0]);
     String turno = e.Parameters[1].Values[0].ToString();
     var query = repo.ReporteVentaCredito(fecha, turno);
     var queryConsumo = repo.ReporteVentaConsumo(fecha, turno);
     var querytotal = repo.ReporteVentaCreditoConsumo(fecha, turno);
     ReportDataSource dataSource = new ReportDataSource("DataSetVentaCredito", query);
     //ReportDataSource dataSource = new ReportDataSource("DataSetVentaConsumo", query);
     e.DataSources.Add(new ReportDataSource("DataSetVentaConsumo", queryConsumo));
     e.DataSources.Add(new ReportDataSource("DataSetTotal", querytotal));
     //e.DataSources.Add(new ReportDataSource("DataSetSalida", query2));
     e.DataSources.Add(dataSource);
 }
 public void SetSubDataSource(object sender, SubreportProcessingEventArgs e)
 {
     if (e.ReportPath.StartsWith("rptAttendanceDetailedReport_sub"))
     {
         vwSchAttForReportSqlDataSource.SelectParameters["ScheduleID"].DefaultValue = e.Parameters["prmScheduleID"].Values[0];
         e.DataSources.Add(new ReportDataSource("DataSet1", vwSchAttForReportSqlDataSource));
         vwSchAttForReportSqlDataSource.DataBind();
     }
     else if (e.ReportPath.StartsWith("rptScheduleList_sub"))
     {
         ScheduleDetailsSqlDataSource.SelectParameters["ScheduleID"].DefaultValue = e.Parameters["prmScheduleID"].Values[0];
         e.DataSources.Add(new ReportDataSource("DataSet1", ScheduleDetailsSqlDataSource));
         ScheduleDetailsSqlDataSource.DataBind();
     }
 }
 protected void ReportViewer1_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     SourceReport report = new SourceReport();
     DateTime fecha = DateTime.Parse(e.Parameters[0].Values[0]);
     String turno = e.Parameters[1].Values[0].ToString();
     var query = report.ReporteVentaCredito(fecha, turno);
     var queryConsumo = report.ReporteVentaConsumo(fecha, turno);
     var querytotal = report.ReporteVentaCreditoConsumo(fecha, turno);
     ReportDataSource dataSource = new ReportDataSource("DataSetVentaCredito", query);
     //ReportDataSource dataSource = new ReportDataSource("DataSetVentaConsumo", query);
     e.DataSources.Add(new ReportDataSource("DataSetVentaConsumo", queryConsumo));
     e.DataSources.Add(new ReportDataSource("DataSetTotal", querytotal));
     //e.DataSources.Add(new ReportDataSource("DataSetSalida", query2));
     e.DataSources.Add(dataSource);
 }
        protected void ReportViewer1_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            try
            {
                ReporteLogic rpt = new ReporteLogic();

                List<nota_detalle> detallesLst = rpt.GetNotasDetalle(NOTAS_ID);

                ReportDataSource dataSource = new ReportDataSource("NotasDetalleDataSet", detallesLst);
                e.DataSources.Add(dataSource);
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar subreporte de detalles de notas de peso.", ex);
                throw;
            }
        }
        protected void ReportViewer1_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            try
            {
                ReporteLogic rpt = new ReporteLogic();

                List<beneficiario_x_socio> beneficiariosLst = rpt.GetBeneficiariosDeSocio(SOCIOS_ID);

                ReportDataSource dataSource = new ReportDataSource("BeneficiariosDataSet", beneficiariosLst);
                e.DataSources.Add(dataSource);
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar subreporte de beneficiarios de socio.", ex);
                throw;
            }
        }
        protected void ReportViewer1_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            try
            {
                ReporteLogic rpt = new ReporteLogic();

                List<referencia_x_solicitud> referenciasPersonalesLst = rpt.GetReferenciasXSolicitud(SOLICITUDES_ID, "Personal");
                List<referencia_x_solicitud> refrenciasComercialesLst = rpt.GetReferenciasXSolicitud(SOLICITUDES_ID, "Comercial");
                List<aval_x_solicitud> avaleslst = rpt.GetAvalesXSolicitud(SOLICITUDES_ID);

                ReportDataSource dataSourceReferenciasPersonales = new ReportDataSource("ReferenciasPersonalesDataSet", referenciasPersonalesLst);
                ReportDataSource dataSourceReferenciasComerciales = new ReportDataSource("ReferenciasComercialesDataSet", refrenciasComercialesLst);
                ReportDataSource dataSourceAvales = new ReportDataSource("AvalesDataSet", avaleslst);

                e.DataSources.Add(dataSourceReferenciasPersonales);
                e.DataSources.Add(dataSourceReferenciasComerciales);
                e.DataSources.Add(dataSourceAvales);
            }
            catch (Exception ex)
            {
                log.Fatal("Error fatal al cargar subreporte de referencias, avales de solicitud de prestamo.", ex);
                throw;
            }
        }
 public void SetSubContDataSource(object sender, SubreportProcessingEventArgs e)
 {
     e.DataSources.Add(new ReportDataSource("DataSetContainerDetails", "ObjectDataSource3"));
 }
 public void SetSubDataSource(object sender, SubreportProcessingEventArgs e)
 {
     Reportes.Valores_anio_equipo ds = Session["ds_equipo_categoria_anio"] as Reportes.Valores_anio_equipo;
     ReportDataSource detalle = new ReportDataSource("detalle_item", ds.Detalle_item.Rows);
     e.DataSources.Add(detalle);
 }
 void ProcesarSubreporte(object sender, SubreportProcessingEventArgs e)
 {
     e.DataSources.Add(new ReportDataSource("dsReceptoresDomiciliosSubreportes", reporte.ObtenerDomiciliosActivos(idReceptor)));
 }
Exemple #46
0
 void subrptEventHandler(object sender, SubreportProcessingEventArgs e)
 {
     // ACHTUNG: Der Parameter muss im Haupt- und im Unterbericht definiert werden (mit gleichem Namen)
     string subrpt = e.ReportPath; // jeder Unterbericht ruft diesen EventHandler auf; hier steht drin welcher es ist.
     int schuelerId;
     int.TryParse(e.Parameters[0].Values[0],out schuelerId);
     if (schuelerId>0)
     {
       Schueler schueler = Zugriff.Instance.SchuelerRep.Find(schuelerId);
       if (subrpt=="subrptFachSchuelerNoten" || subrpt=="subrptFachSchuelerNoten11Klasse")
       {
     IList<FachSchuelerNotenDruckKurz> noten = schueler.getNoten.SchuelerNotenDruck(false);
     e.DataSources.Add(new ReportDataSource("DataSetFachSchuelerNoten",noten));
       }
       else if (subrpt=="subrptAbiergebnisseNoten")
       {
     IList<FachSchuelerNotenDruckKurz> noten = schueler.getNoten.SchuelerNotenDruck(true);
     e.DataSources.Add(new ReportDataSource("DataSetFachSchuelerNoten",noten));
       }
       else if (subrpt=="subrptSchullaufbahn")
       {
     IList<SchullaufbahnDruck> daten = new List<SchullaufbahnDruck>();
     daten.Add(new SchullaufbahnDruck(schueler));
     e.DataSources.Add(new ReportDataSource("DataSetSchullaufbahn",daten));
       }
       else if (subrpt=="subrptVorkommnis" || subrpt=="subrptAbiVorkommnis" )
       {
     diNoDataSet.vwVorkommnisDataTable vorkommnisse = new diNoDataSet.vwVorkommnisDataTable();
     vwVorkommnisTableAdapter BerichtTableAdapter;
     BerichtTableAdapter = new vwVorkommnisTableAdapter();
     if (subrpt=="subrptAbiVorkommnis")
       BerichtTableAdapter.FillBySchuelerIdForAbi(vorkommnisse, schuelerId);   //nur bestimmte Vorkommnisse selektieren
     else
       BerichtTableAdapter.FillBySchuelerId(vorkommnisse, schuelerId);
     e.DataSources.Add(new ReportDataSource("DataSetVorkommnis",(DataTable) vorkommnisse));
       }
       else if (subrpt=="subrptBemerkungen")
       {
     IList<BemerkungenDruck> daten = new List<BemerkungenDruck>();
     daten.Add(new BemerkungenDruck(schueler));
     e.DataSources.Add(new ReportDataSource("DataSetBemerkungen",daten));
       }
       else if (subrpt=="subrptSchuljahrSchulart")
       {
     IList<SchuljahrSchulartDruck> daten = new List<SchuljahrSchulartDruck>();
     daten.Add(new SchuljahrSchulartDruck(schueler));
     e.DataSources.Add(new ReportDataSource("DataSetSchuljahrSchulart",daten));
       }
       }
 }
 void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     e.DataSources.Add(new ReportDataSource("DataSet1",ldsmetas));
 }
Exemple #48
0
        void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            e.DataSources.Add(new ReportDataSource("RetailTradeClDataSet_ProductSelectById", this.ProductSelectByIdBindingSource));

        }
Exemple #49
0
        void subrptKursEventHandler(object sender, SubreportProcessingEventArgs e)
        {
            diNoDataSet.KursDataTable kurse = new diNoDataSet.KursDataTable();
            KursTableAdapter BerichtTableAdapter;
            BerichtTableAdapter = new KursTableAdapter();
            BerichtTableAdapter.ClearBeforeFill = true;

            //e.Parameters verwenden, um Fremdschlüssel abzugreifen
            int LehrerId=0;
            int.TryParse(e.Parameters[0].Values[0],out LehrerId);
            BerichtTableAdapter.FillByLehrerId(kurse, LehrerId);
            e.DataSources.Add(new ReportDataSource("DataSetKurs",(DataTable) kurse));
        }
Exemple #50
0
 void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     e.DataSources.Add(new ReportDataSource("DataSetStudent_学生", DBMaker.学生表()));
 }
Exemple #51
0
        void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
        {
            if (e.ReportPath == "SubDepartmentWiseSummary")
            {
                e.DataSources.Add(new ReportDataSource("DSEmployeeList", GetSubDataset(1).Tables[0]));
            }
            else if (e.ReportPath == "CryRptPayslipAddition")
            {
                e.DataSources.Add(new ReportDataSource("DSPayroll", GetSubDataset(2).Tables[0]));
            }
            else if (e.ReportPath == "SubDeductPayslip")
            {
                e.DataSources.Add(new ReportDataSource("DSPayroll", GetSubDataset(3).Tables[0]));
            }
            else if (e.ReportPath == "CrySubReconciliationSalarySheet")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(10).Tables[0]));
            }
            else if (e.ReportPath == "SubJurnal" || e.ReportPath == "SubJurnalFinance")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(11).Tables[0]));
            }

            else if (e.ReportPath == "SubJurnalLWF" || e.ReportPath == "SubJurnalLWFFinance")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(15).Tables[0]));
            }
            else if (e.ReportPath == "SubJurnalResign" || e.ReportPath == "SubJurnalResignFinance")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(12).Tables[0]));
            }
            else if (e.ReportPath == "SubJurnalForPE" || e.ReportPath == "SubJurnalForPEFinance")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(16).Tables[0]));
            }

            else if (e.ReportPath == "SubJurnalForPEInc")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(38).Tables[0]));
            }
            else if (e.ReportPath == "SubJurnalForPEFinanceIn")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(39).Tables[0]));
            }

            else if (e.ReportPath == "SubReportForTotal")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(17).Tables[0]));
            }

            else if (e.ReportPath == "SubReportJurnalMaster")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(18).Tables[0]));
            }

            else if (e.ReportPath == "SubReportDiff")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(19).Tables[0]));
            }
            else if (e.ReportPath == "SubJurnalFrac")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(20).Tables[0]));
            }
            else if (e.ReportPath == "SubJurnalIncrement")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(22).Tables[0]));
            }
            else if (e.ReportPath == "SubJurnalFractionalSalary")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(25).Tables[0]));
            }
            else if (e.ReportPath == "SubJurnalIncrementFinance")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(24).Tables[0]));
            }
            else if (e.ReportPath == "SubJurnalReverseLWP" || e.ReportPath == "SubJurnalReverseLWPFinance")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(23).Tables[0]));
            }
            else if (e.ReportPath == "SubJurnalAdj")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(21).Tables[0]));
            }


            else if (e.ReportPath == "subDepartmentWiseHeadCound")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(13).Tables[0]));
            }
            else if (e.ReportPath == "SubJournalResult")
            {
                e.DataSources.Add(new ReportDataSource("DSCitycell", GetSubDataset(14).Tables[0]));
            }

        }
 public void SetSchemeDataSource(object sender, SubreportProcessingEventArgs e)
 {
     e.DataSources.Add(new ReportDataSource("DataSetIMPScheme", "ObjectDataSource3"));
 }
 /// <summary>
 /// Handles the render subreport event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void reportViewer1SubReportEventHandler(object sender, SubreportProcessingEventArgs e)
 {
     string reportPath = e.ReportPath.Remove(0, _localReport.ReportPath.LastIndexOf("\\") + 1);
 }
Exemple #54
0
 static void SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     foreach (var subReportDataSource in _subReportDataSources)
         e.DataSources.Add(subReportDataSource);
 }
 private void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
 {
     string dataSourceName = e.DataSourceNames[0];
     e.DataSources.Add(new ReportDataSource(dataSourceName, new List<CompanyHeaderReport> {CompanyHeader}));
 }
 void SubreportProcessingEventHandler(object sender, SubreportProcessingEventArgs e)
 {
     e.DataSources.Add(new ReportDataSource("DsSubRelatorio", tblprodutosaplicacaoBindingSource));
 }
 public void SetSubDataSource(object sender, SubreportProcessingEventArgs e)
 {
     //Microsoft.Reporting.WebForms.LocalReport mlREPORTD = new Microsoft.Reporting.WebForms.LocalReport();
     //mlREPORTD.ReportEmbeddedResource = "~/pj_delinv/InvReceiptD.rdlc";
     e.DataSources.Add(new ReportDataSource("INV_RECEIPT_DATAD", mlDATATABLE1));
 }
 public void SetSubDataSource(object sender, SubreportProcessingEventArgs e)
 {
     e.DataSources.Add(new ReportDataSource("DataSet1", "ObjectDataSource2"));
 }
 //private string addCompanyLogo(string pdfPath) {
 //    string outputPDFPath = null;
 //    int clientID = Core.SessionHelper.getClientId();
 //    string logoPath = string.Format("{0}/ClientLogo/{1}.jpg", ConfigurationManager.AppSettings["appPath"].ToString(), clientID);
 //    if (File.Exists(logoPath)) {
 //        outputPDFPath = string.Format("{0}/Temp/{1}.pdf", appPath, Guid.NewGuid());
 //        using (var inputPdfStream = new FileStream(pdfPath, FileMode.Open))
 //        using (var inputImageStream = new FileStream(logoPath, FileMode.Open))
 //        using (var outputPdfStream = new FileStream(outputPDFPath, FileMode.Create)) {
 //            PdfReader reader = new PdfReader(inputPdfStream);
 //            PdfStamper stamper = new PdfStamper(reader, outputPdfStream);
 //            PdfContentByte pdfContentByte = stamper.GetOverContent(1);
 //            var image = iTextSharp.text.Image.GetInstance(inputImageStream);
 //            image.ScaleToFit(100f, 100f);
 //            PdfDocument doc = pdfContentByte.PdfDocument;
 //            image.SetAbsolutePosition(40f, doc.PageSize.Height - 150f);
 //            pdfContentByte.AddImage(image);
 //            stamper.Close();
 //        }
 //    }
 //    else {
 //        outputPDFPath = pdfPath;
 //    }
 //    return outputPDFPath;
 //}
 protected void subReportsEventHandler(object sender, SubreportProcessingEventArgs e)
 {
     e.DataSources.Add(new ReportDataSource("DataSet1", invoice[0].invoiceLines));
 }
 public void OnSubreportProcessing(ReportViewer reportViewer, SubreportProcessingEventArgs e)
 {
     var countryId = int.Parse(e.Parameters["CountryId"].Values.First());
     var cities = LocalData.GetCitiesByCountryId(countryId);
     e.DataSources.Add(new ReportDataSource("Cities", cities));
 }