none
Refresh dataset not working with reportviewer RRS feed

  • Question

  • i am using EF in the winforms app. i did not want to write custom business objects, so i used dataset for reportviewer control only. the problem is that when the data is changed by EF, the dataset is not refreshed - the report shows stale data till i close and restart the app. i have already tried:  TableAdapter.ClearBeforeFill = True and DataSet.Clear() before Fill and RefreshReport, but it makes no difference.
    Monday, January 3, 2011 4:32 PM

Answers

  • Alan: not sure i understand your question, but i will attempt to answer. the dataset is populated by tableadapter. the database is NOT updated by dataset. dataset is only used for reportviewer. the database is updated using EF databinding to other controls (example: datagridview). now, when database is updated, i need to refresh the dataset so that the reportviewer can display latest data.

    currently, i ended up putting the reports in a separate application to get around this issue.

     

    thanks!

    Thursday, January 6, 2011 7:54 PM

All replies

  • Hi tx1000,

    Welcome to MSDN forums.

    Would I know how to get entities to your dataset? Thanks.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, January 6, 2011 8:38 AM
    Moderator
  • Alan: not sure i understand your question, but i will attempt to answer. the dataset is populated by tableadapter. the database is NOT updated by dataset. dataset is only used for reportviewer. the database is updated using EF databinding to other controls (example: datagridview). now, when database is updated, i need to refresh the dataset so that the reportviewer can display latest data.

    currently, i ended up putting the reports in a separate application to get around this issue.

     

    thanks!

    Thursday, January 6, 2011 7:54 PM