Xtrareport数据绑定格式字符串,“对象引用未设置为对象的实例”devexpress 12.2.7

时间:2015-03-07 04:14:56

标签: winforms devexpress xtrareport

我想在Xtrareport中显示千位分隔符,这段代码在DevXpress ver 14中完美运行,但在版本12.2.7中,它出错:

An unhandled exception of type 'System.NullReferenceException' occurred in Kho3.exe
Additional information: Object reference not set to an instance of an object.

我的代码:

private void xxSL_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
            {
               xxSL.DataBindings["Text"].FormatString = "{0:N0}";
            }

如何解决?

1 个答案:

答案 0 :(得分:0)

DevExpress 12.2.x XRLable没有DataBindings [" Text"]。所以我无法使用它,因为任何人都会像我这样遇到这个问题

相关问题