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,

Comments

  • edited 9:53AM
    Hello,

    Just register either the dataset or its table (if you don't want entire dataset). FastReport will use the actual table data.
    this.callhistory3TableAdapter.ClearBeforeFill = true;
    this.callhistory3TableAdapter.FillCallLog((this.phonesystemDataSet.callhistory3)
    ,prmDateFrom,prmDateTo,callFromOutSide);
    
    report1.Load("calllogs.frx");
    report1.RegisterData(this.phonesystemDataSet);
    report1.Show();
    

    or
    report1.Load("calllogs.frx");
    report1.RegisterData(this.phonesystemDataSet);
    
    this.callhistory3TableAdapter.ClearBeforeFill = true;
    this.callhistory3TableAdapter.FillCallLog((this.phonesystemDataSet.callhistory3)
    ,prmDateFrom,prmDateTo,callFromOutSide);
    
    report1.Show();
    
  • edited 9:53AM
    Hi,

    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,
  • edited 9:53AM
    FastReport just uses all rows in the DataTable. How do you apply the filter?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.