DataSet and Table Adapter in VS
Hi,
I have DataSet in VS and TableAdapter, where I assign some custom values to the table adapter at the run time.
my question is, How can I assign the Table Adapter to Fast Report, or how can I reflect the change in the Dataset to Fast Report? To explain more here is code example:
this.callhistory3TableAdapter.ClearBeforeFill = true; //Just prepare the table adapter
this.callhistory3TableAdapter.FillCallLog((this.phonesystemDataSet.callhistory3),prmDateFrom,prmDateTo,callFromOutSide); // set some filters to the table
report1.Load("calllogs.frx"); //load the report
report1.RegisterData(this.phonesystemDataSet"); //Register the Dataset|| Shall I register the Dataset or the Tableadapter
report1.Show();
Can you guid me to how to reflect the filter in the tableadapter to send it to the report as well.
Thanks,
John,
I have DataSet in VS and TableAdapter, where I assign some custom values to the table adapter at the run time.
my question is, How can I assign the Table Adapter to Fast Report, or how can I reflect the change in the Dataset to Fast Report? To explain more here is code example:
this.callhistory3TableAdapter.ClearBeforeFill = true; //Just prepare the table adapter
this.callhistory3TableAdapter.FillCallLog((this.phonesystemDataSet.callhistory3),prmDateFrom,prmDateTo,callFromOutSide); // set some filters to the table
report1.Load("calllogs.frx"); //load the report
report1.RegisterData(this.phonesystemDataSet"); //Register the Dataset|| Shall I register the Dataset or the Tableadapter
report1.Show();
Can you guid me to how to reflect the filter in the tableadapter to send it to the report as well.
Thanks,
John,
Comments
Just register either the dataset or its table (if you don't want entire dataset). FastReport will use the actual table data.
or
Thanks for your reply, I used the way you mentioned, but still the report displays all the record from the dataset, and ignores the filter I add through the tableadapter.
I use this code:
report1.Load("calllogs.frx");
report1.RegisterData(this.phonesystemDataSet);
this.callhistory3TableAdapter.ClearBeforeFill = true;
this.callhistory3TableAdapter.FillCallLog((this.phonesystemDataSet.callhistory3)
,prmDateFrom,prmDateTo,callFromOutSide); //Filter some data here
report1.Show();
The problem that the filter is not sent as well to Fast Report as I can see, or I'm missing something??
Thanks,