•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Oracle section within the Web Development category of DaniWeb, a massive community of 397,810 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,517 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Oracle advertiser:
Views: 1649 | Replies: 5
![]() |
•
•
Join Date: Jan 2005
Posts: 24
Reputation:
Rep Power: 4
Solved Threads: 0
Hi everyone
I have one master table with the following structure
incm_id Category SubCategory
1001 Expenses A
1002 Expenses B
1003 Income C
1004 Income D
I have a child table where i am capturing amount value for the above table and structure is something like
id fk_incm_id Amount
10001 1001 25
10002 1002 30
10003 1003 40
10004 1004 50
Now using Discoverer plus i need to show this information which i am able to do
But i then need to show total where i must deduct the values of expenses from income (i.e. Income - Expense)
I tried using decode to make the values of expenses negative but i dont want the values to be displayed as negative and still able to achieve my task
Please help me if there is a way out
I have one master table with the following structure
incm_id Category SubCategory
1001 Expenses A
1002 Expenses B
1003 Income C
1004 Income D
I have a child table where i am capturing amount value for the above table and structure is something like
id fk_incm_id Amount
10001 1001 25
10002 1002 30
10003 1003 40
10004 1004 50
Now using Discoverer plus i need to show this information which i am able to do
But i then need to show total where i must deduct the values of expenses from income (i.e. Income - Expense)
I tried using decode to make the values of expenses negative but i dont want the values to be displayed as negative and still able to achieve my task
Please help me if there is a way out
•
•
Join Date: Dec 2006
Posts: 24
Reputation:
Rep Power: 2
Solved Threads: 0
Do you have to have the child table in this format? It would be easier if the income and expenditure were in different columns. You could create two views, one for income and the other for expenditure then the query would be simple.
If you can't do it this way then you may be able to create some derived columns in discoverer based on the category type and build totals from there.
Alistair
If you can't do it this way then you may be able to create some derived columns in discoverer based on the category type and build totals from there.
Alistair
•
•
Join Date: Jan 2005
Posts: 24
Reputation:
Rep Power: 4
Solved Threads: 0
Hi Alistair
U did not get my problem. I my able to get both income and expenditure items in the report
But to calculate profit, I have to deduct income-expenditure. I tried using decode to negate the values of expenditure but problem is that they are being shown as negative values in the report (which is not acceptable). The report should show expenditure value as positive but as same time should be able to be deducted from income values
hope now u got my problem
also i am creating reports using Discoverer plus
regards
U did not get my problem. I my able to get both income and expenditure items in the report
But to calculate profit, I have to deduct income-expenditure. I tried using decode to negate the values of expenditure but problem is that they are being shown as negative values in the report (which is not acceptable). The report should show expenditure value as positive but as same time should be able to be deducted from income values
hope now u got my problem
also i am creating reports using Discoverer plus
regards
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Oracle Marketplace
Similar Threads
- any body help me urgent (JSP)
- Urgent help needed......Plz somebody help me..... (Windows NT / 2000 / XP / 2003)
- Urgent help required. (JSP)
- JSP source code required for implementing search feature (JSP)
- Help required (C++)
- URGENT HELP NEEDED - critically important...!!! (Windows NT / 2000 / XP / 2003)
- Problems in Dynaform (Form Mail) URGENT HELP (PHP)
- Homepage keeps switching back to a porn site (Web Browsers)
- Importing SQL Script File - Urgent !! (Database Design)
- IE6 Favourites (Web Browsers)
Other Threads in the Oracle Forum
- Previous Thread: PHP/Oracle Problem > binary fields being returned
- Next Thread: urgent help needed in multi master replication


Linear Mode