Exemplo n.º 1
0
    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)
        {
        }
    }
Exemplo n.º 2
0
    private void SetReportData()
    {
        DateTime outer;
        DateTime? startDate = null;
        DateTime? endDate = null;
        if (DateTime.TryParse(txtStartDate.Text, out outer))
            startDate = outer;
        if (DateTime.TryParse(txtEndDate.Text, out outer))
            endDate = outer;

        MessageBoxControl msgBox = (MessageBoxControl)Page.Master.FindControl("messageBox");
        if (startDate == null || endDate == null)
        {
            msgBox.ShowValidateError("Zły format daty. Prawidłowy format daty to MM-dd-yyyy.");
            return;
        }
        if (startDate > endDate)
        {
            msgBox.ShowValidateError("Data od nie może być poźniejsza niż data do.");
            return;
        }
        msgBox.Visible = false;
        ReportParameter[] reportParameters = new ReportParameter[2];

        reportParameters[0] = new ReportParameter("startdate", startDate.Value.ToString());
        reportParameters[1] = new ReportParameter("enddate", endDate.Value.ToString());

        rvSales.ServerReport.SetParameters(reportParameters);
        rvSales.ServerReport.Refresh();
    }
        private void printReceipt(object sender, EventArgs e)
        {
            ReportDataSource source = new ReportDataSource();
            ReportViewer reportViewer = new ReportViewer();

            source.Name = "DataSet1";
            source.Value = null;

            ReportParameter p1 = new ReportParameter("test1", "ASV");
             //   reportViewer.Reset();
               // reportViewer.LocalReport.DataSources.Clear();
              reportViewer.LocalReport.ReportPath = "../../Reports/ReportReceipts.rdlc";
              ReportParameter rp = new ReportParameter();
              rp.Name = "id";
              rp.Values.Add(objectReceipt.Id);
              ReportParameter rp1 = new ReportParameter("contractid", objectReceipt.Contractid, true);
              ReportParameter rp2 = new ReportParameter("dateestablish", this.objectReceipt.Dateestablish, true);
              ReportParameter rp3 = new ReportParameter("billid", this.objectReceipt.Billid, true);
              ReportParameter rp4 = new ReportParameter("customername", this.objectReceipt.Customername, true);
              ReportParameter rp5 = new ReportParameter("total", this.objectReceipt.Total.ToString(), true);
              ReportParameter rp6 = new ReportParameter("reason", this.objectReceipt.Reason, true);
              ReportParameter rp7 = new ReportParameter("note", this.objectReceipt.Contents, true);
              ReportParameter[] parameter = new ReportParameter[] { rp, rp2, rp1, rp3, rp4, rp5, rp6, rp7 };
             // reportViewer.LocalReport.SetParameters(p);
              // reportViewer.LocalReport.DataSources.Add(source);

              ReportReceipts form = new ReportReceipts(parameter);
            form.Show();
        }
Exemplo n.º 4
0
        private void Form2_Load(object sender, EventArgs e)
        {
            var resultSet2 =FacilityBLL.getOrderDetail(2);
            this.reportViewer1.LocalReport.ReportEmbeddedResource = "Annon.Report.Report2.rdlc";
            var ordersInfo = FacilityBLL.getFirstOrderInfo(2);
            try
            {
                ReportParameter rp = new ReportParameter("Latitute", ordersInfo.SiteAltitude.ToString()+"m");
                ReportParameter rpTag = new ReportParameter("CustomerName", string.IsNullOrEmpty(ordersInfo.CustCont) ? "无" : ordersInfo.CustCont);
                ReportParameter rpProjectName = new ReportParameter("ProjectName", ordersInfo.JobName);
                ReportParameter rpProjectNo = new ReportParameter("ProjectNo", ordersInfo.JobNo);
                ReportParameter rpSeller = new ReportParameter("AnnonContact", ordersInfo.AAonCont);
                ReportParameter rpOrderDate = new ReportParameter("DealDate", ordersInfo.DealDate == null ? "无" : ordersInfo.DealDate);
                ReportParameter rpJobDes = new ReportParameter("JobDescription", ordersInfo.JobDescription);
                ReportParameter rpCustomerNote = new ReportParameter("CustomerNote", ordersInfo.CustNotes );
                this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp, rpTag, rpProjectName, rpProjectNo, rpSeller, rpOrderDate,rpJobDes,rpCustomerNote });
                this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", resultSet2));
                this.reportViewer1.RefreshReport();
                this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
                this.reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;
            }
            catch (Exception ee)
            {

            }
        }
Exemplo n.º 5
0
        protected void Page_Init(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                int IdUsuario = Int32.Parse(Request.QueryString["Id"]);
                // Set the processing mode for the ReportViewer to Remote
                rptHojaVida.ProcessingMode = ProcessingMode.Remote;
                rptHojaVida.ShowParameterPrompts = false;

                ServerReport serverReport = rptHojaVida.ServerReport;

                // Set the report server URL and report path
                //serverReport.ReportServerUrl = new Uri("http://10.142.6.57/reportserver");
                serverReport.ReportServerUrl = new Uri(String.Format("{0}/{1}", ConfigurationManager.AppSettings["ReportHost"],
                                                                                ConfigurationManager.AppSettings["ReportServer"]));
                serverReport.ReportPath = ConfigurationManager.AppSettings["ReportPathCVEmployee"];
                Microsoft.Reporting.WebForms.IReportServerCredentials irsc = new ReportAuthHelper
               (ConfigurationManager.AppSettings["ReportAuthUser"], ConfigurationManager.AppSettings["ReportAuthPwd"], ConfigurationManager.AppSettings["ReportDomain"]);
                rptHojaVida.ServerReport.ReportServerCredentials = irsc;

                // Create the sales order number report parameter
                ReportParameter UsuarioID = new ReportParameter();
                UsuarioID.Name = "pUsuarioID";
                UsuarioID.Values.Add(IdUsuario.ToString());

                // Set the report parameters for the report
                rptHojaVida.ServerReport.SetParameters(new ReportParameter[] { UsuarioID });
            }
        }
    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 });
    }
Exemplo n.º 7
0
 private void DoanhThuMonAn_Load(object sender, EventArgs e)
 {
     this.monAnTableAdapter.Fill(this.coffeeManagementDataSet.MonAn, dtpTuNgay.Value, dtpDenNgay.Value.AddHours(12));
     _para = new ReportParameter("TitleParameter", "Từ ngày: " + dtpTuNgay.Value.ToString("dd/MM/yyyy") + " Đến ngày: " + dtpDenNgay.Value.ToString("dd/MM/yyyy"));
     reportViewer1.LocalReport.SetParameters(_para);
     this.reportViewer1.RefreshReport();
 }
Exemplo n.º 8
0
        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();
            }
        }
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            ObjectDataSource ods = this.ObjectDataSource1;
            {
                ods.TypeName = " JMReports.WebApp.ReportBussiness.RestaurantReport";
                ods.SelectMethod = "getRestaurantEfficiency";
                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());
            }

            //添加参数
            ReportViewer rv = this.ReportViewer1;
            {
                string title = string.Format("{0}{1} {2} 餐饮部效率表", this.ddlYear.SelectedItem.Text, this.ddlMonth.SelectedItem.Text, this.selDept.SelectedItem.Text);
                ReportParameter p1 = new ReportParameter("title", title);

                rv.LocalReport.SetParameters(new ReportParameter[] { p1 });

                rv.LocalReport.EnableHyperlinks = true;
                rv.PageCountMode = PageCountMode.Actual;
                rv.ShowBackButton = false;
                rv.ShowRefreshButton = false;
                rv.LocalReport.Refresh();
            }
        }
