示例#1
0
        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {
            Model.Album    da = new Model.Album();
            ReportDocument rc = new ReportDocument();

            rc.FileName = "albums.rpt";
            rc.SetDataSource(da.getQuery());
            crystalReportViewer1.ReportSource = rc;
        }
示例#2
0
        private void AlbumsReport_Load(object sender, EventArgs e)
        {
            ReportDocument rd = new ReportDocument();

            rd.Load(@"E:\Programming\Windows Programming\C#\AzDBStructure\AzDBStructure\albums\Albums.rpt");

            Model.Album ma = new Model.Album();

            rd.SetDataSource(ma.getQuery());

            crystalReportViewer1.ReportSource = rd;
            crystalReportViewer1.Refresh();
        }