• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ReportDataSource类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ReportDataSource的典型用法代码示例。如果您正苦于以下问题:C# ReportDataSource类的具体用法?C# ReportDataSource怎么用?C# ReportDataSource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ReportDataSource类属于命名空间,在下文中一共展示了ReportDataSource类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt;
                if (Request.QueryString["sdt"] != null || Request.QueryString["edt"] != null)
                {
                    DateTime Sdt = Convert.ToDateTime(Request.QueryString["sdt"].ToString());
                    DateTime Edt = Convert.ToDateTime(Request.QueryString["edt"].ToString());

                    dt = DAL.DbHelper.ExecuteDataTable("P_AssessmentWeek_ByAllseller", Sdt, Edt);
                    ReportDataSource rds = new ReportDataSource("sellerAssessment_Data_DataTable1", dt);
                    ReportViewer1.LocalReport.DataSources.Clear();
                    ReportViewer1.LocalReport.DataSources.Add(rds);
                    ReportViewer1.LocalReport.Refresh();
                    if (dt.Rows.Count == 0)
                    {
                        ReportViewer1.Visible = false;
                        div_nodata.Visible = true;
                    }
                    else
                    {
                        div_nodata.Visible = false;
                    }
                }
                else
                {
                    Library.Script.ClientMsgUrl("错误的参数。", "reportCustomer.aspx");
                }
            }
        }
开发者ID:atian15,项目名称:peisong-expert,代码行数:31,代码来源:sellerAssessmentAll_report.aspx.cs


示例2: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (Page.IsPostBack == false)
     {
         txtFechaInicial.Text = DateTime.Now.ToShortDateString();
         txtFechaFinal.Text = DateTime.Now.ToShortDateString();
         lblFechaInicial.Text = DateTime.Parse(txtFechaInicial.Text).Year.ToString("0000") + DateTime.Parse(txtFechaInicial.Text).Month.ToString("00") + DateTime.Parse(txtFechaInicial.Text).Day.ToString("00");
         lblFechaFinal.Text = DateTime.Parse(txtFechaFinal.Text).Year.ToString("0000") + DateTime.Parse(txtFechaFinal.Text).Month.ToString("00") + DateTime.Parse(txtFechaFinal.Text).Day.ToString("00");
         ListarSucursal();
         if (ddlAlmacen.SelectedIndex == 0)
         {
             lblAlmacen.Text = "";
         }
         else
         {
             lblAlmacen.Text = ddlAlmacen.SelectedItem.Text;
         }
         ReportViewer1.LocalReport.ReportPath = "VentasPorCategoria.rdlc";
         ReportViewer1.LocalReport.DataSources.Clear();
         ReportDataSource rds = new ReportDataSource();
         rds.Name = "DataSet1";
         SqlDataAdapter da = new SqlDataAdapter("Play_VentasxCategoria_Reporte '" + lblFechaInicial.Text + "','" + lblFechaFinal.Text + "','" + lblAlmacen.Text + "'", conexion);
         DataTable dt = new DataTable();
         da.Fill(dt);
         rds.Value = dt;
         ReportViewer1.LocalReport.DataSources.Add(rds);
         ReportViewer1.LocalReport.Refresh();
     }
 }
开发者ID:jalmeida777,项目名称:VentasWebDevExpress,代码行数:29,代码来源:ReporteVentasCategoria.aspx.cs


示例3: Button1_Click

        protected void Button1_Click(object sender, EventArgs e)
        {
            int year = Convert.ToInt32(DropDownList2.SelectedValue);
            int month=Convert.ToInt32(DropDownList1.SelectedValue);
            var dt = new DataTable();
            dt.Columns.Add("TagDate", typeof(DateTime));
            dt.Columns.Add("TagName");
            dt.Columns.Add("TagVal", typeof(float));
            var datasource = NyData.Getdata(year, month);
            foreach (var source in datasource)
            {
                DataRow dr = dt.NewRow();
                dr[0] = source.TagDate;
                dr[1] = source.TagName;
                // dr[2] = string.IsNullOrEmpty(source.Tagval)?"0":source.Tagval;
                dr[2] = source.Tagval;
                dt.Rows.Add(dr);
            }

            var hh = new ReportDataSource("Message", dt);
            var localreport = this.ReportViewer1.LocalReport;
            localreport.DataSources.Clear();
            localreport.DataSources.Add(hh);
            //localreport.SetParameters(new ReportParameter("rDate",new DateTime(2015,8,1).ToShortDateString()));

            localreport.Refresh();
        }
