Crystal Report Does Not See Filter in Typed DataSet/DataTable in WinForms

I am using VB.NET 2005 WinForms.  I set a Filter on a Typed DataSet / DataTable, but when I set the Crystal Report to use this DataSet, the report seems to ignore the Filter.

I confirm that the Filter does work by setting a breakpoint on the following statement:
Me.txtResultCnt.Text =   clsOrgLookup.gDsOrgLookup.dt_spOrgLookupResults.DefaultView.Count

I set the Report DataSource like this:
rptMyReport.SetDataSource(clsOrgLookup.gDsOrgLookup)

Any thoughts as to why the report prints all the rows in the DataTable, and not only the Filtered rows ?   Thank you.
cgaDesignAsked:
Who is Participating?
 
cgaDesignAuthor Commented:
I have not received information with which I can solve my problem, and there is also an issue with versions of CR.  I will give up on this for now. Thanks.
0
 
WikkardCommented:
Have you tried to apply selection criteria within the report rather than in the dataset ?
OR
Have you tried filtering the dataset when you fill it. ie at database ?

0
 
cgaDesignAuthor Commented:
I fill the dataset in another screen, and display in a a DGV, having a Tag field
Then the user selects, via Tags, only the rows to print.
I then filter the DataSet/DataTable according to the Tag fields that are True.
   Using clsOrgLookup.gDsOrgLookup.dt_spOrgLookupResults.DefaultView.RowFilter = "Tag = 1"

Thank you.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
WikkardCommented:
Could you create a new datatable with just the row you need (from the main ds) and pass that to the report ?

Its a hack I know =p
0
 
mlmccCommented:
Does the report have saved data?
If so it will ignore the filter and display the data that is saved

mlmcc
0
 
cgaDesignAuthor Commented:
mlmcc,
CrystalReports having saved data, unless I am missing something, is a new concept for me;  can you explain the essence of that, or provide a tutorial link?  Thanks.
0
 
mlmccCommented:
Crystal by default saves the data with the report when you save it.  You can turn the default off through the FILE --> OPTIONS.

If data is saved with the report then the report opens with that data and isn't changed unti you refresh the report through the F5 or refresh icon.

mlmcc
0
 
cgaDesignAuthor Commented:
2 things ...
1. I have Crystal Reports for VS 2005.  It does not have any FILE / OPTIONS menu.  I only get at Crystal through VS 2005.  Lots of others have this issue as well.  I have looked for other menu settings that seem to address a data save, and found one possible, but no change.

2. The report does print what is in the DataTable ... and the user changes that each time they do a search that I have provided for them.  The only problem is that I later filter this table, and the report seems to ignore the filter.  I even tried a Refresh property.

Thanks for your suggestions.
Steve


0
 
mlmccCommented:
I dont hav ethe VS versions so I am not sure where that property is.  I know it is there.  Is there a REPORT OPTIONS?

mlmcc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.