Home » Developer & Programmer » Reports & Discoverer » Oracle Reports (Oracle Reports 6i)
Oracle Reports [message #547366] Wed, 14 March 2012 00:46 Go to next message
parvathi
Messages: 7
Registered: March 2012
Location: India
Junior Member
Hi,

I have a table (medicine_frequency) which has the following items:
-----------------
AGE
DRUG_DESCRIPTION
FREQ
MORNING
NOON
EVENING
BEFORE_BEDTIME
OTHER
-----------------
I have to prepare a report in such a way that in a field
it has to display the vaules of morning/noon/evening(once if all three are there) like 'Take 1 tablet'

Im new to the oracle reports pls let me know how to do it!I have attached a screen shot also pls help me

Thanks in advance!

./fa/9957/0/


[EDITED by LF: inserted image into the message body]
  • Attachment: items.png
    (Size: 4.17KB, Downloaded 199 times)

[Updated on: Wed, 14 March 2012 01:48] by Moderator

Report message to a moderator

Re: Oracle Reports [message #547369 is a reply to message #547366] Wed, 14 March 2012 01:10 Go to previous messageGo to next message
Littlefoot
Messages: 19321
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm not sure I understand what is stored in morning, noon and evening columns. Could you post a few sample records, please?

Furthermore, these times of a day are not displayed on your screenshot (at least, not as labels). Where should they be printed?
Re: Oracle Reports [message #547375 is a reply to message #547366] Wed, 14 March 2012 01:39 Go to previous messageGo to next message
parvathi
Messages: 7
Registered: March 2012
Location: India
Junior Member
Hi,

Thanks for reply.

My table will look like
select * from medicine_frequency;

AGE                  DRUG_DESCRIPTION               FREQ       MORNING    NOON       EVENING    BEFORE_BED OTHER        
-------------------- ------------------------------ ---------- ---------- ---------- ---------- ---------- -----------
26YYYY11MM29DD       Mobic 7.5 mg tablet            After Meal 1 Tablet              1 tablet                           
26YYYY11MM29DD       Cravit solutions 5 ml bottle              1 Drop     1 Drop     1 Drop     1 Drop      

I have attached a screen shot of my report here .in this report below to the DRUG_DESCRIPTION dynamically a line should appear as "take 1 Tablet" or " Take 1 drop"

I tried to use forumla coulmn with the function as below
function CF_1Formula return Char is
begin
Return 'Take '||:morning||' '||:noon||' '||:evening||' '||:before_bedtime||' '||:other;
end;

but it is giving the reult as

"Take 1 tablet 1 tablet" or "take 1 drop 1 drop 1 drop"


Kindly help../fa/9959/0/


[EDITED by LF: applied [code] tags]

[Updated on: Wed, 14 March 2012 01:47] by Moderator

Report message to a moderator

Re: Oracle Reports [message #547381 is a reply to message #547375] Wed, 14 March 2012 01:52 Go to previous messageGo to next message
parvathi
Messages: 7
Registered: March 2012
Location: India
Junior Member
with the previous reply I have added addtional screenshot./fa/9960/0/
  • Attachment: Untitled.png
    (Size: 25.52KB, Downloaded 186 times)
Re: Oracle Reports [message #547386 is a reply to message #547375] Wed, 14 March 2012 02:00 Go to previous messageGo to next message
Littlefoot
Messages: 19321
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, from my point of view, "SELECT * FROM MEDICINE_FREQUENCY" output looks the best - everything is clear.

If you insist on formula columns, I guess that you should use one formula column for every "field" (one formula for morning before; one formula for morning after; one formula for non before; ...), such as
function cf_1_morning_before return char is
begin
  if :freq = 'before' then
     return ('Take ' || :morning ||' '|| :freq);
  else
     return (null);
  end if;
end;
Re: Oracle Reports [message #547405 is a reply to message #547386] Wed, 14 March 2012 03:36 Go to previous message
parvathi
Messages: 7
Registered: March 2012
Location: India
Junior Member
Thank you so much it worked!!!!!!!!!!!!!!
Previous Topic: about report pic
Next Topic: REP-0118 Unable to create a temporary file in "Windows 7 "
Goto Forum:
  


Current Time: Tue Jul 29 00:49:06 CDT 2014

Total time taken to generate the page: 0.11279 seconds