开发者ID:jieaido,项目名称:-,代码行数:27,代码来源:Default.aspx.cs


示例4: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //提取数据
                string queryWord = "";

                if (Request.QueryString["queryWord"] != null && Request.QueryString["queryWord"].Trim() != "" && Request.QueryString["queryWord"].Trim() != "null")
                    queryWord = Request.QueryString["queryWord"].Trim();

                YnBaseDal.YnPage ynPage = new YnBaseDal.YnPage();
                ynPage.SetPageSize(500); //pageRows;
                ynPage.SetCurrentPage(1); //pageNumber;

                List<AscmSupplier> listAscmSupplier = AscmSupplierService.GetInstance().GetList(ynPage, "", "", queryWord, null);
                ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
                ReportViewer1.LocalReport.ReportPath = Server.MapPath("SupplierReport.rdlc");
                ReportDataSource rds1 = new ReportDataSource();
                rds1.Name = "DataSet1";
                rds1.Value = listAscmSupplier;
                ReportViewer1.LocalReport.DataSources.Clear();//好像不clear也可以
                ReportViewer1.LocalReport.DataSources.Add(rds1);

                string companpyTitle = "美的中央空调";
                string title = companpyTitle + "供应商";

                ReportParameter[] reportParameters = new ReportParameter[] {
                    new ReportParameter("ReportParameter_Title", title),
                    new ReportParameter("ReportParameter_ReportTime", "打印时间:" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"))
                };
                ReportViewer1.LocalReport.SetParameters(reportParameters);
                ReportViewer1.LocalReport.Refresh();
            }
        }
开发者ID:gofixiao,项目名称:Midea,代码行数:34,代码来源:SupplierPrint.aspx.cs


