Conditional Picture display
Hi,
I m very new to Fast reports, just 1 week.
I m generating a report which displays fields from database table.
In the, i have a string field which display time in HH:MM:SS format e.g 09:25:36
I have another picture control on my report form which is not connected to any table.
What i m looking for is i want to display picture if time is above 9'Oclock.
If the first 2 characters of time field is greater than 09 than display picture otherwise make is invisible
Can somebody please help.
Thanks,
AJ
I m very new to Fast reports, just 1 week.
I m generating a report which displays fields from database table.
In the, i have a string field which display time in HH:MM:SS format e.g 09:25:36
I have another picture control on my report form which is not connected to any table.
What i m looking for is i want to display picture if time is above 9'Oclock.
If the first 2 characters of time field is greater than 09 than display picture otherwise make is invisible
Can somebody please help.
Thanks,
AJ
Comments
inthe obp event of the pictureview
write code to check the value and set the visible property.
Hi thanks for ur reply...
However, when i pressed CRTL+SPACE button in the obp event of the pictureview i cannot find decodetime function.
I m not sure why. Am i doing something wrong?
Anyway i found a workaround to it. I have created an extra field in the table and from delphi i m reading the time, comparing it and saving 0 / 1 in my new numeric field in the table.
After that i went to obp event of the picture and i wrote
Picture1.LoadFromFile('ALERT.png');
if <frxDBDataset2."prof_iINImgDisplay"> = 0 then begin
Picture1.Visible:=False;
end else begin
Picture1.Visible:=True;
end;
It may not be the correct way but it works.
Anyway if u think this is not the proper way to do this, kindly let me know how to do this.
thanks