Passing a dataSet to a dialog

  • Thread starter Thread starter Walt White
  • Start date Start date
W

Walt White

How do I pass a dataSet created on one form (frmShowGrid) to another form
using C#. The second form (frmSchedule) to is being invoked via
frmSchedule.ShowDialog() if that matters. Basically I have a dataGrid on the
first form and I want to display that same data in a Crystal Report on the
second form. When the report is diplayed it shows the field column names but
no data.

I have tried the folowing which doesn't work:

crReportDocument.SetDataSource(((frmShowGrid)this.ParentForm).dsHRTrack);

..Thanks in advance,

Walt
 
Hi Walt,

Why don't you assign dataset to crReportDocument within frmShowGrid before
ShowUpdate?
 
Miha,

Thanks for the help. I'd like to say that I have good reason for not
originally doing as you suggested but I don't! It works perfectly. Initially
it didn't work when I assigned the dataset however, if I assign the table
within the dataset it works as expected.

Thanks again,

Walt
 
Back
Top