示例5: btnGenerar_Click

        private void btnGenerar_Click(object sender, EventArgs e)
        {
            objDetalleReservaBL = new DetalleReservaBL();
            DateTime fechaInicio = dtpInicio.Value.Date;
            DateTime fechaFin = dtpFin.Value.Date.Add(TimeSpan.Parse("23:59:59"));

            try
            {
                reportViewer1.ProcessingMode = ProcessingMode.Local;

                reportViewer1.LocalReport.DataSources.Clear();

                ReportDataSource Reporte = new ReportDataSource("DataSet1", objDetalleReservaBL.ListarFacturacion(fechaInicio, fechaFin));

                reportViewer1.LocalReport.DataSources.Add(Reporte);

                reportViewer1.LocalReport.ReportEmbeddedResource = "MadScienceGUI.reportFacturacion.rdlc";

                List<ReportParameter> parametros = new List<ReportParameter>();
                parametros.Add(new ReportParameter("FechaInicio", "" + fechaInicio));
                parametros.Add(new ReportParameter("FechaFin", "" + fechaFin));
                //Añado parametros al reportviewer
                this.reportViewer1.LocalReport.SetParameters(parametros);

                reportViewer1.RefreshReport();

                reportViewer1.Focus();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
开发者ID:RenzoMA,项目名称:SWF_Mad,代码行数:33,代码来源:frmRptFacturacion.cs


示例6: btnGenerar_Click

        private void btnGenerar_Click(object sender, EventArgs e)
        {
            DateTime fechaInicio = dtpInicio.Value.Date;
            DateTime fechaFin = dtpFin.Value.Date.Add(TimeSpan.Parse("23:59:59"));
            int codigoTrabajador = Convert.ToInt16(cboTrabajador.SelectedValue.ToString());
            asiginacionBL = new AsignacionBL();

            try
            {
                reportViewer1.ProcessingMode = ProcessingMode.Local;

                reportViewer1.LocalReport.DataSources.Clear();

                ReportDataSource Reporte = new ReportDataSource("dataPagoDetalle", asiginacionBL.ReportePagoDetalle(fechaInicio, fechaFin, codigoTrabajador));

                reportViewer1.LocalReport.DataSources.Add(Reporte);

                reportViewer1.LocalReport.ReportEmbeddedResource = "MadScienceGUI.reportPagoDetalle.rdlc";

                List<ReportParameter> parametros = new List<ReportParameter>();
                parametros.Add(new ReportParameter("FechaInicio", "" + fechaInicio));
                parametros.Add(new ReportParameter("FechaFin", "" + fechaFin));
                //Añado parametros al reportviewer
                this.reportViewer1.LocalReport.SetParameters(parametros);

                reportViewer1.RefreshReport();

                reportViewer1.Focus();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
开发者ID:RenzoMA,项目名称:SWF_Mad,代码行数:34,代码来源:frmRptPagoDetalle.cs


示例7: btnCreateReport_Click

        protected void btnCreateReport_Click(object sender, EventArgs e)
        {
            /*
            TreasureLandDataClassesDataContext db = new TreasureLandDataClassesDataContext();
            IEnumerable <reportData> ds = from l in db.LineItems
                     join rd in db.ReservationDetailBillings
                     on l.ReservationDetailBillingID equals rd.ReservationDetailBillingID
                     join m in db.MenuItems
                     on l.MenuItemID equals m.MenuItemID
                     join d in db.FoodDrinkCategories
                     on m.MenuItemID equals d.FoodDrinkCategoryID
                     where rd.ReservationDetailBillingID == Convert.ToInt16(ddlTransactions.SelectedValue)
                     select new reportData{ LineItemAmount = l.LineItemAmount, LineItemTransactionID = l.LineItemTransactionID, MenuItemName = m.MenuItemName};
            */
            if(ddlTransactions.SelectedIndex>-1)
            {
            ReportViewer1.Visible = true;
            ReportDataSource rds = new ReportDataSource("reportDatasource", sdsReport);

            //Resets the ReportViewer, adds the new datasource, and changes the name of the report

            ReportViewer1.LocalReport.DataSources.Add(rds);
            ReportViewer1.LocalReport.DisplayName = "reportDatasource";
            ReportViewer1.DataBind();
            }
        }
开发者ID:TheProjecter,项目名称:wsu-treasureland-hotel,代码行数:26,代码来源:RestaurantSalesReport.aspx.cs


示例8: bindReport

        private void bindReport()
        {
            int clientID = Core.SessionHelper.getClientId();
            List<CRM.Data.Entities.vw_OpenClaimsListing> reportData = null;

            using (RerportManager report = new RerportManager()) {
                reportData = report.claimsOpenListing(clientID);
            }

            if (reportData != null) {
                reportViewer.Reset();
                reportViewer.ProcessingMode = ProcessingMode.Local;

                reportViewer.LocalReport.DataSources.Clear();

                reportViewer.LocalReport.EnableExternalImages = true;

                ReportDataSource reportDataSource = new ReportDataSource();
                reportDataSource.Name = "DataSet1";
                reportDataSource.Value = reportData;

                reportViewer.LocalReport.DataSources.Add(reportDataSource);

                reportViewer.LocalReport.ReportPath = Server.MapPath("~/Protected/Reports/ClaimOpen/ClaimsOpenListing.rdlc");
            }
        }
开发者ID:Antoniotoress1992,项目名称:asp,代码行数:26,代码来源:ClaimsOpenListing.aspx.cs


示例9: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt;
                if (Request.QueryString["sellerId"] != null || Request.QueryString["tag"] != null || Request.QueryString["id"] != null)
                {
                    int sellerId = Convert.ToInt32(Request.QueryString["sellerId"].ToString());
                    int tag = Convert.ToInt32(Request.QueryString["tag"].ToString());
                    int id = Convert.ToInt32(Request.QueryString["id"].ToString());

                    dt = logic.assessmentWeek.P_AssessmentWeek(sellerId, tag, id);
                    ReportDataSource rds = new ReportDataSource("sellerAssessment_Data_DataTable1", dt);
                    ReportViewer1.LocalReport.DataSources.Clear();
                    ReportViewer1.LocalReport.DataSources.Add(rds);
                    ReportViewer1.LocalReport.Refresh();
                    if (dt.Rows.Count == 0)
                    {
                        ReportViewer1.Visible = false;
                        div_nodata.Visible = true;
                    }
                    else
                    {
                        div_nodata.Visible = false;
                    }
                }
                else
                {
                    Library.Script.ClientMsgUrl("错误的参数。", "sellerAssessment_Allist.aspx");
                }
            }
        }
开发者ID:atian15,项目名称:peisong-expert,代码行数:32,代码来源:sellerAssessment_report.aspx.cs


示例10: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string actividadid = Request.QueryString["id"].ToString();

                ReportDataSource rds = new ReportDataSource();
                rptActividades.LocalReport.DataSources.Clear();

                rptActividades.LocalReport.ReportPath = "Actividades_Valores_PlanOperativo.rdlc";
                rds.Name = "DataSet1";

                var actividad = (from i in new Model.ESMBDDataContext().Actividades
                                 where i.Id == Convert.ToInt32(actividadid)
                                 select i).Single();

                rptActividades.LocalReport.SetParameters(new ReportParameter("indicador", actividad.Actividad));
                rptActividades.LocalReport.SetParameters(new ReportParameter("meta", actividad.Presupuesto.ToString()));

                odsActividadesMetas.FilterExpression = "actividad_id = " + actividadid;

                rds.DataSourceId = "odsActividadesMetas";

                rptActividades.LocalReport.DataSources.Add(rds);
                rptActividades.LocalReport.Refresh();
            }
        }
