Testing Field Value is Null

DEMDEM
edited 9:18AM in FastReport 4.0
Hi,

I am trying to test if a Field Value is Null or not.

I Set the Report EngineOptions.ConvertNulls to False but I still get 0 values instead of Null.

In the Code Section, I wrote something like :
if <frxDBDataset."FIELD"> = Null ) then MyProcedure;
But MyProcedure is just never called. The return value is always 0.

This is actually not acceptable as I also may have 0 values.

Is there anything else to do ?

Thanks in advance.

DEM

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 9:18AM
    When posting please advise which build and level of fr4 you are using.
    it works fine here so you probable have not written the code in an appropriate event.
    ie obp of masterdataband.
    fr4.8 d10,12,14
  • DEMDEM
    edited 9:18AM
    Hi,

    We are using version 4.7.66 with Delphi 2007.

    The code is written in the OnBeforePrint event of the MasterData band.

    I tried to set the option in Designtime, in runtime, both, nothing helps.

    Rgds
  • gordkgordk St.Catherines On. Canada.
    edited 9:18AM
    can't say for sure but it may have been a bug in that version 4.7 went to version 196
    before ver4.8 came out.
    you could try setting the tfrxreportcomponent property from the ide
    But i would suggest you update to newest version.
  • DEMDEM
    edited 9:18AM
    Thanks for replying.

    I will try to setup a new Virtual Machine or upgrade he one I use asap and keep you informed.

    Rgds.

    DEM
  • DEMDEM
    edited 9:18AM
    OK, I swtiched successfully to version 4.8.7. I have to say that your install package is really pleasant. It checks installed version, deinstalls and then we can properly install new version. Everything workes fine. Great !

    Unformtunately, I still have same problem. I investigated further and here are the results :

    - Setting Report.EngineOptions.ConvertNulls to False at design is OK.
    - Report.LoadFromStream(MemoyStream) => does reset the EngineOptions.ConvertNulls to True !!!!!!
    - To make it work, I have to set the value again to True by code after a LoadFromStream.


    I wonder if it is a bug or not, but my opinion is YES ! Am I Wrong ?

    Rgds

    DEM

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.