Home » Developer & Programmer » Reports & Discoverer » check box choose (oracle reports builder )
check box choose [message #657317] Sun, 06 November 2016 00:00 Go to next message
Rashaali1
Messages: 5
Registered: November 2016
Junior Member
hello

I need help

I choose the check box in oracle forms
how can I used it in the report
I mean when check one choose or three it shows in the report the name of the check box for example active or not active
Re: check box choose [message #657329 is a reply to message #657317] Sun, 06 November 2016 04:49 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Shortly: as far as I can tell, you can't do that.
Re: check box choose [message #657571 is a reply to message #657329] Tue, 15 November 2016 00:22 Go to previous messageGo to next message
Rashaali1
Messages: 5
Registered: November 2016
Junior Member
it is work

I use PL/SQL IF statement

in the form when I use a check box
I choose 1 for yes
and 2 for no

then in the report
I use a function

then i use to_char

for example

x varchar (100);

begin

if :state=1 then
x:=(to_char('yse'));
else
x:=(to_char('no'));
end if ;
return x;
end ;
Re: check box choose [message #657572 is a reply to message #657571] Tue, 15 November 2016 00:34 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

What does mean TO_CHAR(string)?

Please read How to use [code] tags and make your code easier to read.

Re: check box choose [message #657573 is a reply to message #657572] Tue, 15 November 2016 00:47 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Wait a minute; the way you wrote the initial message, I understood that you want to check (or uncheck) a checkbox directly on a report.
Your previous message, on the other hand, suggests that you are just displaying "yes" or "no", depending on a value stored (by form's checkbox item) into a table column. That's completely different.

Anyway: I'm glad you found the solution. However, you overcomplicated it, as a simple DECODE manages it quite well. So: in report's query you could have used
select decode(state, 1, 'yes', 'no') state_description
from ...
where ...
Re: check box choose [message #657574 is a reply to message #657572] Tue, 15 November 2016 00:51 Go to previous messageGo to next message
Rashaali1
Messages: 5
Registered: November 2016
Junior Member
converts a number or date to a string.

https://www.techonthenet.com/oracle/functions/to_char.php
Re: check box choose [message #657575 is a reply to message #657574] Tue, 15 November 2016 00:54 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
So, why are you converting a string (because 'yes' is a string) into a string?
Re: check box choose [message #657587 is a reply to message #657575] Tue, 15 November 2016 03:49 Go to previous message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
As is 'yse'

Why don't you just have the form pass through yes and no and skip the function in the report altogether?
Previous Topic: Print Field Text in Vertical Direction
Next Topic: Generate SAVE disabled PDF - ORACLE Reports
Goto Forum:
  


Current Time: Thu Mar 28 11:15:22 CDT 2024