コード例 #1
0
        private void reportViewerFuncionarioEmpresa_Load(object sender, EventArgs e)
        {
            service = new FuncionarioService(context);

            var resposta = service.GetRelatorioFuncEmpresa(CNPJ);

            var dataSource = new Microsoft.Reporting.WinForms.ReportDataSource("DataSetFuncionarioEmpresa", resposta);

            this.reportViewerFuncionarioEmpresa.LocalReport.DataSources.Clear();
            this.reportViewerFuncionarioEmpresa.LocalReport.DataSources.Add(dataSource);

            this.reportViewerFuncionarioEmpresa.RefreshReport();
        }