cancel
Showing results for 
Search instead for 
Did you mean: 

Nullable Types in .NET Objects

Former Member
0 Kudos

Hello!

I want to produce a report using an arraylist of .net objects as datasource. For this I defined a public class in my project having some properties. Now my question is: Is it possible to use nullable types as types for the properties? E.g. is it possible to use "int?" or "long?" as type for a property?

If not, is it planned to support nullable types in the next release of crystal reports?

Thank you for your help!

Best Regards,

Joachim Lukasser

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

I don't know. Have you attempted this at all? If so, did you get errors or other issues?

I'd also recommend looking at the CHM file for the CR SDK. As you have not given me the version of CR you are working with I'm guessing either CR XI r2:

C:\Program Files\Business Objects\Crystal Reports 11.5\Help\en\crsdk_net_doc\doc\crsdk_net_doc.chm

Or CR 2008:

http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_dg_12_en.chm

Search for "Connecting to Object Collections"

Ludek

Former Member
0 Kudos

If I use the following class as data objects for a report, the only field I can see in the database fields is Name, which is of type string. All other types are not listed there and hence I cannot use them for my report. Am I wrong?

namespace NullableTypeTest {
    public class Data {

        private int? _number;
        public int? Number {
            get { return _number; }
            set { _number = value; }
        }

        private decimal? _money;
        public decimal? Money {
            get { return _money; }
            set { _money = value; }
        }

        private string _name;
        public string Name {
            get { return _name; }
            set {
                _name = value;
            }
        }

        private long? _id;
        public long? ID {
            get { return _id; }
            set { _id = value; }
        }

        private DateTime? _date;
        public DateTime? Date {
            get { return _date; }
            set { _date = value; }
        }

    }
}

I'm using Crystal Reports 2008 version 12.1.0.892. Sorry for missing this information.

For me the usage of nullabe types is mission critic! Therefore I want to ask if this szenario would be possible in the next release of Crystal Reports.

Thanks again for any help!

Best Regards

Joachim Lukasser

Edited by: jlukasser on Jul 22, 2009 1:36 PM

former_member183750
Active Contributor
0 Kudos

I'll enter this as an enhancement request for R&D.

Ludek

former_member183750
Active Contributor
0 Kudos

This has been entered as an enhancement for next version of Crystal Reports, tracking number ADAPT01275681.

Please note that this does not guarantee that the feature will be implemented.

Ludek

Former Member
0 Kudos

Thank you very much!

Do you know when the next release becomes available?

Best Regards,

Joachim Lukasser

Former Member
0 Kudos

May i know whether the problems by nullable items in .net object is solved  or not in crystal reports version 13.0.2000.0.   Because i am still getting the same error.

Lalu Augustine

0 Kudos

We no longer track Enhancement Requests in Adapt, add your request to Idea Place.

Inovation link at the top of this page.

Don

Answers (0)