Exemplo n.º 10
0
 public void setRptXraySummaryView(DateTime dateStart, DateTime dateEnd)
 {
     try
     {
         ReportDataSource rds = new ReportDataSource("xraySummary", getXraySummaryView(dateStart, dateEnd));
         //MessageBox.Show("bbbb");
         rV1.LocalReport.DataSources.Add(rds);
         //rV1.LocalReport.ReportPath = "d:\\source\\reportBangna\\reportBangna\\report\\xraysummary.rdlc";
         rV1.LocalReport.ReportPath = System.Environment.CurrentDirectory + "\\report\\xraysummary.rdlc";
         ReportParameter reportParaHeader1 = new ReportParameter();
         reportParaHeader1.Name = "header1";
         reportParaHeader1.Values.Add("aaaaaa");
         rV1.LocalReport.SetParameters(reportParaHeader1);
         ReportParameter reportParaHeader2 = new ReportParameter();
         reportParaHeader2.Name = "header2";
         reportParaHeader2.Values.Add("bbbbbbbb");
         rV1.LocalReport.SetParameters(reportParaHeader2);
         ReportParameter reportParaHeader3 = new ReportParameter();
         reportParaHeader3.Name = "header3";
         reportParaHeader3.Values.Add("cccccccc");
         rV1.LocalReport.SetParameters(reportParaHeader3);
     }
     catch (Exception ex)
     {
         MessageBox.Show("error " + ex.Message);
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadCourse(instructor);
            GetCourseList();

            DataTable dt = GetRegisteredCourse(instructor,courselist);
            DataTable rt = GetRegistrationTmln(instructor, courselist);
            DataTable cp = GetCourseCompletion(instructor, courselist);
            DataTable cc = GetCourseCompletionTrend(instructor, courselist);
            DataTable kt = GetScore(instructor, courselist);
            DataTable ht = GetKCTimeLine(instructor, courselist);
            DataTable hier = GetHierarchy(instructor, courselist);
            CheckAllCourses();
            ReportViewer1.Visible = true;
            ReportViewer1.LocalReport.ReportPath = @"FacultyDashboard.rdlc";

            ReportParameter p1 = new ReportParameter("Color", ddl_color.SelectedValue.ToString());
            this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { p1 });

            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("RegisteredCourse", dt));
            ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("RegistrationTimeLines", rt));
            ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("CourseCompletion", cp));
            ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("CourseCompletionTrend", cc));
            ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("ScorePerCourse", kt));
            ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("QuizTimeline", ht));
            ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("InstructorHierarchy", hier));
            ReportViewer1.LocalReport.Refresh();
        }
    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {

      //set session value 
      JMReports.Business.SearchCondition currentCondition = new Business.SearchCondition();
      currentCondition.Hotel = this.selDept.SelectedValue;
      currentCondition.YearCode = this.ddlYear.SelectedValue;
      currentCondition.MonthCode = this.ddlMonth.SelectedValue;
      HttpContext.Current.Session["CurrentCondition"] = currentCondition;

      ObjectDataSource ods = this.ObjectDataSource1;
      {
        ods.TypeName = " JMReports.WebApp.ReportBussiness.UnallocateReport";
        ods.SelectMethod = "getReport";
        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());
      }

      //添加参数
      ReportViewer rv = this.ReportViewer1;
      {

        string title = string.Format("{0}{1} {2} 不可分摊成本费用", this.ddlYear.SelectedItem.Text, this.ddlMonth.SelectedItem.Text, this.selDept.SelectedItem.Text);
        ReportParameter p1 = new ReportParameter("title", title);
        rv.LocalReport.SetParameters(new ReportParameter[] { p1 });

        rv.LocalReport.EnableHyperlinks = true;
        rv.PageCountMode = PageCountMode.Actual;
        rv.ShowBackButton = false;
        rv.ShowRefreshButton = false;
        rv.LocalReport.Refresh();
      }
    }
        private void geraRelatorio()
        {
            lDtPesquisa = (DataTable)Session["ldsRel"];
            if (lDtPesquisa.Rows.Count > 0)
            {

                string periodo = Request.QueryString["periodo"].ToString();
                InstituicoesBL instBL = new InstituicoesBL();
                Instituicoes inst = new Instituicoes();

                InstituicoesLogoBL instLogoBL = new InstituicoesLogoBL();
                InstituicoesLogo instLogo = new InstituicoesLogo();

                ReportDataSource rptDatasourceInstituicao = new ReportDataSource("DataSet_Instituicao", instBL.PesquisarDsBL().Tables[0]);
                ReportDataSource rptDatasourceInstituicaoLogo = new ReportDataSource("DataSet_InstituicaoLogo", instLogoBL.PesquisarDsBL().Tables[0]);
                ReportDataSource rptDatasourceMovEstoque = new ReportDataSource("DataSet_MovimentacaoEstoque", lDtPesquisa);

                ReportParameter[] param = new ReportParameter[1];
                param[0] = new ReportParameter("periodo", periodo);

                rptMovestoque.LocalReport.SetParameters(param);
                rptMovestoque.LocalReport.DataSources.Add(rptDatasourceInstituicao);
                rptMovestoque.LocalReport.DataSources.Add(rptDatasourceInstituicaoLogo);
                rptMovestoque.LocalReport.DataSources.Add(rptDatasourceMovEstoque);

                rptMovestoque.LocalReport.Refresh();
                //Session["ldsRel"] = null;
            }
            else
            {
                divRelatorio.Visible = false;
                divMensagem.Visible = true;
                lblMensagem.Text = "Este relatorio não possui dados.";
            }
        }
Exemplo n.º 14
0
 private void Form4_Load(object sender, EventArgs e)
 {
     SqlConnection con = Class1.connection();
     con.Open();
     try
     {
         DataTable dt = new DataTable();
         DataSet ds = new DataSet("DataSet1");
         SqlDataAdapter ada = new SqlDataAdapter("select * from salesdetails where csname='"+textBox2.Text+"' and bno=" + Convert.ToDecimal(textBox1.Text), con);
         ada.Fill(dt);
         ds.Tables.Add(dt);
         ReportParameter billno = new ReportParameter("billno", textBox1.Text);
         ReportParameter companyname = new ReportParameter("companyname", textBox2.Text);
         ReportParameter companyaddress = new ReportParameter("companyaddress", textBox3.Text);
         ReportParameter companytinno = new ReportParameter("companytin", textBox4.Text);
         ReportParameter date = new ReportParameter("date", textBox5.Text);
         ReportParameter subvat = new ReportParameter("subvat", textBox6.Text);
         ReportParameter subtotal = new ReportParameter("subtotal", textBox7.Text);
         ReportParameter total = new ReportParameter("total", textBox8.Text);
         this.reportViewer1.LocalReport.DataSources.Clear();
         this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", ds.Tables[0]));
         this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { companyname, companyaddress, companytinno, billno, date,subvat,subtotal,total });
         this.reportViewer1.RefreshReport();
         con.Close();
     }
     catch (Exception ex)
     {
         con.Close();
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ReportParameter[] nombre = new ReportParameter[1];
        //ReportParameter[] direccion = new ReportParameter[1];
        //ReportParameter[] telefono = new ReportParameter[1];
        //ReportParameter[] siglas = new ReportParameter[1];

        centroTA.Fill(centroDT);
        foreach (centroestudio.CentroEstudioRow fila in centroDT.Rows)
        {
            nombre[0] = new ReportParameter("nombre", fila.nombre.ToString());
            //direccion[0] = new ReportParameter("direccion", fila.direccion.ToString());
            //telefono[0] = new ReportParameter("telefono", fila.telefono.ToString());
            //siglas[0] = new ReportParameter("siglas", fila.siglas.ToString());
        }

        ReportViewer1.LocalReport.SetParameters(nombre);
        ReportViewer2.LocalReport.SetParameters(nombre);
        //ReportViewer1.LocalReport.SetParameters(direccion);
        //ReportViewer1.LocalReport.SetParameters(telefono);
        //ReportViewer1.LocalReport.SetParameters(siglas);

        ReportViewer1.LocalReport.Refresh();
        ReportViewer2.LocalReport.Refresh();
    }