开发者ID:kaganyuksel,项目名称:esm,代码行数:27,代码来源:reportactividades.aspx.cs


示例11: frmRelatorios

 public frmRelatorios(DataTable pSource, eStatusForm tipo)
 {
     InitializeComponent();
     ReportDataSource report = new ReportDataSource();
     report.Name = "DataSet1";
     report.Value = pSource;
     rpwViewer.LocalReport.DataSources.Add(report);
     statusForm = tipo;
     switch (statusForm)
     {
         case eStatusForm.alunos:
             rpwViewer.LocalReport.ReportEmbeddedResource = "matriculasControl.rptListaAlunos.rdlc";
             break;
         case eStatusForm.disciplinas:
             rpwViewer.LocalReport.ReportEmbeddedResource = "matriculasControl.rptListaDisciplinas.rdlc";
             break;
         case eStatusForm.matriculas:
             rpwViewer.LocalReport.ReportEmbeddedResource = "matriculasControl.rptListaMatriculados.rdlc";
             break;
         case eStatusForm.semestres:
             break;
         default:
             break;
     }
     rpwViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
     rpwViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;
     this.rpwViewer.RefreshReport();
 }
开发者ID:EvaldoRC,项目名称:matriculasControl,代码行数:28,代码来源:frmRelatorios.cs


示例12: Form1_Load

        private void Form1_Load(object sender, EventArgs e)
        {
            int idprov = _idver;
            String vehiculo = _vehiculo;

            Conexion conectar = new Conexion();
            Ordenes ordenes = new Ordenes();

            this.reportViewer1.LocalReport.DataSources.Clear();
            ReportDataSource source = new ReportDataSource();

            if (vehiculo.Equals(""))
            {
                source = new ReportDataSource("ConReporteTabla", ordenes.getOrdenesDetallesProveedorDG(idprov, conectar.con));
            }
            else
            {
                source = new ReportDataSource("ConReporteTabla", ordenes.getOrdenesDetallesProveedorVehiculo(idprov, vehiculo, conectar.con));
            }

            reportViewer1.LocalReport.DataSources.Add(source);

            source = new ReportDataSource("Proveedor", ordenes.getProveedoresRep(idprov, conectar.con));
            reportViewer1.LocalReport.DataSources.Add(source);

            this.reportViewer1.RefreshReport();
        }
开发者ID:rodrigo01,项目名称:SistemaOrdenes,代码行数:27,代码来源:frmReporteOrdenesVehiculos.cs


