Convert Null in OleStr

edited 11:38AM 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 11:38AM
    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

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.