Exemplo n.º 16
0
        private void anteprimaStampaBilancioLoad(object sender, EventArgs e)
        {
            // Set Processing Mode
            _reportViewer = new ReportViewer {ProcessingMode = ProcessingMode.Local};
            
            // Set RDL file
            _reportViewer.LocalReport.ReportEmbeddedResource = "Gipasoft.Stabili.UI.StatoPatrimoniale.Reports.DettaglioPartitario.rdlc";

            // Supply a DataTable corresponding to each report dataset
            _reportViewer.LocalReport.DataSources.Add(new ReportDataSource("MovimentoContabileBilancioDTO", _partitario));

            // Add the reportviewer to the form
            Controls.Add(_reportViewer);
            _reportViewer.Dock = DockStyle.Fill;

            _reportViewer.LocalReport.EnableExternalImages = true;

            var parameterCondominio1 = new ReportParameter("condominio1", _reportParameters.DescrizioneCondominio[0]);
            var parameterCondominio2 = new ReportParameter("condominio2", _reportParameters.DescrizioneCondominio[1]);
            var parameterCondominio3 = new ReportParameter("condominio3", _reportParameters.DescrizioneCondominio[2]);
            var parameterCondominio4 = new ReportParameter("condominio4", _reportParameters.DescrizioneCondominio[3]);
            var parameterCodiceCondominio = new ReportParameter("codiceCondominio", _reportParameters.CodiceCondominio);
            var parameterEsercizio = new ReportParameter("esercizio", _reportParameters.DescrizioneEsercizio);
            var parameterAzienda = new ReportParameter("azienda", _reportParameters.DescrizioneAzienda);
            var parameterGriglia = new ReportParameter("griglia", _reportParameters.VisualizzaGriglia.ToString());
            var parameterNote = new ReportParameter("note", _reportParameters.Note);

            var parameterIntestazioneStudio = new ReportParameter("intestazioneStudio", _reportParameters.IntestazioneStudio);
            var parameterViaStudio = new ReportParameter("viaStudio", _reportParameters.ViaStudio);
            var parameterCapStudio = new ReportParameter("capStudio", _reportParameters.CapStudio);
            var parameterLocalitaStudio = new ReportParameter("localitaStudio", _reportParameters.LocalitaStudio);
            var parameterLogo = new ReportParameter("logo", _documentService.SaveInLocalCache(new Gipasoft.Business.Interface.DocumentInfo() { Body = _aziendaService.GetLogo().LogoAzienda, FileName = "logo.jpg" }));

            string dataSituazione = "Fine esercizio";
            if (_reportParameters.DataSituazione != null)
                dataSituazione = _reportParameters.DataSituazione.Value.ToShortDateString();
            var parameterDataSituazione = new ReportParameter("dataSituazione", dataSituazione);

            _reportViewer.LocalReport.SetParameters(
                new [] 
                { 
                    parameterCondominio1, 
                    parameterCondominio2, 
                    parameterCondominio3, 
                    parameterCondominio4, 
                    parameterCodiceCondominio,
                    parameterEsercizio, 
                    parameterAzienda, 
                    parameterGriglia, 
                    parameterNote, 
                    parameterIntestazioneStudio,
                    parameterViaStudio,
                    parameterCapStudio,
                    parameterLocalitaStudio,
                    parameterLogo,
                    parameterDataSituazione
                });

            _reportViewer.RefreshReport();
        }
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            ObjectDataSource ods = this.ObjectDataSource1;
            {
                ods.TypeName = " JMReports.WebApp.ReportBussiness.RoomMarketReport";
                ods.SelectMethod = "getReport";
                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());
            }

            //添加参数
            ReportViewer rv = this.ReportViewer1;
            {
                ReportParameter p1 = new ReportParameter("title", "客房市场细分");
                rv.LocalReport.SetParameters(new ReportParameter[] { p1 });

                rv.LocalReport.EnableHyperlinks = true;
                rv.PageCountMode = PageCountMode.Actual;
                rv.ShowBackButton = false;
                rv.ShowRefreshButton = false;
                rv.LocalReport.Refresh();
            }
        }
        private void anteprimaStampaListaVersamentiLoad(object sender, EventArgs e)
        {
            try
            {
                // Set RDL file
                if (!string.IsNullOrEmpty(_reportParameters.Raggruppamento) && _reportParameters.Raggruppamento != "x")
                    reportViewer1.LocalReport.ReportEmbeddedResource = "Gipasoft.Stabili.UI.VersamentiCondomini.Reports.ListaVersamentiRaggruppata.rdlc";
                else
                    reportViewer1.LocalReport.ReportEmbeddedResource = "Gipasoft.Stabili.UI.VersamentiCondomini.Reports.ListaVersamenti.rdlc";

                // Supply a DataTable corresponding to each report dataset
                reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Versamenti", _versamenti));

                // Set Processing Mode
                reportViewer1.ProcessingMode = ProcessingMode.Local;

                reportViewer1.LocalReport.EnableExternalImages = true;

                var parameterCondominio1 = new ReportParameter("condominio1", _reportParameters.DescrizioneCondominio[0]);
                var parameterCondominio2 = new ReportParameter("condominio2", _reportParameters.DescrizioneCondominio[1]);
                var parameterCondominio3 = new ReportParameter("condominio3", _reportParameters.DescrizioneCondominio[2]);
                var parameterCondominio4 = new ReportParameter("condominio4", _reportParameters.DescrizioneCondominio[3]);
                var parameterCodiceCondominio = new ReportParameter("codiceCondominio", _reportParameters.CodiceCondominio);
                var parameterEsercizio = new ReportParameter("esercizio", _reportParameters.DescrizioneEsercizio);
                var parameterAzienda = new ReportParameter("azienda", _reportParameters.DescrizioneAzienda);

                var parameterIntestazioneStudio = new ReportParameter("intestazioneStudio", _reportParameters.IntestazioneStudio);
                var parameterViaStudio = new ReportParameter("viaStudio", _reportParameters.ViaStudio);
                var parameterCapStudio = new ReportParameter("capStudio", _reportParameters.CapStudio);
                var parameterLocalitaStudio = new ReportParameter("localitaStudio", _reportParameters.LocalitaStudio);

                var parameterLogo = new ReportParameter("logo", _documentService.SaveInLocalCache(new Business.Interface.DocumentInfo { Body = _aziendaService.GetLogo().LogoAzienda, FileName = "logo.jpg" }));

                var parameterGruppo = new ReportParameter("gruppo", _reportParameters.Raggruppamento);

                reportViewer1.LocalReport.SetParameters(
                    new[] 
                    { 
                        parameterCondominio1, 
                        parameterCondominio2, 
                        parameterCondominio3, 
                        parameterCondominio4, 
                        parameterCodiceCondominio,
                        parameterEsercizio, 
                        parameterAzienda, 
                        parameterIntestazioneStudio,
                        parameterViaStudio,
                        parameterCapStudio,
                        parameterLocalitaStudio,
                        parameterLogo,
                        parameterGruppo
                    });

                reportViewer1.RefreshReport();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 19
0
        internal void LoadParametros(DateTime fechaini, DateTime fechafin, DataTable tmpCuentas, DataTable tmpProveedores, DataTable tmpObras, int TipoFecha, int SelFact, string NomTipoFecha, string NomSelFact)
        {
            this.WindowState = FormWindowState.Maximized;
            // TODO: This line of code loads data into the 'Promowork_dataDataSet.EmpresasActual' table. You can move, or remove it, as needed.
            this.EmpresasActualTableAdapter.FillByEmpresa(this.Promowork_dataDataSet.EmpresasActual, VariablesGlobales.nIdEmpresaActual);
            try
            {
                this.ResumenComprasBancoTableAdapter.Fill(this.Promowork_dataDataSet.ResumenComprasBanco, VariablesGlobales.nIdEmpresaActual, fechaini, fechafin, tmpCuentas, tmpProveedores, tmpObras, TipoFecha, SelFact);
            }
            catch (SqlException ex)
            {
                ErroresSQLServer.ManipulaErrorSQL(ex, this.Text);
            }

            ReportParameter[] Parametros = new ReportParameter[4];
            //Establecemos el valor de los parámetros
            Parametros[0] = new ReportParameter("FechaIni", Convert.ToString(fechaini));
            Parametros[1] = new ReportParameter("FechaFin", Convert.ToString(fechafin));
            Parametros[2] = new ReportParameter("NomTipoFecha", Convert.ToString(NomTipoFecha));
            Parametros[3] = new ReportParameter("NomSelFact", Convert.ToString(NomSelFact));

            //Pasamos el array de los parámetros al ReportViewer
            this.reportViewer1.LocalReport.SetParameters(Parametros);

            this.reportViewer1.RefreshReport();
        }
    protected void btnViewreport_Click(object sender, EventArgs e)
    {
        ///Add Exception handilng try catch change by vishal 21-05-2012
        try
        {
            string vardate;

            string siteid;

            siteid = drpsite.SelectedValue;
            ReportParameter[] Param = new ReportParameter[1];

            Param[0] = new ReportParameter("siteid", siteid);
            ReportViewer1.Attributes.Add("style", "overflow:auto;");
            ReportViewer1.ShowCredentialPrompts = false;
            ReportViewer1.ServerReport.ReportServerCredentials = new ReportClass.ReportCredentials(ConfigurationSettings.AppSettings["Credentials"].ToString().Split('\\')[0], ConfigurationSettings.AppSettings["Credentials"].ToString().Split('\\')[1], "");
            ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
            ReportViewer1.ServerReport.ReportServerUrl = new System.Uri(ConfigurationSettings.AppSettings["ReportServerURL"].ToString());
            ReportViewer1.ServerReport.ReportPath = "/BESTREPORT/Pendingcallreport";
            ReportViewer1.ServerReport.SetParameters(Param);
            ReportViewer1.ServerReport.Refresh();
        }
        catch (Exception ex)
        {
            string myScript;
            myScript = "<script language=javascript>alert('Exception - '" + ex + "');</script>";
            Page.RegisterClientScriptBlock("MyScript", myScript);
            return;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            string vardate;
            string vardate1;

            vardate = DateTime.Now.ToString();

            vardate1 = DateTime.Now.ToString();

            ReportParameter[] Param = new ReportParameter[2];
            Param[0] = new ReportParameter("from", vardate);
            Param[1] = new ReportParameter("to", vardate1);

            ReportViewer1.ShowCredentialPrompts = false;
            ReportViewer1.ServerReport.ReportServerCredentials = new ReportClass.ReportCredentials(ConfigurationSettings.AppSettings["Credentials"].ToString().Split('\\')[0], ConfigurationSettings.AppSettings["Credentials"].ToString().Split('\\')[1], "");
            ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
            ReportViewer1.ServerReport.ReportServerUrl = new System.Uri(ConfigurationSettings.AppSettings["ReportServerURL"].ToString());
            ReportViewer1.ServerReport.ReportPath = "/BESTREPORT/categorycalls";
            ReportViewer1.ServerReport.SetParameters(Param);
            ReportViewer1.ServerReport.Refresh();

        }
    }
Exemplo n.º 22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Convert.ToInt32(Session["rol"]) == 0 || Session["rol"].ToString() == "")
        {
            Response.Redirect("denegado.aspx");
        }

        ReportParameter[] nombre = new ReportParameter[1];

        centroTA.Fill(centroDT);
        foreach (centroestudio.CentroEstudioRow fila in centroDT.Rows)
        {
            nombre[0] = new ReportParameter("nombre", fila.nombre.ToString());
        }

        ReportViewer1.LocalReport.SetParameters(nombre);
        ReportViewer2.LocalReport.SetParameters(nombre);
        ReportViewer3.LocalReport.SetParameters(nombre);
        ReportViewer4.LocalReport.SetParameters(nombre);

        ReportViewer1.LocalReport.Refresh();
        ReportViewer2.LocalReport.Refresh();
        ReportViewer3.LocalReport.Refresh();
        ReportViewer4.LocalReport.Refresh();
    }
        protected void Page_Load(object sender, EventArgs e)
        {

            tourid = Page.Request.QueryString["key"].ToString();
            cityid = Page.Request.QueryString["key1"].ToString();
            countryid = Page.Request.QueryString["key2"].ToString();

            ReportParameter[] parm = new ReportParameter[1];
            ReportParameter[] parmcity = new ReportParameter[1];
            ReportParameter[] parmcountry = new ReportParameter[1];
            
            parm[0] = new ReportParameter("TOUR_ID", tourid);
            parmcity[0] = new ReportParameter("CITY_ID", cityid);
            parmcountry[0] = new ReportParameter("COUNTRY_ID", countryid);

            rptViewer1.ShowCredentialPrompts = false;
            rptViewer1.ShowParameterPrompts = false;

            rptViewer1.ServerReport.ReportServerCredentials = new ReportCredentials(WebConfigurationManager.AppSettings["ReportServerUsername"].ToString(), WebConfigurationManager.AppSettings["ReportServerPassword"].ToString(), WebConfigurationManager.AppSettings["ReportServerDomain"].ToString());

            rptViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
            rptViewer1.ServerReport.ReportServerUrl = new System.Uri(WebConfigurationManager.AppSettings["ReportServer"].ToString());
            rptViewer1.ServerReport.ReportPath = "/FlamingoSSRSReports/rdlTourHotelStdCityWise";
            rptViewer1.ServerReport.SetParameters(parm);
            rptViewer1.ServerReport.SetParameters(parmcity);
            rptViewer1.ServerReport.SetParameters(parmcountry);
            rptViewer1.ServerReport.Refresh();
        }
