private void FormFileAidRptLinkedFiles_Load(object sender, EventArgs e) { BindingList <LinkedFilesItem> myFiles = new BindingList <LinkedFilesItem>(); foreach (ListViewItem item in reportItems) { LinkedFilesItem file = new LinkedFilesItem(); file.Filename = item.SubItems[0].Text; file.Extension = item.SubItems[1].Text; file.Path = item.SubItems[2].Text; file.Size = item.SubItems[3].Text; file.DateModified = item.SubItems[4].Text; file.Inactive = item.SubItems[5].Text; myFiles.Add(file); } LinkedFilesContextBindingSource.DataSource = context; LinkedFilesItemBindingSource.DataSource = myFiles; this.reportViewer1.RefreshReport(); }
private void FormFileAidRptReminderDetails_Load(object sender, EventArgs e) { BindingList <LinkedFilesItem> myFiles = new BindingList <LinkedFilesItem>(); foreach (ListViewItem item in reportItems) { // Using LinkedFilesItem because Report Wizard has problem with ReminderDetailsItem LinkedFilesItem file = new LinkedFilesItem(); file.Filename = item.SubItems[0].Text; file.Extension = item.SubItems[1].Text; file.Path = item.SubItems[2].Text; file.Size = item.SubItems[3].Text; file.DateModified = item.SubItems[4].Text; file.Inactive = item.SubItems[5].Text; myFiles.Add(file); } // binding contexts ReminderContextBindingSource.DataSource = context; LinkedFilesItemBindingSource.DataSource = myFiles; this.reportViewer1.RefreshReport(); }