示例13: LoadReport

    public void LoadReport(int agentId, DateTime fromDate, DateTime toDate)
    {
        //Reset report viewer control
        reportViewer.Reset();

        //Initializes report viewer and set report as embedded resource
        Common.SetReportEmbeddedResource(reportViewer, "TCESS.ESales.CommonLayer.Reports.ConsolidatedBookingandSaleReport.rdlc");

        //Set datasource for cash collection report
        IList<DispatchReportDTO> lstDispatchReportRpt = ESalesUnityContainer.Container.Resolve<IReportService>()
            .GetDispatchReport(Convert.ToInt32(agentId), Convert.ToDateTime(fromDate),
            Convert.ToDateTime(toDate));
        ReportDataSource CashCollectionDataSource = new ReportDataSource("dsConsBookingSale", lstDispatchReportRpt);
        reportViewer.LocalReport.DataSources.Add(CashCollectionDataSource);
        string agentName = "";
        if (agentId > 0)
        {
            AgentDTO _agentName = ESalesUnityContainer.Container.Resolve<IAgentService>().GetAgentByAgentId(agentId);
            agentName = _agentName.Agent_Name;
        }
        else
        {
            agentName = "ALL";
        }
        //Set report parameters
        ReportParameter fromDt = new ReportParameter("FromDate", Convert.ToDateTime(fromDate).ToString("dd/MM/yyyy"));
        ReportParameter toDt = new ReportParameter("ToDate", Convert.ToDateTime(toDate).ToString("dd/MM/yyyy"));
        ReportParameter agent = new ReportParameter("agent", Convert.ToString(agentName));
        reportViewer.LocalReport.SetParameters(new ReportParameter[] { fromDt, toDt, agent });
    }
开发者ID:nitinkhannas,项目名称:TCESS.ESales,代码行数:30,代码来源:ConsolidatedBookingandSaleReport.ascx.cs


示例14: RenderStatement

    private void RenderStatement(int penaltyID, int loanID)
    {
        try
        {
            ReportParameter rpPenaltyID = new ReportParameter("PenaltyID", penaltyID.ToString());
            ReportParameter[] parameters = new ReportParameter[] { };

            DataTable dtPenalty = LoansBLL.GetPenalty(penaltyID, loanID).Tables[0];
            ReportDataSource rdsPenalty = new ReportDataSource("PenaltyDS", dtPenalty);
            ReportDataSource[] sources = new ReportDataSource[] { rdsPenalty };
            byte[] bytes = Statements.RenderStatement("PenaltyNotice.rdlc", sources, parameters);

            // Variables
            string mimeType = string.Empty;

            // Now that you have all the bytes representing the PDF report, buffer it and send it to the client.
            Response.Buffer = true;
            Response.Clear();
            Response.ContentType = mimeType;
            Response.AddHeader("content-disposition", "attachment; filename=" + "PenaltyNotice_" + penaltyID.ToString() + ".pdf");
            Response.BinaryWrite(bytes); // create the file
            Response.Flush(); // send it to the client to download
        }
        catch (Exception ex)
        {
        }
    }
开发者ID:tmgraves,项目名称:LoanServicing,代码行数:27,代码来源:PenaltyNotice.ascx.cs


示例15: CandidateRDLSReportPrint_Load

 private void CandidateRDLSReportPrint_Load(object sender, EventArgs e)
 {
     ReportDataSource rds = new ReportDataSource();
     reportViewer1.LocalReport.DataSources.Clear();
     reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("UNIRecruitmentSoft_CandidateDetail", _candidatesFroPrint.ToList()));
     this.reportViewer1.RefreshReport();
 }
开发者ID:mayurdo,项目名称:UNISoftware,代码行数:7,代码来源:CandidateRDLSReportPrint.cs