Exemplo n.º 24
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ReportParameter[] parameters = new ReportParameter[1];
     parameters[0] = new ReportParameter("para1","da");
     this.ReportViewer1.LocalReport.SetParameters(parameters);
     this.ReportViewer1.LocalReport.Refresh();
 }
Exemplo n.º 25
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        ReportParameter[] reportParameters = new ReportParameter[1];

        reportParameters[0] = new ReportParameter("ReportYear", DateTime.Now.Year.ToString());
        rvSales.ServerReport.SetParameters(reportParameters);
    }
        private void HY_PurchasingdetailsReport_Load(object sender, EventArgs e)
        {
            HY_Invoicing.HY_Purchasingstatus hypur;//实例化传值窗体
            hypur = (HY_Invoicing.HY_Purchasingstatus)this.Owner;
            string aa = hypur.GetMainvalue;//单号传值
            string sup = hypur.HYSupplier;//供应商传值
            string model = hypur.ModelID;//模号

            HY_BLL.HY_StorageBLL hystorfobll = new HY_StorageBLL();
            string sql = "select * from HY_ProcurementInfo where c_DID='" + aa + "' and c_Supplier='"+sup+"'";
            DataSet ds = hystorfobll.ExecuteQueryDataSet(sql);
            this.reportViewer1.LocalReport.ReportEmbeddedResource = "LL.Main.HY_Report.HY_ProcurementInfoReport.rdlc";
            this.reportViewer1.LocalReport.DataSources.Clear();
            this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("HY_ProcurementInfo", ds.Tables[0]));
            //设置打印布局模式,显示物理页面大小
            this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
            //缩放模式为百分比,以100%方式显示
            this.reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;
            this.reportViewer1.ZoomPercent = 100;

            ReportParameter rp = new ReportParameter("content", sup);
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });
            ReportParameter rp1 = new ReportParameter("cgID", aa);
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp1 });
            ReportParameter mod = new ReportParameter("modelID", model);
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { mod });

            // TODO: 这行代码将数据加载到表“hYMISDataSet.HY_ProcurementInfo”中。您可以根据需要移动或移除它。
            //this.HY_ProcurementInfoTableAdapter.Fill(this.DataSet1.HY_ProcurementInfo, aa);
            this.reportViewer1.RefreshReport();
        }
Exemplo n.º 27
0
        private void FacturaRpt_Load(object sender, EventArgs e)
        {
            //this.reportViewer1.RefreshReport();
            
            //Se limpia el data source del informe
            reportViewer1.LocalReport.DataSources.Clear();

            //
            //Establezcamos los parámetros que enviaremos al reporte
            //recuerde que son dos para el titulo del reporte y para el nombre de la empresa
            //
            ReportParameter[] parameters = new ReportParameter[8];
            parameters[0] = new ReportParameter("parametroTitulo", Titulo);
            parameters[1] = new ReportParameter("parametroEmpresa", Empresa);
            parameters[2] = new ReportParameter("parametroCai", CAI);
            parameters[3] = new ReportParameter("parametroFecVto", FecVto);
            parameters[4] = new ReportParameter("parametroCuit", Cuit);
            parameters[5] = new ReportParameter("parametroInicioAct", InicioAct);
            parameters[6] = new ReportParameter("parametroDirEmpresa", DirEmpresa);
            parameters[7] = new ReportParameter("parametroTelEmpresa", TelEmpresa);

            //
            //Establezcamos la lista como Datasource del informe
            //
            reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Encabezado", Invoice));
            reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Detalle", Detail));
            //
            //Enviemos la lista de parametros
            //
            reportViewer1.LocalReport.SetParameters(parameters);
            //
            //Hagamos un refresh al reportViewer
            //
            reportViewer1.RefreshReport();
        }
    protected void btnViewreport_Click(object sender, EventArgs e)
    {
        /////Add Exception handilng try catch change by vishal 21-05-2012
        try
        {
            string vardate;
            string vardate1;

            string[] tempdate = txtFromDate.Text.ToString().Split(("/").ToCharArray());
            vardate = tempdate[2] + "-" + tempdate[1] + "-" + tempdate[0];
            string[] tempdate1 = txttoDate.Text.ToString().Split(("/").ToCharArray());
            vardate1 = tempdate1[2] + "-" + tempdate1[1] + "-" + tempdate1[0];

            ReportParameter[] Param = new ReportParameter[2];
            Param[0] = new ReportParameter("from", vardate);
            Param[1] = new ReportParameter("to", vardate1);

            ReportViewer1.ShowCredentialPrompts = false;
            ReportViewer1.ServerReport.ReportServerCredentials = new ReportClass.ReportCredentials(ConfigurationSettings.AppSettings["Credentials"].ToString().Split('\\')[0], ConfigurationSettings.AppSettings["Credentials"].ToString().Split('\\')[1], "");
            ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
            ReportViewer1.ServerReport.ReportServerUrl = new System.Uri(ConfigurationSettings.AppSettings["ReportServerURL"].ToString());
            ReportViewer1.ServerReport.ReportPath = "/BESTREPORT/categorycalls";
            ReportViewer1.ServerReport.SetParameters(Param);
            ReportViewer1.ServerReport.Refresh();
        }
        catch (Exception ex)
        {
            string myScript;
            myScript = "<script language=javascript>alert('Exception - '" + ex + "');</script>";
            Page.RegisterClientScriptBlock("MyScript", myScript);
            return;
        }
    }
        internal void LoadParametros(DateTime fechaini, DateTime fechafin, DataTable tmpClientes, Boolean Agrupado)
        {
            this.WindowState = FormWindowState.Maximized;
            // TODO: This line of code loads data into the 'Promowork_dataDataSet.EmpresasActual' table. You can move, or remove it, as needed.
            this.EmpresasActualTableAdapter.FillByEmpresa(this.Promowork_dataDataSet.EmpresasActual, VariablesGlobales.nIdEmpresaActual);

            try
               {
               this.ResumenFacturasClientesTableAdapter.FillbyCliente(this.Promowork_dataDataSet.ResumenFacturasClientes, tmpClientes, fechaini, fechafin);
            }
            catch (SqlException ex)
            {
                ErroresSQLServer.ManipulaErrorSQL(ex, this.Text);
            }

            ReportParameter[] Parametros = new ReportParameter[3];
            //Establecemos el valor de los parámetros
            Parametros[0] = new ReportParameter("FechaIni", Convert.ToString(fechaini));
            Parametros[1] = new ReportParameter("FechaFin", Convert.ToString(fechafin));
            Parametros[2] = new ReportParameter("Agrupado", Convert.ToString(Agrupado));
            //Pasamos el array de los parámetros al ReportViewer
            this.reportViewer1.LocalReport.SetParameters(Parametros);

            this.reportViewer1.RefreshReport();
        }
    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 });
    }
Exemplo n.º 31
0
        private void btnImprimir_Click(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
            RangoFecha       = "Del " + dtpFecIni.Text + " Al " + dtpFecFin.Text;
            // TODO: esta línea de código carga datos en la tabla 'DataSetCompra_Productos.V_COMPRA_PRODUCTOS_CABECERA_DETALLE' Puede moverla o quitarla según sea necesario.
            this.V_COMPRA_PRODUCTOS_CABECERA_DETALLETableAdapter.Fill(this.DataSetCompra_Productos.V_COMPRA_PRODUCTOS_CABECERA_DETALLE, dtpFecIni.Value, dtpFecFin.Value);

            ReportParameter[] parameters = new ReportParameter[3];
            parameters[0] = new ReportParameter("ParametroEmpresa", Empresa);
            parameters[1] = new ReportParameter("ParametroTitulo", Titulo);
            parameters[2] = new ReportParameter("RangoDeFechas", RangoFecha);

            //Enviemos la lista de parametros
            //
            reportViewer1.LocalReport.SetParameters(parameters);

            this.reportViewer1.RefreshReport();
        }
        private void btnGen_Click(object sender, EventArgs e)
        {
            this.usp_GetVisitsCountByVisitorTableAdapter.Fill(this.dbVisManDataSet1.usp_GetVisitsCountByVisitor, dtpFrom.Value.Date, dtpTo.Value.Date);


            //dbVisManDataSet1TableAdapters.usp_GetVisitsCountByVisitorTableAdapter da = new dbVisManDataSet1TableAdapters.usp_GetVisitsCountByVisitorTableAdapter();
            //DataTable dt = da.GetData(dtpFrom.Value.Date, dtpTo.Value.Date);
            //reportViewer1.LocalReport.DataSources.Clear();
            //reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", dt));
            ReportParameter rp1 = new ReportParameter("RptFromDate", dtpFrom.Value.Date.ToShortDateString());
            ReportParameter rp2 = new ReportParameter("RptToDate", dtpTo.Value.Date.ToShortDateString());

            reportViewer1.LocalReport.SetParameters(rp1);
            reportViewer1.LocalReport.SetParameters(rp2);

            this.reportViewer1.RefreshReport();
            //reportViewer1.LocalReport.Refresh();
        }
Exemplo n.º 33
0
        void loadingReportPhieuNhap(DateTime from, DateTime to)
        {
            string distanceTime = "";

            if (from.Equals(to))
            {
                distanceTime = String.Format("Ngày {0}", from.ToString("dd-MM-yyyy"));
            }
            else
            {
                distanceTime = String.Format("Từ: {0}       Đến: {1}", from.ToString("dd-MM-yyyy"), to.ToString("dd-MM-yyyy"));
            }
            ReportParameter param = new ReportParameter("txtDistanceTimePN", distanceTime);

            this.rpvPhieuNhap.LocalReport.SetParameters(param);
            this.USP_ReportPhieuNhapTableAdapter.Fill(this.DataSet_ThongKe.USP_ReportPhieuNhap, from.ToString("yyyy-MM-dd"), to.ToString("yyyy-MM-dd"));
            this.rpvPhieuNhap.RefreshReport();
        }
Exemplo n.º 34
0
 private void LoadDataInReportViewer(DataTable dtSetHeader, DataTable dtSetData, DataTable dtTotalInvoiceNo)
 {
     try
     {
         if (dtSetHeader.Rows.Count > 0 && dtSetData.Rows.Count > 0)
         {
             ReportViewer1.LocalReport.ReportPath = Server.MapPath("Reports\\PartyWiseSaleSummary.rdl");
             ReportViewer1.AsyncRendering         = true;
             ReportParameter FromDate = new ReportParameter();
             FromDate.Name = "FromDate";
             FromDate.Values.Add(txtFromDate.Text);
             ReportParameter ToDate = new ReportParameter();
             ToDate.Name = "ToDate";
             ToDate.Values.Add(txtToDate.Text);
             ReportParameter[] parameter = new ReportParameter[2];
             parameter[1] = FromDate;
             parameter[0] = ToDate;
             ReportViewer1.LocalReport.SetParameters(parameter);
             ReportViewer1.ProcessingMode = ProcessingMode.Local;
             ReportDataSource RDS1 = new ReportDataSource("DSetHeader", dtSetHeader);
             ReportViewer1.LocalReport.DataSources.Clear();
             ReportViewer1.LocalReport.DataSources.Add(RDS1);
             ReportDataSource RDS2 = new ReportDataSource("DSetData", dtSetData);
             ReportViewer1.LocalReport.DataSources.Add(RDS2);
             ReportDataSource RDS3 = new ReportDataSource("TotalDistinctSumGroupbyInvoiceNo", dtTotalInvoiceNo);
             ReportViewer1.LocalReport.DataSources.Add(RDS3);
             ReportViewer1.ShowPrintButton = true;
             this.ReportViewer1.LocalReport.Refresh();
             ReportViewer1.Visible     = true;
             ReportViewer1.ZoomPercent = 100;
             LblMessage.Text           = String.Empty;
         }
         else
         {
             LblMessage.Text       = "No Records Exists !!";
             ReportViewer1.Visible = false;
         }
     }
     catch (Exception ex)
     {
         LblMessage.Text = ex.Message.ToString();
         ErrorSignal.FromCurrentContext().Raise(ex);
     }
 }
        private bool BindReport()
        {
            oHt      = new Hashtable();
            oHt      = CreateHashTable();
            oStudent = new clsStudent();
            using (oDt = oStudent.GetCollegeCourseStudentDetails(oHt))
            {
                if (oDt != null && oDt.Rows.Count > 0)
                {
                    rptViewer.LocalReport.DataSources.Clear();
                    rptViewer.LocalReport.ReportPath = clsGetSettings.PhysicalSitePath + "Eligibility\\Rdlc\\rptCollegeCourseStudentDetailsMUHS.rdlc";
                    ReportDataSource  oRds  = new ReportDataSource("DSOAReports", oDt);
                    ReportParameter[] param = new ReportParameter[7];
                    param[0] = new ReportParameter("UniName", clsGetSettings.UniversityName.ToString(), true);
                    param[1] = new ReportParameter("UniLogo", clsGetSettings.SitePath + "Images/" + clsGetSettings.Logo, true);
                    param[2] = new ReportParameter("CollegeName", hidCollName.Value.Trim(), true);
                    param[3] = new ReportParameter("CourseName", hidCrName.Value.Trim(), true);
                    param[4] = new ReportParameter("userName", oUser.Name, true);
                    param[5] = new ReportParameter("Address", clsGetSettings.Address, true);
                    string sLoginType = "C";
                    if (oUser.UserTypeCode != "2")
                    {
                        sLoginType = "A";
                    }

                    param[6] = new ReportParameter("LoginType", sLoginType, true);

                    //string sCriteria = "Branch Change details for " + oUser.Name; ;
                    // param[6] = new ReportParameter("ReportCriteria", sCriteria, true);
                    ReportDataSource MultNomDS = new ReportDataSource("dsMultiNom", MultinomenClature());
                    rptViewer.LocalReport.EnableExternalImages = true;
                    rptViewer.LocalReport.SetParameters(param);
                    rptViewer.LocalReport.DataSources.Add(oRds);
                    rptViewer.LocalReport.DataSources.Add(MultNomDS);
                    rptViewer.LocalReport.Refresh();
                    return(true);
                }
                else
                {
                    lblErrorMsg.Visible = true;
                    return(false);
                }
            }
        }
        private void pbPrint_Click(object sender, EventArgs e)
        {
            if (dataGridView1.RowCount <= 1)
            {
                return;
            }

            string reportFileName = "SmartMES_SinMyung.Reports.P1B06_DELI_PROGRESS.rdlc";

            string reportParm1 = "수주기간 : ";
            string reportParm2 = "거래처/프로젝트/영업담당/현장 : ";
            string reportParm3 = "";

            reportParm1 = reportParm1 + dtpFromDate.Value.ToString("yyyy-MM-dd") + " ~ " + dtpToDate.Value.ToString("yyyy-MM-dd");

            if (string.IsNullOrEmpty(tbSearch.Text.Trim()))
            {
                reportParm2 = reportParm2 + "전체";
            }
            else
            {
                reportParm2 = reportParm2 + tbSearch.Text.Trim();
            }

            reportParm3 = reportParm3 + "";

            ViewReport_H viewReport = new ViewReport_H();

            viewReport.reportViewer1.ProcessingMode = ProcessingMode.Local;
            viewReport.reportViewer1.LocalReport.ReportEmbeddedResource = reportFileName;

            ReportParameter rp1 = new ReportParameter("ReportParameter1", reportParm1);
            ReportParameter rp2 = new ReportParameter("ReportParameter2", reportParm2);
            ReportParameter rp3 = new ReportParameter("ReportParameter3", reportParm3);

            viewReport.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp1, rp2, rp3 });

            ReportDataSource rds = new ReportDataSource("DataSet1", sPProgressQueryBindingSource);

            viewReport.reportViewer1.LocalReport.DataSources.Add(rds);
            viewReport.reportViewer1.LocalReport.Refresh();

            viewReport.ShowDialog();
        }
