[REL] 3 Column listing with Rating (for print)
Posted: 2006-05-17 08:14:20
Hello,
I'm designing a 3 column template for printing based roughly on zweckform but now looking quite different.
I've got it almost perfect, but I'd like to display the rating. In my DB I always use the IMDb rating, which is a fraction out of 10. I have no problem to display the rating if it's available, but I'd like to show stars (at least *** if not an image).
The problem is that Rating is not an integer.
So, in the FreeReport scripting language how can I do it? I have code a little bit like this:
This causes errors, because Rating isn't seen as a number (float) by the script. Can I acheive this?
-Fruey
I'm designing a 3 column template for printing based roughly on zweckform but now looking quite different.
I've got it almost perfect, but I'd like to display the rating. In my DB I always use the IMDb rating, which is a fraction out of 10. I have no problem to display the rating if it's available, but I'd like to show stars (at least *** if not an image).
The problem is that Rating is not an integer.
So, in the FreeReport scripting language how can I do it? I have code a little bit like this:
Code: Select all
begin
if ([Rating] > 7.9) then
tmp1 := '*****'
else if ([Rating] > 6.6) then
tmp1 := '****'
else if ([Rating] > 5.3) then
tmp1 := '***'
else
tmp1 := '**'
end;
-Fruey