示例16: ProcesarReporteClick

        protected void ProcesarReporteClick(object sender, EventArgs e)
        {
            ReportDataSource reporteData = null;

            switch (Reportes.SelectedValue)
            {
                case "1":
                    if (this.periodos.SelectedValue != "Todos los periodos")
                        reporteData = new ReportDataSource("myDataSet", Avaruz.Artemisa.DAL.ViewResultadoGlobalDb.SelectByPeriodo(this.periodos.Text));
                    else
                        reporteData = new ReportDataSource("myDataSet", Avaruz.Artemisa.DAL.ViewResultadoGlobalDb.SelectAll());
                    break;
                case "2":
                    reporteData = this.periodos.SelectedValue != "Todos los periodos" ? new ReportDataSource("myDataSet", Avaruz.Artemisa.DAL.ViewResultadoAuditoriaTipoDb.SelectByPeriodo(Convert.ToInt32(this.tipoAuditoria.SelectedValue), this.periodos.Text)) : new ReportDataSource("myDataSet", Avaruz.Artemisa.DAL.ViewResultadoAuditoriaTipoDb.Select(Convert.ToInt32(this.tipoAuditoria.SelectedValue)));
                    break;
                case "3":
                case "4":
                    if (this.periodos.SelectedValue == "Todos los periodos")
                        reporteData = this.estatus.SelectedValue == "Todos" ? new ReportDataSource("myDataSet", Avaruz.Artemisa.DAL.ViewNoConformidadDb.SelectAll()) : new ReportDataSource("myDataSet", Avaruz.Artemisa.DAL.ViewNoConformidadDb.SelectByEstatus(this.estatus.SelectedValue));
                    else
                        reporteData = this.estatus.SelectedValue == "Todos"
                                          ? new ReportDataSource("myDataSet",
                                                                 Avaruz.Artemisa.DAL.ViewNoConformidadDb.SelectByPeriodo(
                                                                     this.periodos.SelectedValue))
                                          : new ReportDataSource("myDataSet",
                                                                 Avaruz.Artemisa.DAL.ViewNoConformidadDb.
                                                                     SelectByPeriodoEstatus(
                                                                         this.periodos.SelectedValue,
                                                                         this.estatus.SelectedValue));
                    break;
                case "5":
                    if (this.periodos.SelectedValue == "Todos los periodos")
                        reporteData = this.estatus.SelectedValue == "Todos" ? new ReportDataSource("myDataSet", Avaruz.Artemisa.DAL.ViewCalidadPlanTrabajoDb.SelectAll()) : new ReportDataSource("myDataSet", Avaruz.Artemisa.DAL.ViewCalidadPlanTrabajoDb.SelectByEstatus(this.estatus.SelectedValue));
                    else
                        reporteData = this.estatus.SelectedValue == "Todos"
                                          ? new ReportDataSource("myDataSet",
                                                                 Avaruz.Artemisa.DAL.ViewCalidadPlanTrabajoDb.SelectByPeriodo(
                                                                     this.periodos.SelectedValue))
                                          : new ReportDataSource("myDataSet",
                                                                 Avaruz.Artemisa.DAL.ViewCalidadPlanTrabajoDb.
                                                                     SelectByPeriodoEstatus(
                                                                         this.periodos.SelectedValue,
                                                                         this.estatus.SelectedValue));
                    break;
                case "6":
                    int periodoInt = 0;
                    string estatus2 = this.estatus.SelectedValue == "Todos" ? "%" : this.estatus.SelectedValue;
                    reporteData = new ReportDataSource("myDataSet",
                                                       Avaruz.Artemisa.DAL.ViewDentroFueraCerradasDb.SelectAll(
                                                           DateTime.Now, estatus2,
                                                           periodoInt));
                    break;

            }

            this.ReportViewer1.LocalReport.DataSources.Clear();
            this.ReportViewer1.LocalReport.ReportPath = GetReportName(Reportes.SelectedValue);
            this.ReportViewer1.LocalReport.DataSources.Add(reporteData);
            this.ReportViewer1.LocalReport.Refresh();
        }
开发者ID:Avaruz,项目名称:Artemisa2,代码行数:60,代码来源:ResultadosAuditoria.aspx.cs


示例17: GetRptAmountRecvByProjectId

         public void GetRptAmountRecvByProjectId(int ProjID)
       {
           var q = AmountsReceivedsCmd.GetAllAmountsReceivedBypro(ProjID);
           ReportDataSource rs = new ReportDataSource();
           List<AmountRecvtReportObj> ls = new List<AmountRecvtReportObj>();
          
           foreach (var item in q)
           {
             
               ls.Add(new AmountRecvtReportObj()
               {
               
                 ProjectName=item.ProjectProfile.ProjectName,
                  Coin=item.ProjectProfile.Coin,
                  DonerName=item.TheDonorsProject.TheDonor.Name,
                  Date=item.Date.Value,
                  Cost=item.Cost.Value,
                  
               }); 
           }
           rs.Name = "AmountsReceivedDataSet";
           rs.Value = ls;
           frmReportViewer frm = new frmReportViewer();
           frm.reportViewer1.LocalReport.DataSources.Clear();
           frm.reportViewer1.LocalReport.DataSources.Add(rs);
           frm.reportViewer1.LocalReport.ReportEmbeddedResource = "UcasProWindowsForm.Reports.rptAmountsReceived.rdlc";
           frm.ShowDialog();


       }
开发者ID:ainma007,项目名称:UcasProject,代码行数:30,代码来源:AmountRecvReportCmd.cs