Exemplo n.º 37
0
        /// <summary>
        /// This is the mainfunction which used to load the report to the report viewer.
        /// </summary>
        /// <param name="param">Contains perameter key value collectionfor perameterized report. It's default value is null.</param>
        public void GenerateReport()
        {
            smARTRptViewer.LocalReport.ReportPath = MapPath("/Content/Reports/GeneralReports/" + _reportFilter.ReportName);

            conRCM.SelectCommand = _reportFilter.SP_Name;

            List <String> strParameters = new List <String>(_reportFilter.Parameters.Split(','));

            //conRCM.SelectParameters.Add("FromDate", _reportFilter.FromDate.ToString());
            //conRCM.SelectParameters.Add("ToDate", _reportFilter.ToDate.ToString());
            //conRCM.SelectParameters.Add("PartyID", _reportFilter.PartyID.ToString());

            ReportDataSource reportDataSource = new ReportDataSource(_reportFilter.DataSet_Name, conRCM);

            smARTRptViewer.LocalReport.DataSources.Clear();
            smARTRptViewer.LocalReport.EnableExternalImages = true;

            if (strParameters.Count > 0)
            {
                List <ReportParameter> parameters = new List <ReportParameter>();

                foreach (string param in strParameters)
                {
                    string paramValue = Convert.ToString(ReportFilter.GetPropValue(_reportFilter, param)).Trim();
                    if (string.IsNullOrEmpty(paramValue))
                    {
                        paramValue = " ";
                    }
                    conRCM.SelectParameters.Add(param, paramValue);
                    ReportParameter rptParam = new ReportParameter(param, paramValue);
                    parameters.Add(rptParam);
                }
                smARTRptViewer.LocalReport.SetParameters(parameters);
            }

            if (!string.IsNullOrEmpty(_reportFilter.SubReportInfo))
            {
                smARTRptViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing);
            }

            smARTRptViewer.LocalReport.DataSources.Add(reportDataSource);
            //ReportDataSource subReportDataSource = new ReportDataSource(_reportFilter.DataSet_Name, conRCM1);
            //conRCM1.SelectCommand = "TestSubReport";
        }
Exemplo n.º 38
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            DataTable dt = new OutsoleMasterDataSet().Tables["OutsoleMasterTable"];

            foreach (OutsoleMasterExportViewModel outsoleMasterExportView in outsoleMasterExportViewList)
            {
                DataRow dr = dt.NewRow();
                dr["Sequence"] = outsoleMasterExportView.Sequence;
                dr["ProductNo"] = outsoleMasterExportView.ProductNo;
                dr["Country"] = outsoleMasterExportView.Country;
                dr["ShoeName"] = outsoleMasterExportView.ShoeName;
                dr["ArticleNo"] = outsoleMasterExportView.ArticleNo;
                dr["OutsoleCode"] = outsoleMasterExportView.OutsoleCode;
                dr["Quantity"] = outsoleMasterExportView.Quantity;
                dr["ETD"] = outsoleMasterExportView.ETD;
                dr["OutsoleLine"] = outsoleMasterExportView.OutsoleLine;
                dr["SewingStartDate"] = outsoleMasterExportView.SewingStartDate;
                dr["SewingFinishDate"] = outsoleMasterExportView.SewingFinishDate;
                dr["OutsoleMatsArrival"] = outsoleMasterExportView.OutsoleMatsArrival;
                dr["OutsoleWHBalance"] = outsoleMasterExportView.OutsoleWHBalance;
                dr["OutsoleStartDate"] = outsoleMasterExportView.OutsoleStartDate;
                dr["OutsoleFinishDate"] = outsoleMasterExportView.OutsoleFinishDate;
                dr["SewingQuota"] = outsoleMasterExportView.SewingQuota;
                dr["OutsoleQuota"] = outsoleMasterExportView.OutsoleQuota;
                dr["SewingBalance"] = outsoleMasterExportView.SewingBalance;
                dr["OutsoleBalance"] = outsoleMasterExportView.OutsoleBalance;
                dr["ReleasedQuantity"] = outsoleMasterExportView.ReleasedQuantity;
                dr["IsOutsoleMatsArrivalOk"] = outsoleMasterExportView.IsOutsoleMatsArrivalOk;
                dr["IsHaveMemo"] = !string.IsNullOrEmpty(outsoleMasterExportView.MemoId);

                dt.Rows.Add(dr);
            }

            ReportParameter rp = new ReportParameter("Line", line);
            ReportDataSource rds = new ReportDataSource();
            rds.Name = "OutsoleMaster";
            rds.Value = dt;
            //reportViewer.LocalReport.ReportPath = @"C:\Users\IT02\Documents\Visual Studio 2010\Projects\Saoviet Master Schedule Solution\MasterSchedule\Reports\OutsoleMasterReport.rdlc";
            reportViewer.LocalReport.ReportPath = @"Reports\OutsoleMasterReport.rdlc";
            reportViewer.LocalReport.SetParameters(new ReportParameter[] { rp });
            reportViewer.LocalReport.DataSources.Add(rds);
            reportViewer.RefreshReport();
            this.Cursor = null;
        }
Exemplo n.º 39
0
        protected void btnGenerate_Click(object sender, EventArgs e)
        {
            string dateFrom    = calFromDate.SelectedDate.ToString("dd-MMM-yyyy");
            string dateTo      = calToDate.SelectedDate.ToString("dd-MMM-yyyy");
            string fromFactory = ddlFromFactory.SelectedItem.Text;
            string toFactory   = ddlToFactory.SelectedItem.Text;
            string fromAOD     = ddlFromAOD.SelectedItem.Text;
            string toAOD       = ddlToAOD.SelectedItem.Text;
            string fromCPO     = ddlFromCPO.SelectedItem.Text;
            string toCPO       = ddlToCPO.SelectedItem.Text;

            ReportViewer1.ProcessingMode         = ProcessingMode.Local;
            ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/ReportDesigns/FactoryTransfers.rdlc");
            FactoryTransfersDS output = dba.getFactoryTransferDetails(dateFrom, dateTo, fromFactory, toFactory, fromAOD, toAOD, fromCPO, toCPO);
            ReportDataSource   ds     = new ReportDataSource("FactoryTransfersDS", output.Tables[0]);

            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.DataSources.Add(ds);

            ReportParameter fromDate = new ReportParameter("FromDate", dateFrom);

            this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { fromDate });
            ReportParameter toDate = new ReportParameter("ToDate", dateTo);

            this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { toDate });
            ReportParameter fFac = new ReportParameter("FromFactory", fromFactory);

            this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { fFac });
            ReportParameter tFac = new ReportParameter("ToFactory", toFactory);

            this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { tFac });
            ReportParameter fAOD = new ReportParameter("FromAOD", fromAOD);

            this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { fAOD });
            ReportParameter tAOD = new ReportParameter("ToAOD", toAOD);

            this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { tAOD });
            ReportParameter fCPO = new ReportParameter("FromCPO", fromCPO);

            this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { fCPO });
            ReportParameter tCPO = new ReportParameter("ToCPO", toCPO);

            this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { tCPO });
        }
Exemplo n.º 40
0
        private static ReportParameter[] ReportParameters(dynamic reportPram, string reportType, ReportParameter[] rptParams)
        {
            if (reportType == "CollectionLedgerDetails" || reportType == "CollectionLedgerSummary" || reportType == "LoanInstLedgerDetails" || reportType == "InstallmentCollectionReport")
            {
                rptParams    = new ReportParameter[3];
                rptParams[0] = new ReportParameter("rpMachineName", reportPram.MachineName);
                rptParams[1] = new ReportParameter("rpUserName", reportPram.UserName);
                rptParams[2] = new ReportParameter("rpUserId", reportPram.UserId);
            }

            else
            {
                rptParams    = new ReportParameter[3];
                rptParams[0] = new ReportParameter("rpMachineName", reportPram.MachineName);
                rptParams[1] = new ReportParameter("rpUserName", reportPram.UserName);
                rptParams[2] = new ReportParameter("rpUserId", reportPram.UserId);
            }
            return(rptParams);
        }
Exemplo n.º 41
0
 private void btn_Query_Click(object sender, EventArgs e)
 {
     reportViewer1.LocalReport.ReportPath = Config.ReportsPath + "AgentSummary.rdlc";
     reportViewer1.LocalReport.DataSources.Clear();
     string strsql = "SELECT * FROM v_reception WHERE DetailsClass='" + coClass.SelectedValue.ToString() + "' AND reception_type in ('HolderDelagate','OrgDelegate') ORDER BY Entry_doc_no";
     DataTable dt = Db.GetDataAsDataTable(strsql);
     ReportDataSource rds = new ReportDataSource("DataSet1", dt);
     reportViewer1.LocalReport.DataSources.Add(rds);
     ReportParameter[] ReportParams = new ReportParameter[]
                        {
                         new ReportParameter("ReportTitle","جدول احصائي"+Environment.NewLine+"يوضح اجمالي عدد المساهمين من فئة "
                         +coClass.Text+" الذين وكلوا مساهمين اخرين للمشاركة في فعاليات الاجتماع التاسع للجمعية العامة للشركة المنعقدة لعام 2015")
                        };
     reportViewer1.LocalReport.SetParameters(ReportParams);
     reportViewer1.SetDisplayMode(DisplayMode.Normal);
     reportViewer1.RefreshReport();
     //this.WindowState = FormWindowState.Maximized;
     //this.ShowDialog();
 }
Exemplo n.º 42
0
        private void VentasDetalleRpt_Load(object sender, EventArgs e)
        {
            System.Drawing.Icon ico = Properties.Resources.icono_app;
            this.Text       = "  Ventas en detalle";
            this.Icon       = ico;
            this.ControlBox = true;
            FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            ReportParameter parameters = new ReportParameter("parametroLocal", nombreLocal);

            this.reportViewer1.ProcessingMode = ProcessingMode.Local;
            string path = Application.StartupPath + @"\Informes\VentasDetalle.rdlc";

            this.reportViewer1.LocalReport.ReportPath = path;
            reportViewer1.LocalReport.DataSources.Add(
                new ReportDataSource("Dataset_informes", tblVentasDetalle));
            this.reportViewer1.LocalReport.SetParameters(parameters);
            this.reportViewer1.RefreshReport();
            this.WindowState = FormWindowState.Maximized;
        }
        private void btn_LimpiarFiltrosUrgencia_Click(object sender, EventArgs e)
        {
            cmbEstacion2.SelectedIndex = -1;
            cmbUrgencia2.SelectedIndex = -1;
            dtp_FechaDesde2.Value      = DateTime.Now;
            dtp_FechaHasta2.Value      = DateTime.Now;
            eligioFechaDesde           = false;
            eligioFechaHasta           = false;
            txtWhere.Text     = string.Empty;
            stringRestriccion = string.Empty;

            DataTable table = new DataTable();

            ObtenerListadoProdUrgencia();

            ReportParameter[] parametros = new ReportParameter[1];
            parametros[0] = new ReportParameter("restriccion", stringRestriccion);
            rv_productosUrgencia.LocalReport.SetParameters(parametros);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ReportParameter RankID        = new ReportParameter("RankID", Request.QueryString["RankID"] != "" ? Request.QueryString["RankID"].ToString() : null);
            ReportParameter JobCategoryID = new ReportParameter("JobCategoryID", Request.QueryString["JobCategoryID"] != "" ? Request.QueryString["JobCategoryID"].ToString() : null);

            string ReportName        = string.Empty;
            string strFileName       = string.Empty;
            ReportServicesMethod RSM = new ReportServicesMethod();

            if (!Page.IsPostBack)
            {
                ReportName  = "JobVacanciesByRankAndCategory";
                strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName, RankID, JobCategoryID);
                if (!string.IsNullOrEmpty(strFileName))
                {
                    Response.Redirect(strFileName);
                }
            }
        }
        public override ReportParameter[] GetReportParameters(string UserName)
        {
            ReportParameter[] param = new ReportParameter[4];
            param[0] = new ReportParameter("ReportHeader", "J.A.R.V.I.S. - Job Report");
            param[1] = new ReportParameter("DateRange", "Between " + FromDate.ToString("dd-MMM-yyyy") + " and " + ToDate.ToString("dd-MMM-yyyy"));
            param[2] = new ReportParameter("JobStatus", "Completed Jobs");
            string searchCriteria = "For " + UserName;

            if (CustomerName.Length > 0)
            {
                searchCriteria += ", " + CustomerName;
            }
            if (PrismNo.Length > 0)
            {
                searchCriteria += ", " + PrismNo;
            }
            param[3] = new ReportParameter("SearchFilter", searchCriteria);
            return(param);
        }
Exemplo n.º 46
0
        public frmReport(Project project)
        {
            InitializeComponent();

            if (project.IdNumber != 0)
            {
                paramValue      = ProjectServices.GetProjectNumber(project) + " (" + project.Date.ToString() + ") \r\n" + project.Description;
                inProject       = true;
                idProjectNumber = (int)project.IdNumber;
            }
            else
            {
                paramValue      = "Подбор оборудования\r\n" + project.Date.ToString();
                inProject       = false;
                idProjectNumber = (int)project.IdNumber;
            }

            prmProject = new ReportParameter("prmProject", paramValue);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string purid = Request.QueryString["purid"];
                if (purid != null)
                {
                    HFRptdtlId.Value = purid.ToString();
                }

                if (HFRptdtlId.Value != null)
                {
                    ReportViewer1.Visible = true;
                    ReportParameter p1 = new ReportParameter("purid");
                    this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { p1 });
                    this.ReportViewer1.LocalReport.Refresh();
                }
            }
        }
Exemplo n.º 48
0
        private void _Mtd_Busqueda()
        {
            string _Str_GrupoInc = "0";
            string _Str_Usuario  = "0";

            //------------------------------
            if (_Cmb_Grupo.SelectedIndex > 0)
            {
                _Str_GrupoInc = Convert.ToString(_Cmb_Grupo.SelectedValue).Trim();
            }
            //------------------------------
            if (_Cmb_User.SelectedIndex > 0)
            {
                _Str_Usuario = Convert.ToString(_Cmb_User.SelectedValue).Trim();
            }
            //------------------------------
            string[] _Str_Valores = _Mtd_ExtraerMesAno(_Cmb_Mes.SelectedValue.ToString());
            //------------------------------
            if (_Rb_Dev.Checked)
            {
                _Rpt_Report.ServerReport.ReportPath = CLASES._Cls_Conexion._Str_ReportPath + "Rpt_Inf_IncVarios_Dev";
            }
            else if (_Rb_Efec.Checked)
            {
                _Rpt_Report.ServerReport.ReportPath = CLASES._Cls_Conexion._Str_ReportPath + "Rpt_Inf_IncVarios_Efec";
            }
            else
            {
                _Rpt_Report.ServerReport.ReportPath = CLASES._Cls_Conexion._Str_ReportPath + "Rpt_Inf_IncVarios_Act";
            }
            _Rpt_Report.ServerReport.ReportServerUrl = new Uri(CLASES._Cls_Conexion._Str_ReportServerUrl);
            ReportParameter[] parm = new ReportParameter[7];
            parm[0] = new ReportParameter("CCOMPANY", Frm_Padre._Str_Comp);
            parm[1] = new ReportParameter("CIDGRUPOINCENTIVAR", _Str_GrupoInc);
            parm[2] = new ReportParameter("CMONTACCO", _Str_Valores[0]);
            parm[3] = new ReportParameter("CYEARACCO", _Str_Valores[1]);
            parm[4] = new ReportParameter("CUSER", _Str_Usuario);
            parm[5] = new ReportParameter("CNOMBEMP", CLASES._Cls_Varios_Metodos._Mtd_NombComp(Frm_Padre._Str_Comp));
            parm[6] = new ReportParameter("CTIPOGENERACION", Convert.ToString(_Cmb_Generacion.SelectedValue).Trim());
            _Rpt_Report.ServerReport.SetParameters(parm);
            _Rpt_Report.ServerReport.Refresh();
            _Rpt_Report.RefreshReport();
        }
    protected void btnViewreport_Click(object sender, EventArgs e)
    {
        string vardate;

        string siteid;

        siteid = drpsite.SelectedValue;
        ReportParameter[] Param = new ReportParameter[1];

        Param[0] = new ReportParameter("siteid", siteid);
        ReportViewer1.Attributes.Add("style", "overflow:auto;");
        ReportViewer1.ShowCredentialPrompts = false;
        ReportViewer1.ServerReport.ReportServerCredentials = new ReportClass.ReportCredentials(ConfigurationSettings.AppSettings["Credentials"].ToString().Split('\\')[0], ConfigurationSettings.AppSettings["Credentials"].ToString().Split('\\')[1], "");
        ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
        ReportViewer1.ServerReport.ReportServerUrl = new System.Uri(ConfigurationSettings.AppSettings["ReportServerURL"].ToString());
        ReportViewer1.ServerReport.ReportPath      = "/TerexBESTREPORT/Pendingcallreport";
        ReportViewer1.ServerReport.SetParameters(Param);
        ReportViewer1.ServerReport.Refresh();
    }
        private void ALlProductInSystem_Load(object sender, EventArgs e)
        {
            CopInf = ReportObj.LisSelectCompanyInfo();

            reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("CompanyInfo", CopInf));
            Logo = CopInf.Rows[0][8].ToString();

            AllProduct = ReportObj.SelectAllProduct();

            reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("AllProduct", AllProduct));


            reportViewer1.LocalReport.DisplayName            = "تقرير بالمنتجات المضافة بالنظام ";
            reportViewer1.LocalReport.ReportEmbeddedResource = "ITI_Project.Reports.Product.AllProduct.rdlc";
            ReportParameter parameter = new ReportParameter("Logo", Logo);

            this.reportViewer1.LocalReport.SetParameters(parameter);
            this.reportViewer1.RefreshReport();
        }
Exemplo n.º 51
0
        private void btn_buscar_Click(object sender, EventArgs e)
        {
            DataTable tabla = new DataTable();

            tabla = producto.BuscarProductoXprecio(txt_pracioMin.Text, txt_precioMax.Text);


            ReportDataSource Datos = new ReportDataSource("DataSet1", tabla);

            RVproductoXprecio.LocalReport.ReportEmbeddedResource = "TuLuz.Forums.Reportes.Productos_rango_precios.Report1.rdlc";
            ReportParameter[] parametros = new ReportParameter[3];
            parametros[0] = new ReportParameter("RP01", " Precio Minimo: " + txt_pracioMin.Text);
            parametros[1] = new ReportParameter("RP02", " Precio Maximo: " + txt_precioMax.Text);
            parametros[2] = new ReportParameter("RP03", "Fecha: " + DateTime.Today.Day.ToString() + "/" + DateTime.Today.Month.ToString() + "/" + DateTime.Today.Year.ToString());
            RVproductoXprecio.LocalReport.DataSources.Clear();
            RVproductoXprecio.LocalReport.SetParameters(parametros);
            RVproductoXprecio.LocalReport.DataSources.Add(Datos);
            RVproductoXprecio.RefreshReport();
        }
        private void btnLimpiarFiltros_Click(object sender, EventArgs e)
        {
            cmbSolicitante.SelectedIndex = -1;
            cmbResponsable.SelectedIndex = -1;
            dtpDesde.Value    = DateTime.Now;
            dtpHasta.Value    = DateTime.Now;
            eligioFechaDesde  = false;
            eligioFechaHasta  = false;
            txtWhere.Text     = string.Empty;
            stringRestriccion = string.Empty;

            DataTable table = new DataTable();

            ObtenerListado();

            ReportParameter[] parametros = new ReportParameter[1];
            parametros[0] = new ReportParameter("restriccion", stringRestriccion);
            rv_ListadoGeneral.LocalReport.SetParameters(parametros);
        }
