Convert Null in OleStr
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!
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
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