示例18: Export

        public ActionResult Export(string type)
        {
            LocalReport lr = new LocalReport();
            int TotalRow;
            string path = Path.Combine(Server.MapPath("~/Rdlc"), "rdlcOrders.rdlc");
            lr.ReportPath = path;
            var list = serivce.Get(out TotalRow);

            ReportDataSource rd = new ReportDataSource("DataSet1", list);
            lr.DataSources.Add(rd);

            string reportType = type;
            string mimeType;
            string encoding;
            string fileNameExtension;
            string deviceInfo;

            deviceInfo = "<DeviceInfo>" +
            "  <OutputFormat>" + type + "</OutputFormat>" +
            "  <PageWidth>8.5in</PageWidth>" +
            "  <PageHeight>11in</PageHeight>" +
            "  <MarginTop>0.5in</MarginTop>" +
            "  <MarginLeft>1in</MarginLeft>" +
            "  <MarginRight>1in</MarginRight>" +
            "  <MarginBottom>0.5in</MarginBottom>" +
            "</DeviceInfo>";

            Warning[] warnings;
            string[] stream;
            byte[] renderBytes;

            renderBytes = lr.Render(reportType, deviceInfo, out mimeType, out encoding, out fileNameExtension, out stream, out warnings);

            return File(renderBytes, mimeType, "Report");
        }
开发者ID:zero781028,项目名称:MvcDemo,代码行数:35,代码来源:OrderController.cs


示例19: LoadReport

    public void LoadReport(int agentId, int month)
    {
        //Reset report viewer control
        reportViewer.Reset();

        //Initializes report viewer and set report as embedded resource
        Common.SetReportEmbeddedResource(reportViewer, "TCESS.ESales.CommonLayer.Reports.DistrictWiseSalesReport.rdlc");

        //Set datasource for cash collection report
        IList<SalesReportDTO> lstDistrictWiseSalesRpt = ESalesUnityContainer.Container.Resolve<IReportService>()
            .GetDistrictWiseSalesReport(Convert.ToInt32(agentId), month);
        ReportDataSource CashCollectionDataSource = new ReportDataSource("dsDistrictWiseSalesReport", lstDistrictWiseSalesRpt);
        reportViewer.LocalReport.DataSources.Add(CashCollectionDataSource);
        string agentName = "";
        if (base.GetAgentByUserId().UAM_Agent_Id != 0)
        {
            agentName = base.GetAgentByUserId().UAM_Agent_Name;
        }
        else
        {
            agentName = "ALL";
        }
        //Set report parameters
        string smonth = TCESS.ESales.CommonLayer.CommonLibrary.MasterList.GetMonthName(month);
        //Set report parameters
        ReportParameter tmonth = new ReportParameter("Month", smonth);
        ReportParameter agent = new ReportParameter("agent", Convert.ToString(agentName));
        reportViewer.LocalReport.SetParameters(new ReportParameter[] { tmonth, agent });
    }
开发者ID:nitinkhannas,项目名称:TCESS.ESales,代码行数:29,代码来源:DistrictWiseSalesReport.ascx.cs


示例20: GetAllDonor

        public void GetAllDonor()
        {
            var q = TheDonorCmd.GetAllDonors();
            ReportDataSource rs = new ReportDataSource();
            List<DonaorReportObj> ls = new List<DonaorReportObj>();
            int counter = 0;
            foreach (var item in q)
            {
                counter++;
                ls.Add(new DonaorReportObj()
                {
                    DonorID = counter,
                    DonorName = item.Name,
                    DonorAgentname = item.agentName,
                    DonorFaxnumber = item.Fax,
                    DonorAddress = item.Adderss,
                    DonorPhoneNumber = item.PhoneNumber,
                    DonorEmail = item.Email


                });
            }
            rs.Name = "DonorDataSet";
            rs.Value = ls;
            frmReportViewer frm = new frmReportViewer();
            frm.reportViewer1.LocalReport.DataSources.Clear();
            frm.reportViewer1.LocalReport.DataSources.Add(rs);
            frm.reportViewer1.LocalReport.ReportEmbeddedResource = "UcasProWindowsForm.Reports.rptDonor.rdlc";
            frm.ShowDialog();

        }
开发者ID:ainma007,项目名称:UcasProject,代码行数:31,代码来源:DonorsReportCmd.cs



注:本文中的ReportDataSource类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ReportDiagnostic类代码示例发布时间:2022-05-24
下一篇:
C# Report类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap