Exemplo n.º 1
0
        protected void uiLinkButtonSummary_Click(object sender, EventArgs e)
        {
            TicketInfo tickets = new TicketInfo();
            DateTime from, to;
            from = DateTime.TryParseExact(uiTextBoxFromDate.Text, "MM/dd/yyyy", null, System.Globalization.DateTimeStyles.None, out from) ? from : new DateTime(1900, 1, 1);
            to = DateTime.TryParseExact(uiTextBoxToDate.Text, "MM/dd/yyyy", null, System.Globalization.DateTimeStyles.None, out to) ? to : new DateTime(8000, 12, 31);

            tickets.RPT_Summary(from, to);

            uiReportViewerMain.Reset();
            uiReportViewerMain.LocalReport.ReportPath = "ReportsFiles/summary.rdlc";
            uiReportViewerMain.LocalReport.DataSources.Clear();
            uiReportViewerMain.LocalReport.DataSources.Add(new ReportDataSource("SummaryDataSet", tickets.DefaultView));
            uiReportViewerMain.LocalReport.Refresh();
        }