示例#1
0
        /// <summary>
        /// Dohvaća podatke o prijemnicama i popunjava report
        /// </summary>
        private void dohvatiPrijamnice()
        {
            Microsoft.Reporting.WinForms.ReportDataSource reportDS1 = new Microsoft.Reporting.WinForms.ReportDataSource();
            Microsoft.Reporting.WinForms.ReportDataSource reportDS2 = new Microsoft.Reporting.WinForms.ReportDataSource();

            reportDS1.Name = "dsPrijamnica";
            reportDS2.Name = "dsPrijamnicaStavke";
            List <PregledPrijamniceStavke> listaStavki     = PregledPrijamniceStavke.DohvatiStavkeDokumenta(pID);
            List <PregledPrijamnice>       listaPrijamnica = PregledPrijamnice.DohvatiPrijamnicuPremaID(pID);

            bwLoadReport.ReportProgress(37);
            System.Threading.Thread.Sleep(500);
            reportDS1.Value = listaPrijamnica;
            reportDS2.Value = listaStavki;
            this.report.LocalReport.DataSources.Add(reportDS1);
            this.report.LocalReport.DataSources.Add(reportDS2);
            bwLoadReport.ReportProgress(80);
            System.Threading.Thread.Sleep(500);
            this.report.LocalReport.ReportEmbeddedResource = "Skladiste_PI.Izvjestaji.Prijamnice.rdlc";
        }
        public void DohvatiPrijamnicu()
        {
            List <PregledPrijamnice> listaOtpremnice = PregledPrijamnice.DohvatiOtpremnicu();

            DGVPrijamnice.DataSource = listaOtpremnice;
        }