Expressions on Designer control

Hi All,


The expression [Format ("{0: yyMMdd}", [Date])] or any other expression in a text object does not work in the designer control in VB.net 2017.

When I preview the report I get the error "the object reference was not defined as an instance of an object".

I've tried it in a designer and it works.


Does anyone have a suggestion?

Thanks in advance.


Best regards

Comments

  • Hello!

    The Report instance you opened in DesignerControl does not have a data source or the [Date] parameter registered/enabled (in the standalone designer, you likely opened a .frx file with test data or a connection, and in the VB.NET code, you called Designer before RegisterData + Enabled = true, or passed DBNull or null to Date).

    Make sure the FastReport .NET package is installed in the project, or that FastReport.dll, FastReport.Compat.dll, and the latest libraries are present, and that a valid DateTime is passed to the TextObject (with a check for null / DBNull if the field can be empty).

This discussion has been closed.