Tree Matrix Report with double line heading
Hi,
I am very new to HTML-DB and HTML as well.
I need to create a matrix report with a tree functionality and with two line heading.
Basically This is what I need to generate
REGION1 REGION2 REGION3
COL1 COL2 TOTAL COL1 COL2 TOTAL COL1 COL2 TOTAL
===========================================================
CAT1+
Sub_CAT1
Sub_CAT2
CAT2+
Sub_SCAT3
Sub_SCAT4
Where CAT1 , CAT2 needs to be collapsible rows. SCAT1..SCAT4 are sub categories under main categories.
REGION1.... REGION3 are top level headings. And COL1,COL2 are sub headings under top level headings.
Thanks,
Shri
Please help me on this!
Thanks,
Shri
Similar Messages
-
Matrix report with two across groups
Hi all,
I am facing a problem in making a multi line matrix report.
actually I need to make a matrix report with two "across groups", but unable to get desired result.
if any body has any idea, please share with me.
regards
AtaNo,
you must have only 1 query which extracts all your data:
A,q1,10
A,q2,20
A,q3,30
B,q1,40
B,q3,50
C,q2,60
C,q3,70
Open report builder and create a new report from wizard.
Select the first option accordingly with your requirements and go next.
Type a name for your report in the title field then select "Matrix" as layout and go next.
Select SQL Query and go next.
Type your query.
Select the data you want on the rows (i.e. A, B, C...) and click on the ">" button in the Matrix Row Fields section, then go next.
Select the data you want on the columns (i.e. q1, q2, q3...) and click on the ">" button in the Matrix Column Fields section, then go next.
Select the data you want on the cells(i.e. 10,20,30...) and click on the "Sum >" button in the Matrix Cell Fields section, then go next.
Add some totals, if you need them.
Go next and finish.
Now you have a report with the following layout:
Q1 Q2 Q3 TOT
A 10 20 30 60
B 40 50 90
C 60 70 130
TOT 50 80 150 280Bye
Raffy -
Matrix report with group.
dear all,
can anyone guide me how to build a matrix report with group using scott schema.
i can not be able to build a query.
Thanks
Muhammad NadeemThe example given by Oracle (from the above link) using the following SQL for a matrix report is flawed.
SELECT DEPTNO, JOB, SUM(SAL)
FROM EMP
GROUP BY DEPTNO, JOB
ORDER BY DEPTNO, JOB
The SUM function handled by the query restricts you from doing so many things - especially when you want the empty fields to be filled by 0 (by using the Value if Null property).
If the query is changed to ''SELECT DEPTNO, JOB, SAL FROM EMP' , and use the SUM function in the wizard to build the Matrix cell, then the 'Value if Null' property can be used without any issues.
This also makes Section 25.6 (Add zeroes in place of blanks) of the documentation a joke.
Anyway, that's my cents worth.... -
Print JTable with multi line header
I need to print a JTable with multi line header, I want to know if I can use the method jTable.print(int, MessajeFormat, MessageFormat) by manipulation of the MessageFormat. How I can manipulate it?
Otherwise, How I can print this?hi again,
To print pdf in a swing application you don't need servlet.jar.
You'll only need itext.jar and a printer connected to your pc.
Download the iText source code and unzip it. See the following classes:
com.lowagie.tools.LPR and com.lowagie.tools.BuildTutorial. This latter is the main class of a swing tool that you can run.
Silent Print:
You have only to embed this javascript code in your pdf:
writer.addJavaScript("this.print(false);", false);
document.add(new Chunk("Silent Auto Print"));Then, you have to send the document to the printer.
Google : java print pdf
http://forum.java.sun.com/thread.jspa?threadID=523898 or
http://www.exampledepot.com/egs/javax.print/pkg.html for printing task.
Under unix system, I used this:
String PRINTER = ...;
try {
String cmd = "lp -d " + PRINTER + " " + PDF_PATH;
Runtime.getRuntime().exec(new String[] { "sh", "-c", cmd });
} catch (Exception e) {
//handle the exception
e.printStackTrace();
}hth -
Generating Report with vertical lines from Designer
Hi:
I would like to get any suggestions about generating tabular reports with vertical lines from Oracle Designer 6.0 on Windows NT.
Any help will be appreciated.
Thanks in advanceHey c2petrov,
Thanks for using Apple Support Communities.
After reviewing your post, it sounds like you are having trouble with the screen. A frustrating situation to be sure. This article addresses issues with video on internal or external displays.
Apple computers: Troubleshooting issues with video on internal or external displays
http://support.apple.com/kb/HT1573
Have a nice day,
Mario -
Matrix report with dynamic and fixed columns
Hi all,
I have a matrix report which has dynamic as well as few fixed columns.
It is a fixed asset Report in which the sum(cost) in cell should be grouped according to column and row-wise.
The row consists of the activity such as additions, retirements etc and the dynamic column is the category and other fixed columns such as CIP cost, CWIP cost will be grouped only according to row.
the actual layout should be like this
| category 1 | category 2 | category 3 ...... | CIP cost | CWIP cost
Additions | Sum(cost) | Sum(cost) | Sum(cost) .......| 1234 | 4500
retirements | Sum(cost) | Sum(cost) | Sum(cost) .......| 1000 | 2500but due to fixed colums in the layout the report builder pushes the fixed colums to the next row with single query i get
| category 1 | category 2 | category 3 ...... |
Additions | Sum(cost) | Sum(cost) | Sum(cost) .......|
CIP cost | CWIP cost
1234 | 4500
retirements | Sum(cost) | Sum(cost) | Sum(cost) .......|
CIP cost | CWIP cost
1000 | 2500if i try to add those columns alone in a seperate query and then build the report i get the layout like this
| category 1 | category 2 | category 3 ...... |
Additions | Sum(cost) | Sum(cost) | Sum(cost) .......|
retirements | Sum(cost) | Sum(cost) | Sum(cost) .......|
CIP cost | CWIP cost
2234 | 7000This is my query, i have used union to get the row-wise column activity
/* Formatted on 03-Sep-12 5:23:11 PM (QP5 v5.114.809.3010) */
SELECT DISTINCT /*ASSET_ID
SUM (cost),
SUM (cip_cost),
SUM (cip_cost_pk),
cat_desc--,sub_cat_desc
,activity
FROM (-- cip cost
SELECT DISTINCT asset_id,
cost,
ytd_deprn,
deprn_amount,
deprn_reserve acc_deprn,
cost - deprn_reserve net_bk_val,
cip_cost,
cip_cost_pk,
description cat_desc,
fat_desc sub_cat_desc,
activity
FROM (SELECT DISTINCT
fb.asset_id,
fb.cost,
facc.cost cip_cost,
0 cip_cost_pk,
ds.ytd_deprn,
ds.deprn_reserve,
fc.description,
fat.description fat_desc,
ds.deprn_amount,
DECODE (
facc.asset_type
|| '-'
|| fc.segment1
|| '-'
|| di.transtype,
'CIP'
|| '-'
|| fc.segment1
|| '-'
|| 'TRANSFER',
'CIP T/F',
'CIP-0012-' || di.transtype,
'Additions Project Khalifa assets',
'CAPITALIZED-' || fc.segment1 || di.transtype,
'0',
'Additions'
activity
FROM fa_books fb,
fa_additions_b fa,
fa_methods fm,
fa_financial_inquiry_cost_v fic,
fa_categories_vl fc,
fa_capitalize_cip_v facc,
fa_additions_tl fat,
fa_deprn_summary ds,
fa_distribution_inquiry_v di
WHERE ds.asset_id = fa.asset_id
AND fb.asset_id = fa.asset_id
AND fb.asset_id = fic.asset_id
AND di.asset_id = fb.asset_id
AND fb.life_in_months = fm.life_in_months
AND fb.book_type_code = ds.book_type_code
AND fb.book_type_code = fic.book_type_code
AND fa.last_update_date >
TO_DATE (
'01'
|| 'JAN'
|| TO_CHAR (SYSDATE, 'RRRR'),
'DD-MON-RRRR'
AND ds.deprn_run_date =
(SELECT DISTINCT MAX (deprn_run_date)
FROM fa_deprn_summary
WHERE asset_id = fb.asset_id)
AND fic.transaction_header_id_in =
(SELECT DISTINCT
MAX (transaction_header_id_in)
FROM fa_financial_inquiry_cost_v
WHERE asset_id = fb.asset_id)
AND fb.date_effective =
(SELECT DISTINCT MAX (date_effective)
FROM fa_books
WHERE asset_id = fb.asset_id)
AND di.transaction_header_id =
(SELECT DISTINCT
MAX (transaction_header_id)
FROM fa_distribution_inquiry_v
WHERE asset_id = fb.asset_id)
AND fa.attribute_category_code =
fc.segment1 || '-' || fc.segment2
AND fc.segment1 <> '0012'
AND fb.asset_id = facc.asset_id
AND fa.asset_id = fat.asset_id
--AND facc.asset_type <> 'CAPITALIZED'
AND fb.deprn_method_code = fm.method_code
AND ds.deprn_source_code <> 'BOOKS'
AND DECODE (
facc.asset_type || '-' || fc.segment1,
'CIP-0012',
'Additions Project Khalifa assets',
'CAPITALIZED-' || fc.segment1,
'0',
'Additions'
) <> '0'/*ORDER BY fb.asset_id*/
UNION
--cip cost pk
SELECT DISTINCT asset_id,
cost,
ytd_deprn,
deprn_amount,
deprn_reserve acc_deprn,
cost - deprn_reserve net_bk_val,
cip_cost,
cip_cost_pk,
description cat_desc,
fat_desc sub_cat_desc,
activity
FROM (SELECT DISTINCT
fb.asset_id,
fb.cost,
0 cip_cost,
facc.cost cip_cost_pk,
ds.ytd_deprn,
ds.deprn_reserve,
fc.description,
fat.description fat_desc,
ds.deprn_amount,
DECODE (
facc.asset_type
|| '-'
|| fc.segment1
|| '-'
|| di.transtype,
'CIP'
|| '-'
|| fc.segment1
|| '-'
|| 'TRANSFER',
'CIP T/F',
'CIP-0012-' || di.transtype,
'Additions Project Khalifa assets',
'CAPITALIZED-' || fc.segment1 || di.transtype,
'0',
'Additions'
activity
FROM fa_books fb,
fa_additions_b fa,
fa_methods fm,
fa_financial_inquiry_cost_v fic,
fa_categories_vl fc,
fa_capitalize_cip_v facc,
fa_additions_tl fat,
fa_deprn_summary ds,
fa_distribution_inquiry_v di
WHERE ds.asset_id = fa.asset_id
AND fb.asset_id = fa.asset_id
AND fb.asset_id = fic.asset_id
AND di.asset_id = fb.asset_id
AND fb.life_in_months = fm.life_in_months
AND fb.book_type_code = ds.book_type_code
AND fb.book_type_code = fic.book_type_code
AND fa.last_update_date >
TO_DATE (
'01'
|| 'JAN'
|| TO_CHAR (SYSDATE, 'RRRR'),
'DD-MON-RRRR'
AND ds.deprn_run_date =
(SELECT DISTINCT MAX (deprn_run_date)
FROM fa_deprn_summary
WHERE asset_id = fb.asset_id)
AND fic.transaction_header_id_in =
(SELECT DISTINCT
MAX (transaction_header_id_in)
FROM fa_financial_inquiry_cost_v
WHERE asset_id = fb.asset_id)
AND fb.date_effective =
(SELECT DISTINCT MAX (date_effective)
FROM fa_books
WHERE asset_id = fb.asset_id)
AND di.transaction_header_id =
(SELECT DISTINCT
MAX (transaction_header_id)
FROM fa_distribution_inquiry_v
WHERE asset_id = fb.asset_id)
AND fa.attribute_category_code =
fc.segment1 || '-' || fc.segment2
AND fc.segment1 = '0012'
AND fb.asset_id = facc.asset_id
AND fa.asset_id = fat.asset_id
--AND facc.asset_type <> 'CAPITALIZED'
AND fb.deprn_method_code = fm.method_code
AND ds.deprn_source_code <> 'BOOKS'
AND DECODE (
facc.asset_type || '-' || fc.segment1,
'CIP-0012',
'Additions Project Khalifa assets',
'CAPITALIZED-' || fc.segment1,
'0',
'Additions'
) <> '0'/*ORDER BY fb.asset_id*/
UNION
-- Disposal / Transferred / Retired
( -- retired
SELECT DISTINCT asset_id,
cost,
ytd_deprn,
deprn_amount,
deprn_reserve acc_deprn,
cost - deprn_reserve net_bk_val,
cip_cost,
cip_cost_pk,
description cat_desc,
fat_desc sub_cat_desc,
activity
FROM (SELECT DISTINCT
fb.asset_id,
fb.cost,
0 cip_cost,
0 cip_cost_pk,
ds.ytd_deprn,
ds.deprn_reserve,
fc.description,
fat.description fat_desc,
ds.deprn_amount,
'Disposal / Transferred / Retired' activity
FROM fa_books fb,
fa_additions_b fa,
fa_methods fm,
fa_financial_inquiry_cost_v fic,
fa_categories_vl fc,
fa_additions_tl fat,
fa_deprn_summary ds,
fa_mass_ext_retirements_v ret
WHERE ds.asset_id = fa.asset_id
AND fb.asset_id = fa.asset_id
AND fb.asset_id = fic.asset_id
AND fb.life_in_months = fm.life_in_months
AND fb.book_type_code = ds.book_type_code
AND fb.book_type_code = fic.book_type_code
AND fa.last_update_date >
TO_DATE (
'01'
|| 'JAN'
|| TO_CHAR (SYSDATE, 'RRRR'),
'DD-MON-RRRR'
AND ds.deprn_run_date =
(SELECT DISTINCT MAX (deprn_run_date)
FROM fa_deprn_summary
WHERE asset_id = fb.asset_id)
AND fic.transaction_header_id_in =
(SELECT DISTINCT
MAX (transaction_header_id_in)
FROM fa_financial_inquiry_cost_v
WHERE asset_id = fb.asset_id)
AND fb.date_effective =
(SELECT DISTINCT MAX (date_effective)
FROM fa_books
WHERE asset_id = fb.asset_id)
AND fa.attribute_category_code =
fc.segment1 || '-' || fc.segment2
AND fb.asset_id = ret.asset_id
AND fa.asset_id = fat.asset_id
AND fb.deprn_method_code = fm.method_code
AND ds.deprn_source_code <> 'BOOKS'/*ORDER BY fb.asset_id*/
UNION
--transfer
SELECT DISTINCT asset_id,
cost,
ytd_deprn,
deprn_amount,
deprn_reserve acc_deprn,
cost - deprn_reserve net_bk_val,
cip_cost,
cip_cost_pk,
description cat_desc,
fat_desc sub_cat_desc,
activity
FROM (SELECT DISTINCT
fb.asset_id,
fb.cost,
facc.cost cip_cost,
0 cip_cost_pk,
ds.ytd_deprn,
ds.deprn_reserve,
fc.description,
fat.description fat_desc,
ds.deprn_amount,
'Disposal / Transferred / Retired' activity
FROM fa_books fb,
fa_additions_b fa,
fa_methods fm,
fa_financial_inquiry_cost_v fic,
fa_categories_vl fc,
fa_capitalize_cip_v facc,
fa_additions_tl fat,
fa_deprn_summary ds,
fa_distribution_inquiry_v di
WHERE ds.asset_id = fa.asset_id
AND fb.asset_id = fa.asset_id
AND fb.asset_id = fic.asset_id
AND di.asset_id = fb.asset_id
AND fb.life_in_months = fm.life_in_months
AND fb.book_type_code = ds.book_type_code
AND fb.book_type_code = fic.book_type_code
AND fa.last_update_date >
TO_DATE (
'01'
|| 'JAN'
|| TO_CHAR (SYSDATE, 'RRRR'),
'DD-MON-RRRR'
AND ds.deprn_run_date =
(SELECT DISTINCT MAX (deprn_run_date)
FROM fa_deprn_summary
WHERE asset_id = fb.asset_id)
AND fic.transaction_header_id_in =
(SELECT DISTINCT
MAX (transaction_header_id_in)
FROM fa_financial_inquiry_cost_v
WHERE asset_id = fb.asset_id)
AND fb.date_effective =
(SELECT DISTINCT MAX (date_effective)
FROM fa_books
WHERE asset_id = fb.asset_id)
AND di.transaction_header_id =
(SELECT DISTINCT
MAX (transaction_header_id)
FROM fa_distribution_inquiry_v
WHERE asset_id = fb.asset_id
AND transtype = 'TRANSFER')
AND fa.attribute_category_code =
fc.segment1 || '-' || fc.segment2
AND fb.asset_id = facc.asset_id
AND fa.asset_id = fat.asset_id
AND facc.asset_type = 'CAPITALIZED'
AND fb.deprn_method_code = fm.method_code
AND ds.deprn_source_code <> 'BOOKS'/*ORDER BY fb.asset_id*/
GROUP BY cat_desc, activity
ORDER BY activityBrgds,
MaxHi all,
I have a matrix report which has dynamic as well as few fixed columns.
It is a fixed asset Report in which the sum(cost) in cell should be grouped according to column and row-wise.
The row consists of the activity such as additions, retirements etc and the dynamic column is the category and other fixed columns such as CIP cost, CWIP cost will be grouped only according to row.
the actual layout should be like this
| category 1 | category 2 | category 3 ...... | CIP cost | CWIP cost
Additions | Sum(cost) | Sum(cost) | Sum(cost) .......| 1234 | 4500
retirements | Sum(cost) | Sum(cost) | Sum(cost) .......| 1000 | 2500but due to fixed colums in the layout the report builder pushes the fixed colums to the next row with single query i get
| category 1 | category 2 | category 3 ...... |
Additions | Sum(cost) | Sum(cost) | Sum(cost) .......|
CIP cost | CWIP cost
1234 | 4500
retirements | Sum(cost) | Sum(cost) | Sum(cost) .......|
CIP cost | CWIP cost
1000 | 2500if i try to add those columns alone in a seperate query and then build the report i get the layout like this
| category 1 | category 2 | category 3 ...... |
Additions | Sum(cost) | Sum(cost) | Sum(cost) .......|
retirements | Sum(cost) | Sum(cost) | Sum(cost) .......|
CIP cost | CWIP cost
2234 | 7000This is my query, i have used union to get the row-wise column activity
/* Formatted on 03-Sep-12 5:23:11 PM (QP5 v5.114.809.3010) */
SELECT DISTINCT /*ASSET_ID
SUM (cost),
SUM (cip_cost),
SUM (cip_cost_pk),
cat_desc--,sub_cat_desc
,activity
FROM (-- cip cost
SELECT DISTINCT asset_id,
cost,
ytd_deprn,
deprn_amount,
deprn_reserve acc_deprn,
cost - deprn_reserve net_bk_val,
cip_cost,
cip_cost_pk,
description cat_desc,
fat_desc sub_cat_desc,
activity
FROM (SELECT DISTINCT
fb.asset_id,
fb.cost,
facc.cost cip_cost,
0 cip_cost_pk,
ds.ytd_deprn,
ds.deprn_reserve,
fc.description,
fat.description fat_desc,
ds.deprn_amount,
DECODE (
facc.asset_type
|| '-'
|| fc.segment1
|| '-'
|| di.transtype,
'CIP'
|| '-'
|| fc.segment1
|| '-'
|| 'TRANSFER',
'CIP T/F',
'CIP-0012-' || di.transtype,
'Additions Project Khalifa assets',
'CAPITALIZED-' || fc.segment1 || di.transtype,
'0',
'Additions'
activity
FROM fa_books fb,
fa_additions_b fa,
fa_methods fm,
fa_financial_inquiry_cost_v fic,
fa_categories_vl fc,
fa_capitalize_cip_v facc,
fa_additions_tl fat,
fa_deprn_summary ds,
fa_distribution_inquiry_v di
WHERE ds.asset_id = fa.asset_id
AND fb.asset_id = fa.asset_id
AND fb.asset_id = fic.asset_id
AND di.asset_id = fb.asset_id
AND fb.life_in_months = fm.life_in_months
AND fb.book_type_code = ds.book_type_code
AND fb.book_type_code = fic.book_type_code
AND fa.last_update_date >
TO_DATE (
'01'
|| 'JAN'
|| TO_CHAR (SYSDATE, 'RRRR'),
'DD-MON-RRRR'
AND ds.deprn_run_date =
(SELECT DISTINCT MAX (deprn_run_date)
FROM fa_deprn_summary
WHERE asset_id = fb.asset_id)
AND fic.transaction_header_id_in =
(SELECT DISTINCT
MAX (transaction_header_id_in)
FROM fa_financial_inquiry_cost_v
WHERE asset_id = fb.asset_id)
AND fb.date_effective =
(SELECT DISTINCT MAX (date_effective)
FROM fa_books
WHERE asset_id = fb.asset_id)
AND di.transaction_header_id =
(SELECT DISTINCT
MAX (transaction_header_id)
FROM fa_distribution_inquiry_v
WHERE asset_id = fb.asset_id)
AND fa.attribute_category_code =
fc.segment1 || '-' || fc.segment2
AND fc.segment1 <> '0012'
AND fb.asset_id = facc.asset_id
AND fa.asset_id = fat.asset_id
--AND facc.asset_type <> 'CAPITALIZED'
AND fb.deprn_method_code = fm.method_code
AND ds.deprn_source_code <> 'BOOKS'
AND DECODE (
facc.asset_type || '-' || fc.segment1,
'CIP-0012',
'Additions Project Khalifa assets',
'CAPITALIZED-' || fc.segment1,
'0',
'Additions'
) <> '0'/*ORDER BY fb.asset_id*/
UNION
--cip cost pk
SELECT DISTINCT asset_id,
cost,
ytd_deprn,
deprn_amount,
deprn_reserve acc_deprn,
cost - deprn_reserve net_bk_val,
cip_cost,
cip_cost_pk,
description cat_desc,
fat_desc sub_cat_desc,
activity
FROM (SELECT DISTINCT
fb.asset_id,
fb.cost,
0 cip_cost,
facc.cost cip_cost_pk,
ds.ytd_deprn,
ds.deprn_reserve,
fc.description,
fat.description fat_desc,
ds.deprn_amount,
DECODE (
facc.asset_type
|| '-'
|| fc.segment1
|| '-'
|| di.transtype,
'CIP'
|| '-'
|| fc.segment1
|| '-'
|| 'TRANSFER',
'CIP T/F',
'CIP-0012-' || di.transtype,
'Additions Project Khalifa assets',
'CAPITALIZED-' || fc.segment1 || di.transtype,
'0',
'Additions'
activity
FROM fa_books fb,
fa_additions_b fa,
fa_methods fm,
fa_financial_inquiry_cost_v fic,
fa_categories_vl fc,
fa_capitalize_cip_v facc,
fa_additions_tl fat,
fa_deprn_summary ds,
fa_distribution_inquiry_v di
WHERE ds.asset_id = fa.asset_id
AND fb.asset_id = fa.asset_id
AND fb.asset_id = fic.asset_id
AND di.asset_id = fb.asset_id
AND fb.life_in_months = fm.life_in_months
AND fb.book_type_code = ds.book_type_code
AND fb.book_type_code = fic.book_type_code
AND fa.last_update_date >
TO_DATE (
'01'
|| 'JAN'
|| TO_CHAR (SYSDATE, 'RRRR'),
'DD-MON-RRRR'
AND ds.deprn_run_date =
(SELECT DISTINCT MAX (deprn_run_date)
FROM fa_deprn_summary
WHERE asset_id = fb.asset_id)
AND fic.transaction_header_id_in =
(SELECT DISTINCT
MAX (transaction_header_id_in)
FROM fa_financial_inquiry_cost_v
WHERE asset_id = fb.asset_id)
AND fb.date_effective =
(SELECT DISTINCT MAX (date_effective)
FROM fa_books
WHERE asset_id = fb.asset_id)
AND di.transaction_header_id =
(SELECT DISTINCT
MAX (transaction_header_id)
FROM fa_distribution_inquiry_v
WHERE asset_id = fb.asset_id)
AND fa.attribute_category_code =
fc.segment1 || '-' || fc.segment2
AND fc.segment1 = '0012'
AND fb.asset_id = facc.asset_id
AND fa.asset_id = fat.asset_id
--AND facc.asset_type <> 'CAPITALIZED'
AND fb.deprn_method_code = fm.method_code
AND ds.deprn_source_code <> 'BOOKS'
AND DECODE (
facc.asset_type || '-' || fc.segment1,
'CIP-0012',
'Additions Project Khalifa assets',
'CAPITALIZED-' || fc.segment1,
'0',
'Additions'
) <> '0'/*ORDER BY fb.asset_id*/
UNION
-- Disposal / Transferred / Retired
( -- retired
SELECT DISTINCT asset_id,
cost,
ytd_deprn,
deprn_amount,
deprn_reserve acc_deprn,
cost - deprn_reserve net_bk_val,
cip_cost,
cip_cost_pk,
description cat_desc,
fat_desc sub_cat_desc,
activity
FROM (SELECT DISTINCT
fb.asset_id,
fb.cost,
0 cip_cost,
0 cip_cost_pk,
ds.ytd_deprn,
ds.deprn_reserve,
fc.description,
fat.description fat_desc,
ds.deprn_amount,
'Disposal / Transferred / Retired' activity
FROM fa_books fb,
fa_additions_b fa,
fa_methods fm,
fa_financial_inquiry_cost_v fic,
fa_categories_vl fc,
fa_additions_tl fat,
fa_deprn_summary ds,
fa_mass_ext_retirements_v ret
WHERE ds.asset_id = fa.asset_id
AND fb.asset_id = fa.asset_id
AND fb.asset_id = fic.asset_id
AND fb.life_in_months = fm.life_in_months
AND fb.book_type_code = ds.book_type_code
AND fb.book_type_code = fic.book_type_code
AND fa.last_update_date >
TO_DATE (
'01'
|| 'JAN'
|| TO_CHAR (SYSDATE, 'RRRR'),
'DD-MON-RRRR'
AND ds.deprn_run_date =
(SELECT DISTINCT MAX (deprn_run_date)
FROM fa_deprn_summary
WHERE asset_id = fb.asset_id)
AND fic.transaction_header_id_in =
(SELECT DISTINCT
MAX (transaction_header_id_in)
FROM fa_financial_inquiry_cost_v
WHERE asset_id = fb.asset_id)
AND fb.date_effective =
(SELECT DISTINCT MAX (date_effective)
FROM fa_books
WHERE asset_id = fb.asset_id)
AND fa.attribute_category_code =
fc.segment1 || '-' || fc.segment2
AND fb.asset_id = ret.asset_id
AND fa.asset_id = fat.asset_id
AND fb.deprn_method_code = fm.method_code
AND ds.deprn_source_code <> 'BOOKS'/*ORDER BY fb.asset_id*/
UNION
--transfer
SELECT DISTINCT asset_id,
cost,
ytd_deprn,
deprn_amount,
deprn_reserve acc_deprn,
cost - deprn_reserve net_bk_val,
cip_cost,
cip_cost_pk,
description cat_desc,
fat_desc sub_cat_desc,
activity
FROM (SELECT DISTINCT
fb.asset_id,
fb.cost,
facc.cost cip_cost,
0 cip_cost_pk,
ds.ytd_deprn,
ds.deprn_reserve,
fc.description,
fat.description fat_desc,
ds.deprn_amount,
'Disposal / Transferred / Retired' activity
FROM fa_books fb,
fa_additions_b fa,
fa_methods fm,
fa_financial_inquiry_cost_v fic,
fa_categories_vl fc,
fa_capitalize_cip_v facc,
fa_additions_tl fat,
fa_deprn_summary ds,
fa_distribution_inquiry_v di
WHERE ds.asset_id = fa.asset_id
AND fb.asset_id = fa.asset_id
AND fb.asset_id = fic.asset_id
AND di.asset_id = fb.asset_id
AND fb.life_in_months = fm.life_in_months
AND fb.book_type_code = ds.book_type_code
AND fb.book_type_code = fic.book_type_code
AND fa.last_update_date >
TO_DATE (
'01'
|| 'JAN'
|| TO_CHAR (SYSDATE, 'RRRR'),
'DD-MON-RRRR'
AND ds.deprn_run_date =
(SELECT DISTINCT MAX (deprn_run_date)
FROM fa_deprn_summary
WHERE asset_id = fb.asset_id)
AND fic.transaction_header_id_in =
(SELECT DISTINCT
MAX (transaction_header_id_in)
FROM fa_financial_inquiry_cost_v
WHERE asset_id = fb.asset_id)
AND fb.date_effective =
(SELECT DISTINCT MAX (date_effective)
FROM fa_books
WHERE asset_id = fb.asset_id)
AND di.transaction_header_id =
(SELECT DISTINCT
MAX (transaction_header_id)
FROM fa_distribution_inquiry_v
WHERE asset_id = fb.asset_id
AND transtype = 'TRANSFER')
AND fa.attribute_category_code =
fc.segment1 || '-' || fc.segment2
AND fb.asset_id = facc.asset_id
AND fa.asset_id = fat.asset_id
AND facc.asset_type = 'CAPITALIZED'
AND fb.deprn_method_code = fm.method_code
AND ds.deprn_source_code <> 'BOOKS'/*ORDER BY fb.asset_id*/
GROUP BY cat_desc, activity
ORDER BY activityBrgds,
Max -
Matrix Report with variable@incontext not working
I had built a matrix report, using variable@incontext. I'm having a problem with my cell data. It seems that it is always using the value from the first record in the column instead of the actual value.
ie in the example below, the data should make it come out like:
Staff____01____02____03______
Bob_____Bob_________Bob
John____John__John___John
Joe_____Joe___Joe____Joe
but it's coming out like this (the data for John is wrong in column1 and 3 and the data for Joe is wrong in all columns) :
Staff____01____02____03______
Bob_____Bob_________Bob
John____Bob___John___Bob
Joe_____Bob___John___Bob
Staff Column(Down):
<?for-each-group:ROWSET2_ROW;./STAFF_NAME?><?variable@incontext:STAFF;STAFF_NAME?>
<?STAFF_NAME?>
Number Column (Across)
<?for-each-group@cell://ROWSET2_ROW;PERIOD?>
<?sort:current-group()/PERIOD;'ascending';data-type='text'?>
<?if:count(current-group()[STAFF_NAME=$STAFF])?><?STAFF_NAME?><?end if?>
<?end for-each-group?>
<?end for-each-group?>
It looks like the value for '$STAFF' and ?STAFF_NAME are not right when there was data in a previous column.
Can anybody Help me?Hi,
Can you please help me to solve the problem.
Thanks in Advance
Adina. -
Group matrix report with an hierarchy table???
Hello,
I have a big trouble making up a report involving many tables and one of them having a many-to-many recursive relationship. The user has a defined request in having the information grouped.I'll give some more details. I would like to know if you have any ideas in how to structure the report..
Here are the tables:
ORG
(org_id not null,
org_name not null)
DNR
(dnr_id not null,
org_id not null,
dnr_age,
dnr_gender)
CS
(cs_id not null,
dnr_id not null)
Smpl
(smpl_id not null,
dnr_id notnull,
org_id,
smpl_tp not null,
cs_id,
meth,
notes)
Tr_map
(tr_id not null,
smpl_prnt not null,
smpl_chld,
pos)
Some data..
Smpl_id Dnr_id Org_id Smpl_tp Cs_id Meth Notes
107 101 137 tss a xxxx
118 112 137 tss ab xxxx
122 108 25 tss 3768 a xxxx
123 108 25 tss 3768 ab xxxx
124 108 25 blk c yyyy
125 108 25 sld d zzzz
126 108 25 blk c yyyy
tr_id Smpl_prnt Smpl_chld Pos
1 107
2 118
3 122
4 123
5 124 122 1
7 125 124 1
8 126 122 1
10 125 126 2
The user wants the data reported as follows:
Org name
Dnr_id, dnr_age etc...
Cs_id
Smpl_id, Smpl_tp (tss), Meth, Notes
Smpl_id,smpl_tp(blk), Meth, Notes ...
Smpl_id, smpl_tp(sld), Meth, Notes...
Cs_id
Smpl_id, Smpl_tp (tss), Meth, Notes
Smpl_id, smpl_tp(blk), Meth,Notes...
Smpl_id, smpl_tp(sld), Meth, Notes...
I think the grouped matrix would be the solution but I don't know how to do that with the hierarchy table to show the children and grandchildren as subgroups. Is that possible in a single query? How can I build a group matrix with multiple subgroups?
Thanks in advance.
simona
nullThe example given by Oracle (from the above link) using the following SQL for a matrix report is flawed.
SELECT DEPTNO, JOB, SUM(SAL)
FROM EMP
GROUP BY DEPTNO, JOB
ORDER BY DEPTNO, JOB
The SUM function handled by the query restricts you from doing so many things - especially when you want the empty fields to be filled by 0 (by using the Value if Null property).
If the query is changed to ''SELECT DEPTNO, JOB, SAL FROM EMP' , and use the SUM function in the wizard to build the Matrix cell, then the 'Value if Null' property can be used without any issues.
This also makes Section 25.6 (Add zeroes in place of blanks) of the documentation a joke.
Anyway, that's my cents worth.... -
Hi All,
How do I generate a report with colum is data and row is date like below, and then generate a chart that show the progress by each day. Thanks so much for your help.
Date 03/17/2006 03/18/2006 03/19/2006 03/20/2006 .........
My Data
Data 1 2 20 3 28
Data 2 3 35 0 0
Data 3 6 88 9 7
Data 4 8 123 100 88
Best Regards,
Andy PhamHi Andy,
In a matrix report, the usual problem with reporting by all the dates in a period is that they may be gaps in dates where there is no data for that day.
Therefore, you will need to have a workaround by having a view with all the possible dates using something like the following SQL.
eg
CREATE VIEW MY_VIEW AS
SELECT (TRUNC(sysdate) -30 + ROWNUM) DATES FROM user_objects WHERE rownum < 31;
You can play around with this SQL to suit your requirements.
In your query for the matrix report, include MY_VIEW to the query and outer join your date column to DATES. ie DATES = your_date_column(+)
Use DATES as a MATRIX column field and it will give you 30 columns. The MATRX row field and MATRIX cell field will be your own data.
One very important thing to note is your date column must be truncated to 0 hours and minutes otherwise you will not get matching records.
Regards,
John -
Matrix report with literals as rows
Hi all,
I have been asked to write a report that lists userids as the columns and literals as the rows and the resulting counts for the cross product.
The data is all coming from a statistics table of transactions by userid and the associated counts for a given day. The resulting report is to replace a manually created Excel spreadsheet. Having never worked with matrix reports I'm having difficulty getting the query to behave as I want.
Here is a brief glimpse of what the user wants;
USER1 USER2 USER3 ...
Issued 1 2 4
Rejected 0 4 2
Salvaged 0 2 3
Thanks for any help. It looks like a matrix report would be perfect for this user request, so any and all suggestions would be appreciated.
Tom VereeckeAssuming 'Issued', 'Rejected' and 'Salvaged' are the fixed and these are the only values showed as rows. And also part of the table. You have to use three unions, something like that
SELECT 'Issued' TranType, UserID, cnt
FROM Table
WHERE TransType = 1
UNION
SELECT 'Rejected', UserID, cnt
FROM Table
WHERE TransType = 2
UNION
SELECT 'Salvaged', UserID, cnt
FROM Table
WHERE TransType = 3
Run Report wizard and select Matrix report.
'TransType' will be Row Field.
'UserID' will be Column Field.
and 'Cnt' will be Cell Field.
Hope this helps. -
Calculate percentage between two rows in a matrix report with a single row group in SSRS 2008
I need your help. I have a matrix report in ssrs 2008. The report contain one field value column and one value column. I need to calculate a percentage for two values. For example : row 1 : Discount 10 Row 2 : Sales 100 Result : 10/100. I have only one
row group, I need to have a condition where Field = Discount % on Revenue then Discount/Total Turnover. Because of the grouping for total, I am not being able to calculate the %, its just totalling the % discount. Kindly refer to the snapshot of the
report.Hi Thanks a lot for your answer, but unfortunately it didn't work,the report is reading from a stored procedure which I have unpivot to convert all columns into rows, so that's why Discount % on Revenue, Discount and Total Turnover is found in one column.
So the Field!Col.Value is the Discount % on Revenue, Discount and Total Turnover. I have tried to change the code to
"=SUM(IIF(Fields!Col.Value = "Discount",Fields!value.Value),0))
/IIF(SUM(IIF(Fields!Col.Value = "Turnover Total",Fields!value.Value),0)) = 0 ,
Nothing,SUM(IIF(Fields!Col.Value = "Turnover Total",Fields!value.Value),0)))" but to no avail. Any other suggestion will be most welcome.
Thanks.
If everything you're getting from stored procedure then you need to calculate and bring the value from there itself.
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
Matrix report with row field as "dates of months"
Hi all,
I have a matrix report that requires such a format:
Some database column -->
1 cell cell cell cell
2 null null null null
3
4
31 cell
now i cannot get the dates of the month in order of 1 to 31'st as column, if i give my database column datefield the records which are on following date are displayed but for the dates which dont have records, the cell fields should be null..
How would i do this.
Regards,
Sreekanth.Hi all,
I have a matrix report that requires such a format:
Some database column -->
1 cell cell cell cell
2 null null null null
3
4
31 cell
now i cannot get the dates of the month in order of 1 to 31'st as column, if i give my database column datefield the records which are on following date are displayed but for the dates which dont have records, the cell fields should be null..
How would i do this.
Regards,
Sreekanth. -
Hello ,
I created a matrix report , Outer join is using in query ,so couldn't fill "0" to blank ammount column , please help me
Query is :-
SELECT
nvl(AAMT,0) AAMT,
nvl(AHRS,0) AHRS,
JOBNUM JOBNO,
B.USERCCM,
B.CCMNAME
FROM
(SELECT SUM(ACTAMT) AAMT,
SUM(ACTHRS) AHRS,
JOBNUM,
CCM,
DEPTCODE FROM
(SELECT SUM( ACTAMT) ACTAMT,
SUM(ACTHRS) ACTHRS,
JOBNUM,
CCM,
DEPTCODE
FROM CSBUDTIM
WHERE DEPTCODE=:DEPTCOD AND
JOBNUM BETWEEN :JOBNUM AND :JOBNUM1 AND
TRDATE BETWEEN :FROMDATE AND :TODATE
GROUP BY JOBNUM,CCM,DEPTCODE
UNION ALL
SELECT SUM( ACTAMT) ACTAMT,
SUM(ACTHRS) ACTHRS,
JOBNUM,
CCM,
DEPTCODE
FROM CSBUDETM
WHERE DEPTCODE=:DEPTCOD AND
JOBNUM BETWEEN :JOBNUM AND :JOBNUM1 AND
TRDATE BETWEEN :FROMDATE AND :TODATE
GROUP BY JOBNUM,CCM,DEPTCODE
UNION ALL
SELECT SUM(ACTAMT) ACTAMT,
0 ACTHRS,
JOBNUM,
NVL(CCM,'DM') CCM,
DEPTCODE
FROM CSBUDMAT
WHERE DEPTCODE=:DEPTCOD AND
JOBNUM BETWEEN :JOBNUM AND :JOBNUM1 AND
TRDATE BETWEEN :FROMDATE AND :TODATE
GROUP BY JOBNUM,CCM,DEPTCODE)
GROUP BY JOBNUM,CCM,DEPTCODE) A ,
CSPGMCCM B
WHERE B.DEPTCODE = A.DEPTCODE(+) AND
B.USERCCM = A.CCM(+) and
B.DEPTCODE = :DEPTCOD
ORDER BY A.JOBNUM,B.USERCCM
--------------------------------------------------------------------------------Hay Thahir,
Can u plz tell me the solution -
User wants report with Vendor Line Item detail
Greetings Experts,
we have users who want a report similar to FBl1N, but instead displaying the line level detail.
For Example:
User wants to see information for Vendor X. Wants the output not to be the 31 & 21 posting keys, but rather all the 40 and 50 posting keys for these documents. Is there an existing report which will show me this?
What the user really wants is to start with a Vendor, Company Code, As of Dates and see all the accounting document details, all the way down to the delivery details in a tabular format. Does SAP provide anything like this without any drilldowns, or am I gonna have to code this thing from scratch?
Thanks for the helpNo, not in a standard report, especially at the level of detail you're looking for. It's a typical auditor request to see the 'other-side' G/L items but you won't find it in a standard menu report and certainly not with the delivery detail.
-
Interactive Report With No Column Heading
Is it possible to display a column with no heading (label) in an interactive report ?
I have tried to delete the column heading and save, but when I run the report,
it is still there
Cheers
GusGus,
Try a space character or &nbsp;
Vikram
Maybe you are looking for
-
Lately Firefox does not load on my Vista--especially since update 18 happened. It shows that Firefox is running in the task manager but the page doesn't come up. This is every time I try to start the browser. It runs once I can get it to come up--but
-
Need MEMO ActiveX that works with Forms5.0
Has anyone embedded a memo activeX in their Forms application? I have been looking for a control that has all the typical properties of a memo text control i.e. word wrapping etc but sofar the ones that I have tried do not work properly. The main pro
-
Sun Cluster Core Conflict - on SUN Java install
Hi We had a prototype cluster that we were playing with over two nodes. We decided to uninstall the cluster by putting node into single user mode and running scinstall -r. Afterwards we found that the Java Availability Suite was a little messed up -
-
How to design one of these.
Hi i am not exactly sure how or what was used to create this (http://www.cybergamer.com.au/pc/) slideshow with navigation buttons( i assume they used flash profesionnal or some other flash program). I just recently purchased cs5 design premium and am
-
Soon to be college student, looking for info as to which computer I need.
Hi! I will be a freshman in the fall. First off I have heard AMAZING things about the MacBook Pro, (and honestly I'm leaning toward it), but I am scared because this is my money we're talking about, and boy am I short on it! This computer would need