Convert Null in OleStr

edited 3:35PM in FastReport 4.0
Hi,

I have a little problem with some reports which is using data (text or date properti) from the form from which is called. So if I call this report which is contain Memo1 and into script module I have "Memo1.Memo.Text := DateToStr(DateTimePicker1.Date);" in first call of this report all works fine in some another call of report it raise error Could not convert Null into olestr.

Thanks in advance!

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 3:35PM
    a lot depends upon where you are calling the report from on repeated calls and if the form with the date picker is available to the report at that time or has a value.
    a more reliable method would be to create a variable in the report and use it in the memo.
    if the variable is in the categorized variable list and has no expression you can use the ongetvalue event of the tfrxreport component to retrieve it or you can pass the value to the variable in your delphi code where you call the report.
    ie code to load report
    code to set variable value
    code to show report or prepare report

Leave a Comment