How to print Tick Sign in Reports 10g [message #556568] |
Tue, 05 June 2012 06:21 |
oralover2006
Messages: 144 Registered: January 2010 Location: India
|
Senior Member |
|
|
hi all,
searched here for Tick Sign in Reports & Discoverer section, but did not find.
i am trying to work on Reports and have a requirement of Tick Sign should appear in report if the column value is 'Y' means yes.
i tried following SQL statement in SQL*Plus, but failed to find and Tick Sign, please help.
declare
n number:=0;
c varchar2(1);
begin
for i in 1..255
loop
select chr(i)
into c
from dual;
dbms_output.put_line ('* '||lpad(to_char(i),3,' ')||' -> '||c);
end loop;
end;
Thanks very much for help in advance.
|
|
|
Re: How to print Tick Sign in Reports 10g [message #556573 is a reply to message #556568] |
Tue, 05 June 2012 07:13 |
|
Littlefoot
Messages: 21811 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
That might be tricky.
I work under Windows.
One option is to find "tick sign" (it looks like a "checkbox checked" sign, if I understood what you are saying; right?) in Windows' "Character Map". In there, you'd choose a font that contains that sign. For example, Windgdings font; tick sign's code is 0xFE (254). Then you'd create it in report's layout (try copy/paste from MS Word, for example), or <Alt-Gr> + 254 combination or any other option you find appropriate. Make sure to set that sign's font to the same one you found in Character Map (in my example, that would be Wingdings).
The rest is easy - create its Format Trigger to return TRUE if certain condition is met. For example:return (:column_value = 'Y');
Then you'd run the report and be really happy as you'd actually see that tick sign on the screen. Wow! But, you'd then copy the report to the application server which doesn't have to have the same font installed, so - instead of a tick sign - you'd get something unexpected and, above all, not acceptable for end users.
Therefore, I wouldn't recommend it.
Is there any other option? Certainly! Take a tick mark screenshot or download it (there are many pretty ones on the internet) and insert the image into your report. Of course, the same image should exist on the server as well.
The third option I can think of is to avoid tick sign and create something else - for example, two rectangles, one above the other. One of them would be painted green (for "Y") and another one red (for "N"). You'd then create Format triggers for each of them:-- green:
return (:column_value = 'Y'); -- red:
return (:column_value <> 'Y'); and run the report. The simple "traffic light" would indicate column's value. That option doesn't depend on any font settings, images, their location etc. and works always.
Now that you have several options, pick one; I found the third option the most versatile.
|
|
|
|
|