Home » Developer & Programmer » Reports & Discoverer » Data to be taken in different format (Reports 6i )
Data to be taken in different format [message #571853] Sun, 02 December 2012 22:28 Go to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

I have one table storing all the information about employye, i have to develop three different reports based on the same table with different groupings , is there a easy way to call each format differently using single interface ,something like ref cursor.I dont want to create two or 3 different reports , instead choose the format.


CREATE TABLE OT_JOB_DET
(
  JT_TXN       VARCHAR2(12 BYTE),
  JT_NO        NUMBER,
  JT_DT        DATE,
  JT_EMP_CODE  VARCHAR2(6 BYTE),
  JT_DURATION  NUMBER
)/


INSERT INTO OT_JOB_DET ( JT_TXN, JT_NO, JT_DT, JT_EMP_CODE,
JT_DURATION ) VALUES ( 
'time', 1,  TO_Date( '11/04/2012 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'AA', 10); 
INSERT INTO OT_JOB_DET ( JT_TXN, JT_NO, JT_DT, JT_EMP_CODE,
JT_DURATION ) VALUES ( 
'time', 2,  TO_Date( '11/01/2012 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'AA', 12); 
INSERT INTO OT_JOB_DET ( JT_TXN, JT_NO, JT_DT, JT_EMP_CODE,
JT_DURATION ) VALUES ( 
'time', 3,  TO_Date( '11/09/2012 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'BB', 7); 
INSERT INTO OT_JOB_DET ( JT_TXN, JT_NO, JT_DT, JT_EMP_CODE,
JT_DURATION ) VALUES ( 
'time', 4,  TO_Date( '11/14/2012 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'CC', 2.43); 
INSERT INTO OT_JOB_DET ( JT_TXN, JT_NO, JT_DT, JT_EMP_CODE,
JT_DURATION ) VALUES ( 
'time', 5,  TO_Date( '11/15/2012 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'DD', 2); 
COMMIT;


first output


SELECT  JT_DT,SUM(JT_DURATION)FROM
OT_JOB_DET GROUP BY JT_DT;

SELECT JT_EMP_CODE ,SUM(JT_DURATION) FROM
OT_JOB_DET GROUP BY JT_EMP_CODE;

[Updated on: Sun, 02 December 2012 22:29]

Report message to a moderator

Re: Data to be taken in different format [message #571862 is a reply to message #571853] Mon, 03 December 2012 02:02 Go to previous messageGo to next message
Littlefoot
Messages: 19901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Create 3 different layouts (in the same editor), one below the other. Create format triggers which will decide whether to display certain layout or not (because, format triggers return Boolean).
Re: Data to be taken in different format [message #571865 is a reply to message #571862] Mon, 03 December 2012 02:21 Go to previous messageGo to next message
ranamirfan
Messages: 529
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

As Said Littlefoot for layouts also read this.
http://www.orafaq.com/forum/mv/msg/183632/564591/81953/#msg_564591

Regards,
Irfan
Re: Data to be taken in different format [message #571962 is a reply to message #571865] Tue, 04 December 2012 21:42 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

thanks littlefoot and ranamirfan for the help.
Re: Data to be taken in different format [message #571969 is a reply to message #571962] Wed, 05 December 2012 00:09 Go to previous message
ranamirfan
Messages: 529
Registered: January 2006
Location: Pakistan / Saudi Arabia
Senior Member

Thanks for your feedback.
Previous Topic: excel sheet output from oracle report builder
Next Topic: 6i to 10g report button code conversion
Goto Forum:
  


Current Time: Thu Dec 25 18:16:45 CST 2014

Total time taken to generate the page: 0.08172 seconds