Exemplo n.º 53
0
        private void repoInv_Load(object sender, EventArgs e)
        {
            this.DataTableActivoTableAdapter.Fill(this.DataSetActivo.DataTableActivo);



            this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", this.DataSetActivo.sucursal.DefaultView));
            this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", this.DataSetActivo.DataTableActivo.DefaultView));
            this.reportViewer3.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", this.DataSetActivo.DataTableActivo.DefaultView));
            ReportParameter p1 = new ReportParameter("sucursal", "002");

            this.reportViewer1.LocalReport.SetParameters(p1);
            this.reportViewer1.RefreshReport();
            this.reportViewer2.RefreshReport();

            // TODO: esta línea de código carga datos en la tabla 'DataSetActivo.DataTableActivo' Puede moverla o quitarla según sea necesario.

            this.reportViewer3.RefreshReport();
        }
Exemplo n.º 54
0
        public string ManutencaoPreventivaNumPreventivaObra(int CoObraGrupoLista, string cmpDtInicial, string cmpDtFinal, string NomeObra)
        {
            string nomeRelatorio = @"/HzManutencao/Relatorios/spRelatorioManutencaoPreventivaObra";
            //string dataIn = cmpDtInicial.Year + @"-" + cmpDtInicial.Month + @"-" + cmpDtInicial.Day;
            //string dataFim = cmpDtFinal.Year + @"-" + cmpDtFinal.Month + @"-" + cmpDtFinal.Day;

            DateTime dataIn  = DateTime.Parse(cmpDtInicial + " 00:00:00", CultureInfo.CurrentCulture);
            DateTime dataFim = DateTime.Parse(cmpDtFinal + " 00:00:00", CultureInfo.CurrentCulture);

            ReportParameter[] parameters = new ReportParameter[4];
            parameters[0] = new ReportParameter("CoObraGrupoLista", CoObraGrupoLista.ToString());
            parameters[1] = new ReportParameter("PeriodoInicial", dataIn.ToShortDateString());
            parameters[2] = new ReportParameter("PeriodoFinal", dataFim.ToShortDateString());
            parameters[3] = new ReportParameter("NomeObra", NomeObra);

            clExportarRelatorio ex = new clExportarRelatorio();

            return(ex.ExportarRelatorio(nomeRelatorio, clExportarRelatorio.enTipoRelatorio.PDF, parameters));
        }
Exemplo n.º 55
0
        public void PrintReport()
        {
            ReportParameter[] param = new ReportParameter[1];
            param[0] = new ReportParameter("show_item", "true");
            RViewer.LocalReport.SetParameters(param);
            RViewer.LocalReport.Refresh();
            RViewer.RefreshReport();

            PageSettings ps = new PageSettings();

            ps.Margins.Top       = 25;
            ps.Margins.Bottom    = 25;
            ps.Margins.Left      = 25;
            ps.Margins.Right     = 25;
            ps.Landscape         = false;
            ps.PaperSize.RawKind = (int)PaperKind.Custom;
            ps.PaperSize         = new PaperSize("User-Defined", 425, 550);
            RViewer.SetPageSettings(ps);
        }
Exemplo n.º 56
0
    protected void OnButtonCommand(object sender, CommandEventArgs e)
    {
        //Event handler for command button clicked
        try {
            //Change view to Viewer and reset to clear existing data
            Master.Viewer.Reset();

            //Get parameters for the query
            string _ofddate = DateTime.Parse(this.txtDate.Text).ToString("yyyy-MM-dd");

            //Initialize control values
            LocalReport report = Master.Viewer.LocalReport;
            report.DisplayName          = REPORT_NAME;
            report.EnableExternalImages = true;
            EnterpriseService enterprise = new EnterpriseService();
            DataSet           ds         = enterprise.FillDataset(USP_REPORT, TBL_REPORT, new object[] { _ofddate });
            if (ds.Tables[TBL_REPORT].Rows.Count >= 0)
            {
                switch (e.CommandName)
                {
                case "Run":
                    //Set local report and data source
                    System.IO.Stream stream = Master.GetReportDefinition(REPORT_SRC);
                    report.LoadReportDefinition(stream);
                    report.DataSources.Clear();
                    report.DataSources.Add(new ReportDataSource(REPORT_DS, ds.Tables[TBL_REPORT]));

                    //Set the report parameters for the report
                    ReportParameter rdddate = new ReportParameter("RequestedDeliveryDate", _ofddate);
                    report.SetParameters(new ReportParameter[] { rdddate });

                    //Update report rendering with new data
                    report.Refresh();
                    break;
                }
            }
            else
            {
                Master.ShowMessageBox("There were no records found.");
            }
        }
        catch (Exception ex) { Master.ReportError(ex, 3); }
    }
Exemplo n.º 57
0
 private void CargarInforme(DataTable tabla)
 {
     if (tabla.Rows.Count == 0)
     {
     }
     else
     {
         Be_BaseDatos     _BD   = new Be_BaseDatos();
         ReportDataSource Datos = new ReportDataSource("DataSet1", tabla);
         rv_pedido_fechas_y_precio.LocalReport.ReportEmbeddedResource = "TuLuz.Forums.Estadisticas.ComprasXValor_EntreFechas.RpComprasXValor_EntreFechasrdlc.rdlc";
         ReportParameter[] parametros = new ReportParameter[2];
         parametros[0] = new ReportParameter("RP01", Precio_Min.Text);
         parametros[1] = new ReportParameter("RP02", "Fecha: " + DateTime.Today.Day.ToString() + "/" + DateTime.Today.Month.ToString() + "/" + DateTime.Today.Year.ToString());
         rv_pedido_fechas_y_precio.LocalReport.DataSources.Clear();
         rv_pedido_fechas_y_precio.LocalReport.SetParameters(parametros);
         rv_pedido_fechas_y_precio.LocalReport.DataSources.Add(Datos);
         rv_pedido_fechas_y_precio.RefreshReport();
     }
 }
 private void Visor_Reporte_Expedientes_Nombre_Load(object sender, EventArgs e)
 {
     try
     {
         // TODO: esta línea de código carga datos en la tabla 'SICDataSet1.DataTable1' Puede moverla o quitarla según sea necesario.
         this.DataTable1TableAdapter.Fill(this.SICDataSet1.DataTable1);
         ReportParameter[] parameters = new ReportParameter[4];
         parameters[0] = new ReportParameter("Usuario", Usuario.ToString());
         parameters[1] = new ReportParameter("Nombre", Nombre.ToString());
         parameters[2] = new ReportParameter("Apellido1", Apellido1.ToString());
         parameters[3] = new ReportParameter("Apellido2", Apellido2.ToString());
         reportViewer1.LocalReport.SetParameters(parameters);
         this.reportViewer1.RefreshReport();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 59
0
        public override void GenerateReport()
        {
            string strCondi;

            strCondi = "單據日期:" +
                       FBeginDate.ToShortDateString() + "~" +
                       FEndDate.ToShortDateString();
            //載入資料
            this.ReceiptRankTableAdapter.Fill(this.XINDataSet.ReceiptRank,
                                              FBeginDate, FEndDate);
            //建立報表參數
            ReportParameter ReportCondi = new ReportParameter();

            ReportCondi.Name = "ReportCondi";
            ReportCondi.Values.Add(strCondi);
            //將報表參數反映到報表底稿上的報表參數
            this.reportViewerBase.LocalReport.SetParameters(
                new ReportParameter[] { ReportCondi });
        }
        private ReportViewer LoadReport_DailyAttendanceSummary(List <VAT_DailyAttendance> attdata, ReportViewer rv)
        {
            List <VMDailyAttSummary> attDailySummayList = AttReportingService.GetConvertedDailyAttSummary(attdata);

            rv.LocalReport.ReportPath = Server.MapPath(ReportPath);
            IEnumerable <VMDailyAttSummary> ie;

            ie = attDailySummayList.AsQueryable();
            ReportDataSource datasource1 = new ReportDataSource("DataSet1", ie);

            rv.LocalReport.DataSources.Add(datasource1);
            ReportParameter rp  = new ReportParameter("Date", DateTitle, false);
            ReportParameter rp1 = new ReportParameter("Header", CompanyHeader + ReportTitle, false);
            ReportParameter rp2 = new ReportParameter("Footer", ReportFooter, false);

            rv.LocalReport.SetParameters(new ReportParameter[] { rp, rp1, rp2 });
            rv.LocalReport.Refresh();
            return(rv);
        }