Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple Reports using filters
Message
From
12/09/2006 16:25:04
 
 
To
12/09/2006 15:06:07
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
VB 8.0
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01153132
Message ID:
01153148
Views:
14
Hi, Erik,

As you've discovered, you can't pass a DataView to Crystal Reports.

However, in VS2005, you can do the following, to filter your datatable and pass a subset datatable to Crystal:
dtMySourceTable.DefaultView.RowFilter = "User = 'Erik'";
DataTable dtMyFilteredTable = dtMySourceTable.DefaultView.ToTable("MyFilteredTableName");
And then push dtMyFilteredTable into Crystal.

The new ToTable() method in ADO.NET 2.0 is very powerful - check out the overloads for it, it allows you to do the equivalent of SELECT DISTINCT on rows.

Let me know if that helps, or if you need anything more.

Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform