Page 1 of 1

Issue with Nullable in dataset

Posted: Wed Aug 28, 2013 6:11 pm
by jmgardn2
Hello,
I current set the data source for a report using the regdata function (by providing a dataset variable). There is a column that has decimals, but can also be blank (nulls). When I try to set the column type as double (nullable) I get the error that

Code: Select all

DataSet does not support System.Nullable<>.
If I set it as just double I get

Code: Select all

Input string was not in a correct format.Couldn't store <> in xxxxxxx Column.  Expected type is Double.
Should I be doing something when adding the dataset in addition to just RegData or is there a different approach I should be taking? Thank you very much for your help!

Re: Issue with Nullable in dataset

Posted: Thu Aug 29, 2013 12:11 pm
by HighAley
Hello.

We have some questions that we need to get answers before we could suggest a solution.
How do you register data?
How and when do you set the column type?
When do you get error about incorrect format?
Could you provide us any other useful information?

Thank you.

Re: Issue with Nullable in dataset

Posted: Thu Aug 29, 2013 12:45 pm
by jmgardn2
Please see below for additional information:

How do you register data?
I have an XML string that I load using the following code:

Code: Select all

DataSet reportDS = new DataSet();
reportDS.ReadXml(xmlString);
stiReport.RegData(reportDS);
[/color]
How and when do you set the column type?
I attempt to set the column type in the designer after the data has been loaded. Because of how dynamic the loading of data can be, setting it within the code is not an option.
When do you get error about incorrect format?
When I attempt to preview the report in the designer.
Could you provide us any other useful information?
I'm not sure what other information I would be able to provide, but if you have any other specific questions I will attempt to answer them.

Thank you very much for your help!

Re: Issue with Nullable in dataset

Posted: Thu Aug 29, 2013 1:11 pm
by HighAley
Hello.

Nevertheless we need to reproduce your issue.
Please, send us a sample project with text xml data to reproduce your issue.

Thank you.