Error in Expression

Hey all, I'm new to FastReports and am self taught, coming off of Crystal.


I've built out a couple reports, and I'm able to test them outside of the application, but when I come into the application and go to Preview a Report, I'm getting an error:

I think that's probably because there's an error in an expression in the text object called Text2, and it doesn't like something about the Prefix field from one of my Data Sources called "Data" but I can't find any reason why that would be a problem. I'm sure it's probably some small setting I am unaware of, but I just don't know what that would be. The field is in the Report Title section of the report, and when I remove it, the error changes to the next text object that appears in the next section.


Thanks again in advance!

Comments

  • Hi guywillis!

    Today I had your same problem (while coding a program in C#) and I found your question looking for answers.

    After a lot of trial and error I managed to solve it.


    The error appears if "Data" is null, it tries to get the Prefix field but it cannot.


    In my case the issue was with the ConnectionString, I must be set after the "report.load(...)":

    report.Load(reportpath);

    report.Dictionary.Connections[0].ConnectionString = _connstring;


    I hope this may help you!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.