How can i do the following in oracle reports
Hi,
I have a query that can give me details of the commission for my clients branchwise. We can put the duration, e.g. January, 2009 to June, 2009, which gives me the result for sum of this duration. and in one single column. My concern here is how can i distribute the duration single month wise like following:
Branch Name Jan 2009 Feb 2009 March 2009....
Client Name1
Client Name2
Client Name3
Can anyone suggest like how can i do it on report builder or on SQL.
Thank you.
Regards
Ghazni
Hello,
ghazani7 wrote:
See I have the following sum of records from a query and the input values are date range i.e. January 2009 to March 2009:
BRANCH_CODE TRADER_CODE CLIENT_CODE COMMISSION
17 0050 BM10 134.15
17 0050 BM17 64
17 0050 BM18 25
17 0050 BM3 4
17 0050 BM31 6645
17 0050 BM34 68.5
17 0050 BM36 467.5
17 0050 BM48 4.44
17 0050 BM56 2205
17 0050 BM6 255
17 0050 BM60 375
17 0050 BM62 535
17 0050 BM67 1821.3
17 0050 BM70 10So from the above result how would i now that this result related with which month(s). My suggesstion is you will have to include the month column in your query and also in group by statement. Then it will be easy for you to create simple matrix report.
For posting example data and outputs you should use the tags before and after your example data. For more details see FAQ on forum's page right corner.
-Ammad
Similar Messages
-
How can i do the following in the oracle forms developer :
How can i do the following in the oracle forms developer :
1- delete or add new item to block and canvus at the RUNTIME ????
2- change the following property at the RUNTIME :
- item type
- datatype
- database item
- column nameHow can i do the following in the oracle forms
developer :
1- delete or add new item to block and canvus at the
RUNTIME ????It's not possible, you can do enabled/not enabled, or visible/not visible
2- change the following property at the RUNTIME :
- item typeno
- datatypeno
- database itemno
- column nameno
You are not lucky :-) -
How can we remove the following zeros from quantity field ?
Hi All.
how can we remove the following zeros from quantity field while populating ALV by using FM REUSE_ALV_GRID_DISPLAY ?
eg:getting output zqty = 2.000
but i need zqty = 2.
help me to reslove this issue.
Regards.
jayHi,
While populating the field catlog do the following thing to avoid zeros.
wa_fieldcat-tabname = 'I_OUTPUT'. " Curr
wa_fieldcat-fieldname = 'FWAER'.
wa_fieldcat-seltext_l = text-023.
wa_fieldcat-no_zero = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Thanks,
Khushbu. -
How can I check the version of Oracle in Linux?
Dear all :
How can I check the version of Oracle in Linux ?
Regards
TerryHi terry;
How can I check the version of Oracle in Linux ?You mean your db version or something else? If you mean you want to control your version issue is:
source env file as oramgr
sqlplus "/as sysdba"
when u login sqlplus it will give u something as below:
SQL*Plus: Release 10.2.0.4.0 - Production on
Regard
Helios -
How can i do the RAC with Oracle 9i ?
How can i do the RAC with Oracle 9i ?
The Oracle 9i has a RAC(Real Application Cluster)module , please who can tell me how can i let it working .
Which hardware the RAC need's
Thank All ,
[email protected]That is right you need atleast 2 boxes. The two servers will use the same hard disks.
The concept is an extension of OPS(Oracle Parallel Server).
Basically, you install Oracle Server Software on both the boxes, One database will be shared by both the servers. You can access your database through the Server1 or Server2. If Server1 fails then the Server2 will take over all the connections. You can add or remove any servers to and from the cluster any time you want with out impacting your production.
They share load, reliable, scalable.... -
How can we create the following DOC?
how can we create the following Documents?
Two Enquiry one quotation.
Two Quotation one Sales Order.
Two Sales Order one Delivery.
Two Delivery one Billing.Hi,
You need to execute the below transaction:
1) T.Code - VL11 : To create 2 different enquiry. To make a single Quotation for 2 enqury, use T.Code - VL21. Here once you enter the main screen, select drop down on Sales Document Type, the first option on topmest line & you will get an option --> Create with reference. Select the first enquiry & enter & repreat the sceond enquiry & enter. Now Both Enquiry will be a part of same Quotation.
2) T.Code - VL21: To create 2 different Quotation. To make a single Quotation for 2 enqury, use T.Code - VL01. Here once you enter the main screen, select drop down on Sales Document Type, the first option on topmest line & you will get an option --> Create with reference. Select the first enquiry & enter & repreat the sceond enquiry & enter. Now Both Quotation will be a part of same Order.
3) T.Code - VA01: To create 2 different Order. To make a single delivery, go to T.Code VL10A & select the 2 Order & create collective processing of Delivery to create a single Delivery.
4) T.Code - VL01N: To create 2 different Delivery (other T.codes can also be used to create delivery such as VL04, VL10A, VL10C, etc). To create single Billing for 2 Delivery, go to T.Code: VF01 & enter 2 Delivery numbers & press ENTER. This will merge 2 Delivery together.
Note: It is assumed that the parameter are common & meet the requirement for combining various documents.
Regards,
Rajesh Banka
Reward suitable points. -
How can I unbundle the following?
Hello, how can I unbundle the following vi? I want to get the value of "mean" out of the cluster.
Thanks
Attachments:
howto_unbundle_this.vi 26 KBMatt, if you need the array of means right there on the diagram, options 1 is probably a bit more efficient than your option 3. ;-)
Option 4 is for the general case if you need to unbundle elsewhere in the code.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
means1-4.gif 5 KB -
How can I get the second group and report totals in Matrix report?
Hi,
I have created a matrix report with 2 break Groups.
Iam getting columns totals for the first group, but not for the second group and the report totals.
How can I get the second group and report totals for each month?
Thanks.
Ram.Hi Ram,
If you want a total at any group-level, go to the particular group in the data model, insert a summary column in the group, and select
Reset At > appropriate Group Name
For report level summaries, you must create the summary column outside of all groups.
Navneet. -
How Can I make the following query faster
Hi Guru
I want your valuable suggestion to make the following query faster.I did not write all required columns list. I gave here all those columns where I have conditon like decode,case when,or subquery
(SELECT CASE WHEN REPORTED_BY IS NULL THEN
(SELECT INITCAP(EMP_NAME) FROM HR_EMP WHERE EMP_NO = M.EMP_NO_RADIO)
ELSE (SELECT INITCAP(EMP_NAME) FROM HR_EMP WHERE EMP_NO = M.REPORTED_BY) END RADIOLOGIST_NAME,
(SELECT TEAM_NAME FROM DC_TECHTEAMMST WHERE TEAM_NO = M.GROUP_NO) GROUP_NAME,
CASE WHEN M.RESULT_ENTRY_LOCK_BY IS NOT NULL THEN 'R'
WHEN M.REPORT_DONE = 'D' THEN 'D'
WHEN M.REPORT_DONE = 'P' THEN 'P'
WHEN M.REPORT_DONE = 'F' THEN 'F'
WHEN NVL(M.IMG_CAPTURED,'X') NOT IN ('B','Y') OR M.QA_RESULT = 'F' THEN 'S'
WHEN NVL(M.IMG_CAPTURED,'X') IN ('B','Y') AND NVL(M.QA_RESULT,'X') NOT IN ('B','P') THEN 'Q'
wHEN NVL(M.IMG_CAPTURED,'X') IN ('B','Y') AND NVL(M.QA_RESULT,'X') IN ('B','P') THEN 'C'
END STATUS,
(SELECT DECODE(NVL(V.DELIVERY_STATUS,'N'),'E',3,'U',2,1)
FROM FN_VOUCHERCHD V WHERE V.VOUCHER_NO = M.VOUCHER_NO AND V.ITEM_NO = M.TEST_NO) DELIVERY_STATUS,
trunc((start_time-order_end)*24,0)||' hr'||':'||
decode(length(trunc(to_char(MOD((M.start_time-M.order_end)*24,1)*60),0)),2,to_char(trunc(to_char(MOD((M.start_time-M.order_end)*24,1)*60),0))
,1,to_char('0'||trunc(to_char(MOD((M.start_time-M.order_end)*24,1)*60),0)))||' mi' duration_order_capture,
DECODE(R.CONFIDENTIAL_PATIENT,'Y','*',NVL(R.NAME,R.name_lang_name||' '||R.name_lang_fname)) PAT_NAME,
FNC_PATIENTAGE(R.REG_NO,'',R.CONFIDENTIAL_PATIENT) pat_age,
DECODE(R.CONFIDENTIAL_PATIENT,'Y','*',R.PATIENT_SEX) PAT_SEX
FROM DC_MODALITYAPPOINTMENT M,DC_TESTMST T,OP_REGISTRATION R
WHERE M.ACCESSION_NO IS NOT NULL AND NVL(M.CANCEL_FLAG,'N') = 'N'
AND (NVL(T.SP_GEN,'S') = 'S' OR NVL(M.DOC_REQ_GEN,'N') = 'Y')
AND M.TEST_NO IS NOT NULL AND M.TEST_NO = T.TEST_NO AND M.REG_NO = R.REG_NO)
How can I make the above query faster.
Query condition or indexing whatever is preferable please guide me.
The approximate data of tables
DC_MODALITYAPPOINTMENT 2,000,000
A lot of updating is going on some columns of this table.all columns are not in the select list, Insertion is happend in batch process by back-end trigger of another table.
Primary key based one column,
OP_REGISTRATION 500,000
Daily insertion on this table around 500 records,updation is not much.
Primary key based one column 'reg_no'
DC_TESTMST
Total records of this table not more than 1500.This is setup table. Insertion and updation is not much on this table also
I have to create a view based on this query .
and I have to create another view to serve another purpose.
In the 2nd view I need this query as well as I need another query by using union all operator based on a table(dc_oldresult)
which have 1,600,000 records.There is no DML on this table
SELECT NVL((SELECT USER_DEFINE_TEST_NO FROM DC_TESTMST WHERE TEST_NO = SV_ID AND ROWNUM = 1 ),SV_ID) USER_D_EXAM_NO,
(SELECT TEST_TYPE FROM DC_TESTMST WHERE TEST_NO = SV_ID AND ROWNUM = 1 ) EXAM_TYPE,
NVL((SELECT TEST_NAME FROM DC_TESTMST WHERE TEST_NO = SV_ID AND ROWNUM = 1),'Exam Code: '||sv_id) EXAM_NAME,
(SELECT PAT_NAME FROM OP_REGISTRATION WHERE REG_NO = HN) PATIENT_NAME,
(SELECT PAT_AGE FROM OP_REGISTRATION WHERE REG_NO = HN) PATIENT_AGE,
(SELECT PAT_SEX FROM OP_REGISTRATION WHERE REG_NO = HN) PATIENT_GENDER
FROM DC_OLDRESULT
WHERE HN IS NOT NULL AND SV_ID IS NOT NULL AND UPPER(ACTIVE) = 'TRUE'
Should I make join DC_OLDRESULT, OP_REGISTRATION and DC_TESTMST? or The eixisting subquery is better?
I use OP_REGISTRATION and DC_TESTMST in both query
Thanks in advance
MokaremWhen your query takes too long ...
-
Problem in finding Exact result by using the following in Oracle Reports 6i
Hello,
I am finding difficulty in producing the required result by using the following query in Reports 6i
(Note: - The query actual output and the my required output are as follows: -)
SELECT
DISTINCT
SH.S_HEAD_CODE,
B.BILL_ID,
B.SANCTION_DATE,
E.EMP_NAME,
E.EMP_DESIGNATION,
B.TOTAL_BILL,
NVL((SH.INITIAL_ALLOCATION-B.TOTAL_BILL), 0) BALANCE
FROM BILL B, PARAMETERS P,SUB_HEAD SH, EMPLOYEES E, BILL_DETAIL BD
WHERE
SH.S_HEAD_CODE=B.S_HEAD_CODE
AND B.S_HEAD_CODE=BD.S_HEAD_CODE
AND B.EMP_ID_NO=E.EMP_ID_NO
AND B.BILL_ID=BD.BILL_ID
The Output of the above query is as follows: -
Let say we have Total Amount Sanctioned Rs. 15,000,00/-
Name Total Bill (Rs.) Balance (Rs.)
Sohail 7147 1492853
Saqib 2131 1497869
Amir 6802 1493198
Shafiq 1214 1498786
Note:- In the above output the above query is subtracting the current balance from Total Sanctioned Amount (Rs. 1500000) each time, but
it should actually subtract the current bill amount from the previous balance like the below said result.
Name Total Bill (Rs.) Balance (Rs.)
Sohail 7147 1492853 {Previous Balance - Current Bill Amount (1500000-7147) }........ The previous balance was actual amount Rs. 1500000
Saqib 2131 1490722 {Previous Balance - Current Bill Amount (1492853 - 2131)}
Amir 6802 1483920 {Previous Balance - Current Bill Amount (1490722 - 6802)}
Shafiq 1214 1482706 {Previous Balance - Current Bill Amount (1483920 - 1214)}
Results Continue...........................
Please help me to solve this problem.
Thank you in advanceIts more like the case of a running total ...
You could analytical functions to achieve it or make the BILL a subquery of the BALANCE.
Try posting your query in the "SQL and PL/SQL" forum, veteran members there, can provide better answers. -
How can we diferentiate the follow scenario
hi friends can any one give me the solluation for the following scensrio
Our client sells industrial salt (material) in the following three ways
1, the client produce the material and sell it to the customer
2, the client buy it form vendor and store the material in the clint's storage location and sells to the customer
3, the third one is he buy form vendor and ask teh vendor to deliver it to the end customer
in these theree scenarios the client is doing business for the SAMEPRODUCT
here the client wants sales &revinue reports for the own produced products suparately and traded products (which vendor suplied to the customer + sales of which he purchased and stored in clients storage location) suparately.
how to get the reports for the two above scenarios
please give me the solluation it will be very helpfull for me
and i will five full points for the solluation
thanks
nitchelThe scenarios can be mapped by the following ways for the same product
1) first one is normal sale just like sales order delivery billing
2) Second one is the Individual Purchase Order where the item is third party item. while raising the sales order if material is not available and want to procure the material from the vendor change the item categroy in the sales order as TAB instead of TAN. for this u have to do the settingin item category determination manual item category should be TAB after TAN
i mean ORNORMUSAGE+HIGHER LEVEL ITEMCATEGORY= TAN AND TAB IS IN MANUAL ITEM CATEGORY FIELD
3)follow the second process for third one as item category will be TAS .in item category determination mention the manual item category as TAS.
Reports u can see the customer wise, material wise see the follwoing list
Sales summary - VC/2
Display Customer Hierarchy - VDH2
Display Condition record report - V/I6
Pricing Report - V/LD
Create Net Price List - V_NL
List customer material info - VD59
List of sales order - VA05
List of Billing documents - VF05
Inquiries list - VA15
Quotation List - VA25
Incomplete Sales orders - V.02
Backorders - V.15
Outbound Delivery Monitor - VL06o
Incomplete delivery - V_UC
Customer Returns-Analysis - MC+A
Customer Analysis- Sales - MC+E
Customer Analysis- Cr. Memo - MC+I
Deliveries-Due list - VL04
Billing due list - VF04
Incomplete Billing documents - MCV9
Customer Analysis-Basic List - MCTA
Material Analysis(SIS) - MCTC
Sales org analysis - MCTE
Sales org analysis-Invoiced sales - MC+2
Material Analysis-Incoming orders - MC(E
General- List of Outbound deliveries - VL06f
Material Returns-Analysis - MC+M
Material Analysis- Invoiced Sales - MC+Q
Variant configuration Analysis - MC(B
Sales org analysis-Incoming orders - MC(I
Sales org analysis-Returns - MC+Y
Sales office Analysis- Invoiced Sales - MC-E
Sales office Analysis- Returns - MC-A
Shipping point Analysis - MC(U
Shipping point Analysis-Returns - MC-O
Blocked orders - V.14
Order Within time period - SD01
Duplicate Sales orders in period - SDD1
Display Delivery Changes - VL22
dont forget to reward points if helpful
Thanks and Regards,
Rahul -
How can i write the following statements in Java ???
Hi Everyone,
I'm studying UML and according to my textbook, it says if 2 classes have the following relationship then it can be said that there's an association relationship between those 2 classesl.
Class A and B are associated if :
- an object of class A sends a message to an object of class B
- an object of class A creates an object of class B
- an object of class A has an attribute whose value are objects of class B or collections of objects of class B
- an object of class A receives a message with an object of class B as an argument.
However, I dunno how to write those stuff into Java codes. Can someone please kindly write Java codes for those sentences ?? Thanks everyone in advance.Sorry guys. I know I shouldn't have asked in the first place without giving it a try first. Yeah, I been doing
Java without understanding the concept of real OOP and its terms.
- an object of class A sends a message to an object of class B // ?????
- an object of class A creates an object of class B // A obj=new A();
- an object of class A has an attribute whose value are objects of class B or collections of objects of class B // A varB;
- an object of class A receives a message with an object of class B as an argument. // ?????
I get confused with the very first line and the last line . I dunno what it means by sending a message but according to what JoachimSauer mentioned
it's "calling a method" but does that mean even I called an object of the same class within , can i still refers it as sending a message ?? Like what if
i call a static method of the calling object because I dun think i create an object when I call a static method ?
Let's say
class ExampleOne
public ExampleOne()
ExampleOne egOne=new ExampleOne();
egOne.display(); //can i refer to this as egOne object sending a message to an object of itself so the receiver is also egOne ??
public void displayOne()
System.out.println("Just an exampleOne");
class ExampleTwo
public ExampleTwo()
ExampleTwo.display(); // here no object creation occurs , just ExampleTwo class sends a message to itself so there's no association i assume .
public static void displayTwo()
System.out.println("Just an exampleTwo");
public class Main
public static void main(String args[])
ExampleOne exampleOne=new ExampleOne();
ExampleTwo exampleTwo=new ExampleTwo();
}I'm confused. at first , i thought sending a message means passing values as parameters when we call a function and receiving a message means the function
being called receive values as parameters. Phew, please help me out of this. -
How can I store the results of a report in an Oracle table ?
In OBIEE 11g, we need the records resulting from the execution of a report, to be stored in an Oracle table.
Is this possible ?. Thanks.
F r a n c o . -GSR Hi, first of all thanks for your response.
What I'm wanting to do is not exactly what you're proposing.
What I want is that an end user can run a report and that the results be automatically stored in an Oracle table. Without manual intervention. Other BI products perform this action, and I need to do it with OBIEE. Thanks.
F r a n c o . - -
How can I get the following result?
Hi, I have table test:
create table test(oper_date date, income number, expense number), there are several records in this table:
20060101 100 10
20060105 200 15
20060106 150 12
20060109 30 8
I want to get the following result:
20060101 100 10
20060102 0 0
20060103 0 0
20060104 0 0
20060105 200 15
20060106 150 12
20060107 0 0
20060108 0 0
20060109 30 8
How should I write the sql?
Please give some help!
Thank you all!I used the script below:
CREATE TABLE mhe_foo( oper_date DATE
, income NUMBER
, expense NUMBER
INSERT INTO mhe_foo VALUES(TO_DATE('20060101','YYYYMMDD'), 100, 10)
INSERT INTO mhe_foo VALUES(TO_DATE('20060105','YYYYMMDD'), 200, 15)
INSERT INTO mhe_foo VALUES(TO_DATE('20060106','YYYYMMDD'), 150, 12)
INSERT INTO mhe_foo VALUES(TO_DATE('20060109','YYYYMMDD'), 30, 8)
SELECT v.oper_date
, NVL(m.income,0) AS income
, NVL(m.expense,0) AS expense
FROM ( SELECT mindt + level - 1 AS oper_date
FROM ( SELECT MIN(oper_date) mindt
, MAX(oper_date) maxdt
FROM mhe_foo
CONNECT BY mindt + LEVEL -1 <= maxdt
) v
, mhe_foo m
WHERE v.oper_date = m.oper_date(+)
ORDER BY v.oper_date
DROP TABLE mhe_foo
/I saved it as C:\T1\myscript.sql and ran it:
SQL> @C:\t1\myscript
Table created.
1 row created.
1 row created.
1 row created.
1 row created.
OPER_DATE INCOME EXPENSE
01-JAN-06 100 10
02-JAN-06 0 0
03-JAN-06 0 0
04-JAN-06 0 0
05-JAN-06 200 15
06-JAN-06 150 12
07-JAN-06 0 0
08-JAN-06 0 0
09-JAN-06 30 8
9 rows selected.
Table dropped.
SQL>MHE
Message was edited by:
maaher -
How can I get the following results?
Hi, I have a table:
fphm,kshm
2014,00000001
2014,00000002
2014,00000003
2014,00000004
2014,00000005
2014,00000007
2014,00000008
2014,00000009
2013,00000120
2013,00000121
2013,00000122
2013,00000124
2013,00000125
And I want get the following results:
2014,00000001,00000005
2014,00000007,00000009
2013,00000120,00000122
2013,00000124,00000125
And what should the sql is?
Please give me some guide!
Thank you all!Hi,
Well, what did you say about his :
SQL> select * from tbl;
FPHM KSHM
2014 1
2014 2
2014 3
2014 4
2014 5
2014 7
2014 8
2014 9
2013 120
2013 121
2013 122
FPHM KSHM
2013 124
2013 125
13 rows selected.
SQL> select fphm, min(kshm),max(kshm)
2 from
3 (select fphm, kshm,
4 kshm-rank() over (partition by fphm order by fphm,kshm) rk
5 from tbl)
6 group by fphm,rk
7 order by fphm
8 /
FPHM MIN(KSHM) MAX(KSHM)
2013 120 122
2013 124 125
2014 1 5
2014 7 9
SQL> insert into tbl values (2013,123);
1 row created.
SQL> select fphm, min(kshm),max(kshm)
2 from
3 (select fphm, kshm,
4 kshm-rank() over (partition by fphm order by fphm,kshm) rk
5 from tbl)
6 group by fphm,rk
7 order by fphm
8 /
FPHM MIN(KSHM) MAX(KSHM)
2013 120 125
2014 1 5
2014 7 9
SQL> Nicolas.
Maybe you are looking for
-
Letter of Credit - Configuration
Hi All, Please guide me the steps for the configuration of letter of credit for imports & local purchase urgently. Thanks Veena
-
I opened the printer, checked every cartridge, found no leak. Then I opened back door, couldn't find how it smeared black on the whole page. I also need its complete "User Guide." I have only a few pages. Help!!!!
-
Dear Friends, Does anybody know how to translate java sources file and get all the info from it. Like i want to write a parser and want to extract its details and store in datastructures. Any similar examples present or any suggessions please inform.
-
I can't get beyond Creative Cloud Installer...can't download LR or PS.
I have the CC monthly subscription. I got Creative Cloud installer installed but can't download LR or PS. Creative Cloud shows up as a file in Applications. Acrobat is installed. I've been on hold for 3 hrs 9 min 54 seconds. Please help!
-
HT4946 Error (0xE8000084). What you do.
What I have. To do