on 09-29-2008 9:08 PM
I am 99% certain the problem below is correct, however it would be nice if someone at SAP/BusinessObjects/CrystalReports would confirm it.
PROBLEM: If you call SetDataSource() with an IEnumerable<T>, the Crystal Reports engine wants to convert it into a DataSet. However if there are any Nullable<T> parameters on any objects it fails with the error message below. A Link.Table is different from a DataTable in that it supports Nullable types.
QUESTION: Is there a "best practice" workaround for this? Is this going to be addressed in an upcoming release?
DataSet does not support System.Nullable<>.
Edited by: Chris Marsh on Sep 29, 2008 10:08 PM
SetDataSource is designed to take a DataSet or DataTable object. I think someone mentioned to me that they managed to get an array object of some sort to work. As far as I know, no other objects (enumerations, lists, entities, tables that are not of type System.Data.DataTable, etc) are supported or have been hacked into working at this point. I don't know if/when this is planned for a future release.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SetDataSource() has 5 overloads each have one parameter:
DataSet
DataTable
IDataReader
IEnumerable
object
So, while a method is available to pass an IEnumerable, any object passed that does not convert to a DataSet will result in an error being thrown.
Bottom line is that until SetDataSource is re-written to work without converting to a DataSet, LINQ will only be supported as long as there are no nullable Foreign Keys or Columns.
Mark me down as one that STRONGLY wishes this be addressed as soon as possible in the next possible release of CR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.