45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Data;
|
|||
|
using System.Drawing;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Windows.Forms;
|
|||
|
using Microsoft.Reporting.WinForms;
|
|||
|
|
|||
|
namespace Payroll.Report.Attendence.UI
|
|||
|
{
|
|||
|
public partial class fAttendanceReportViewer : Form
|
|||
|
{
|
|||
|
public fAttendanceReportViewer()
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
}
|
|||
|
|
|||
|
public void ShowReport(string reportDataSourceName, DataTable dataSourceValue, string rdlcPath, List<ReportParameter> parameters)
|
|||
|
{
|
|||
|
attnReportViewer.Refresh();
|
|||
|
attnReportViewer.LocalReport.DataSources.Clear();
|
|||
|
|
|||
|
try
|
|||
|
{
|
|||
|
attnReportViewer.LocalReport.DataSources.Add(new ReportDataSource(reportDataSourceName, dataSourceValue));
|
|||
|
|
|||
|
attnReportViewer.LocalReport.ReportEmbeddedResource = rdlcPath;
|
|||
|
attnReportViewer.LocalReport.SetParameters(parameters);
|
|||
|
|
|||
|
this.attnReportViewer.RefreshReport();
|
|||
|
|
|||
|
this.Show();
|
|||
|
|
|||
|
//this.Focus();
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
throw new Exception(ex.Message, ex);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|