On Matrix..
Hi experts,
I've created a form through screenpainter. The form has a matrix item. The matrix have 3 combo box columns and 1 edittext column.
Question
1. I've added ValidValues to the 1st combo boxes throgh the xml. The valid values have a paired value, description parameters. I would like the 2 other combo boxes having only a single value(non-paired) but i'm having a hard time on how to do it. How can this be done?
2. I will be traversing a matrix cells contents which later i will be saving it on a UDT. The matrix is not bound to the UDT. I would like for your approach guide for this scenario.
Thank you in advance.
Manuel
Hi Manuel,
1) Unfortunately, the valid values must always have a value and description (and you can't have more than one blank description). The best you can do is to set the value and the description parameters to the same value.
2) If your UDT is a non-object UDT (ie not a UDO) then you have 2 options to write data to it. The preferred method is to use the UserTables object in the DI API. This has all the methods and properties to insert and update records in a UDT. The alternative approach is to use the Recordset object to insert records using a SQL statement (this is allowed because a non-object UDT is not a system table). Even if the matrix is bound to the UDT via a DBDataSource, you would still need to use one of the options above because a DBDataSource does not save the data back to the table automatically unless your UDT is registered as a UDO.
Kind Regards,
Owen
Similar Messages
-
Xml matrix report not expending horizontally
hi guys m trying to develop xml matrix report but m totally stuck.value are not expanding vertically.
RTF tags are here.Plz tell me how can i attach rtf and xml file with this post so you people can help me in better way.
plz help me its very urgent
<?for-each:G_1?>
<?ITEM_CATEGORY?>
Organization : <?horizontal-break-table:1?>
<?for-each-group@cell: G_ITEM_CATEGORY; ORGANIZATION_CODE?>
<? ORGANIZATION_CODE?>
<?end for-each-group?>
<?for-each-group: G_ITEM_CATEGORY;ITEM_CODE?> <?ITEM_CODE?>
<?for-each-group@cell:current-group();ORGANIZATION_CODE ?>
<?current-group()// AMOUNT?>
<?end for-each-group?>
<?end for-each-group?>
<?end for-each-group?>When you say "the values are not expanding vertically" do you mean that on the printed report it is not returning all the values for a given field, i.e. the field is too small to display the entire value.... OR the repeating frame for the group is not expanding enough to display all the fields???
-
SSRS 2008 - Expression for totals in a Matrix
Hi,
I have a simple Matrix with the following groups:
Row Group: Program
Column Group: Employee
I need to add a new total column on the right side of the matrix using a simple calculation but I haven't been able to find how to do that other than doing it on the query side. Here's how the Matrix looks like:
Program
Employee1
Employee2
Employee3
New Column
Program1
45.0%
0.0%
87.5%
Program2
12.5%
50.0%
3.8%
Program3
28.8%
1.3%
8.7%
Program4
1.3%
23.8%
0.0%
Total
87.6%
75.1%
100.0%
The new column should display the sum of each program divided by the sum of all totals....for example for Program1 the calculation should be (45+0+87.5)/(87.6+75.1+100) which should be equal 50.44% ...the same logic applies for the other
rows.
The number of columns (Employees) and rows (Programs) are dynamic, so they change according to who is seeing the report. I'm unable to reference the sum of the total at the bottom row, not sure what I am missing.
Any input on this is greatly appreciated.Hi Cleber,
I have tested on my local environment and your issue can be caused by you haven't include the scope in the sum function, please find details information below about how to do the calculation:
Please design the matrix like below:
You can find the Row Group name is "Program" and the Column Group name is "Empolyee", this will include in the sum expression as below:
Expression1: =SUM(Fields!Amount.Value,"Empolyee")
Expression2: =SUM(Fields!Amount.Value,"Program")
Expression2: =Sum(Fields!Amount.Value,"Program")/Sum(Fields!Amount.Value,"DataSet1")
Preview you will got the result like below:
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
If you have any feedback on our support, please click
here.
Vicky Liu
TechNet Community Support -
Please help. I have a matrix report. In the report I have row group PO Type. One the Column groups I have a parent group by Fiscal Year, and then a child group by Month. When I run the report, I get two years of data back broken
out by month. Please see below.
Now here is where I am getting stuck. I need to take the variance between the current month of the current year, from the same month of the prior year. So I need to show the difference between Oct , 2014 from Oct, 2013. November, 2014 from November
2013... etc. etc.
In the example below, how do I create a column or row showing the variance for Contracts for October 2014. I need to take the contracts for October 2014 which is 3 and subtract that from October 2013 which is 8. Any suggestions? How do I do that
for each month? Then I need to do it for the quarter... then the year? But I'll be happy if I can just get the month working first.
Any help will be appreciated.
here is what my rdl file looks like.
Here is what my report looks like when I render it.Hi Adrian_s2012,
According to your description, you want to compare values for the month of current year with the month of prior year and get the variance. Right?
In Reporting Services, we don't have any function to get this "Year to Year" Growth. In this scenario, if you data source is a cube, we suggest you use Analysis Services to achieve your requirement. If this data source is just from database, it will be hardly
to calculate the variance because we need to compare the values within every two different column group and matrix generate adjacent columns one by one. Even we make it by using custom, every time executing the long code when generating result
in a cell will reduce a lot of performance, we really don't suggest to do that in SSRS. Here is a thread with much easier requirement, please take a reference of that:
http://social.msdn.microsoft.com/Forums/office/en-US/842e2dcb-d949-4297-9d91-eac989692cb5/difference-between-the-grouped-column?forum=sqlreportingservices
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
SSRS - Expression to color column value dynamically in Matrix
Hi ,
I have a matrix which looks like :
The <<Expr>> value can be 1 /0 /"-" .
The Expr value is being calculated dynamically.
The data set query I am using has a column called due_days.
In the color expression of the <<Exp>> box I am using the expression as :
=IIf(Fields!Due_Days.Value>14 and Fields!Notes_Count.Value>0,"Blue",(Iif(Sum(Fields!Notes_Count.Value)=0 ,"Red","Black")))
My requirement is if the Due_Days column value is >14 then I need to highlight the value as blue else black and if value is 0 then red. When I use the above query it is just highlighting the color blue for 1st column only. Eg: 4th row . Due days for month
of Oct and Nov is > 14 but it shows blue only for month of oct.
How can i resolve the issue?In select query i have 5 columns:
Due days(Which is difference between 2 dates) ,
Notes count (Which is just a count of notes entered or not having value 0/1 and value '-' if another column CRD is greater than the matrix month and year.)Eg: below date 11/12/2014 is greater than Oct 2014 hence Oct 2014 should have "-"
Month Name , Year , Month Nbr (last 6 months which I cross joined with the table to get counts for each month)
The matrix has year and last 6 month as column groups
Color coding should be if notes count is 0 then red ,if notes count is 1 and due_days> 14 then blue else black . When i try to use expression for color as i mentioned above, it colors only 1st colum.eg: 2nd row
Nov 2014 is blue but for jan 2014 also it should show blue as due days>14 .
Is there any way i can do that ??
Eg: data set returns value as :
Due Days CRD Month
Month_Nbr Year Notes _Count
5 2014-11-28 00:00:00.000 December 12 2014
0
5 2014-11-28 00:00:00.000 February 2 2015
0
5 2014-11-28 00:00:00.000 January 1 2015
0
5 2014-11-28 00:00:00.000 November 11 2014 1
5 2014-11-28 00:00:00.000 October 10 2014 0
5 2014-11-28 00:00:00.000 September 9 2014 0
Matrix is of the form :
YEAR
MONTH
CRD Notes_count -
How to Delete a Specific Cell in a Matrix + plz Give sample code for Lost F
hello there !!!!
i m in Great Trouble please help me out..
i have to search for a specific Column n then i have to validate that portion, similarly after validating i have to add update delete all the fuction apply... so please help me i m very upset.
Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
Try
Dim Count As Int32
If FormUID.Equals("Allowance") Then
If (pVal.BeforeAction = True) And (pVal.ItemUID = "1") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
If pVal.Row = 0 Then
'BubbleEvent = False
End If
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
Count = o_Matrix.RowCount()
SBO_Application1.MessageBox("Matrix Count is " & o_Matrix.RowCount)
Validate(pVal, EventEnum, FormUID, BubbleEvent)
End If
End If
Catch ex As Exception
SBO_Application1.MessageBox(ex.Message)
End Try
End Sub
Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
Dim Row, ii As Integer
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
o_Matrix.FlushToDataSource()
Try
For Row = 2 To o_Matrix.RowCount
StrName = Convert.ToString(DBtable.GetValue("CardCode", Row - 1)).Trim()''' i got Error over there n rest of my code is also not working pls...
StrUId = Convert.ToString(DBtable.GetValue("U_AlwID", Row - 1)).Trim()
StrEnter = Convert.ToString(DBtable.GetValue("U_SupEnter", Row - 1)).Trim()
StrExist = Convert.ToString(DBtable.GetValue("U_SupExist", Row - 1)).Trim()
If Row - 1 < DBtable.Rows.Count - 1 Or (Not (StrName.Equals(String.Empty) And StrUId.Equals(String.Empty) And (StrEnter.Equals(String.Empty) Or StrExist.Equals(String.Empty))) And (Row - 1 = DBtable.Rows.Count - 1)) Then
If (Not StrName.Equals(String.Empty)) And ((StrUId.Equals(String.Empty) Or StrEnter.Equals(String.Empty)) Or StrExist.Trim.Equals(String.Empty)) Then
SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
BubbleEvent = False
Exit Sub
End If
For ii = Row To DBtable.Rows.Count - 1
If Convert.ToString(DBtable.GetValue("ColName", ii)).Trim().Equals(StrName.Trim()) Then
SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Duplication Not Allowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
BubbleEvent = False
Exit Sub
End If
Next
If CDbl(StrName) < 0 Then
SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
BubbleEvent = False
Exit Sub
End If
End If
Next Row
Catch ex As Exception
SBO_Application1.MessageBox(ex.Message)
End Try
End SubHello there
sir i want to Add Update and delete these three basic operation onto the Matrix, Sir u game me a Sample code of Delete a specific Column...
Sir can u do me a favour pls leave every thing n just told me how to update a matrix ,like i have to fill the matrix field through the DATABASE table now i want to update the DataBase table from the matrix..
i just only know thta i have to fill back database table with the help of FLUSHTODATABASE()
here is my Sample Code...n i have to update in the validate portion...
Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
Try
Dim oCellValue As SAPbouiCOM.EditText
If FormUID.Equals("Allowance") Then
If (pVal.ItemUID = "MatAllow") Then
If pVal.Row = 0 Then Exit Sub
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
If (pVal.Row > o_Matrix.RowCount) Then Exit Sub
oForm = SBO_Application1.Forms.Item(FormUID)
If (pVal.ItemUID = "1" Or EventEnum = SAPbouiCOM.BoEventTypes.et_CLICK) Then
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
If pVal.ColUID = "ColName" And pVal.BeforeAction = True Then
If pVal.Row = 0 Then Exit Sub
oCellValue = CType(o_Matrix.Columns.Item(pVal.ColUID).Cells.Item(pVal.Row).Specific(), SAPbouiCOM.EditText)
If (oCellValue.Value.Trim().Equals(String.Empty) And o_Matrix.RowCount <> pVal.Row) Then
SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Blank Value Not Allowed", )
oCellValue.Active = True
BubbleEvent = False
Exit Sub
End If
End If
End If
End If
End If
Validate(pVal, EventEnum, FormUID, BubbleEvent)
Catch ex As Exception
SBO_Application1.MessageBox(ex.Message)
End Try
End Sub
Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
Dim str, str1 As String
Dim checkbox1, Checkbox2 As SAPbouiCOM.CheckBox
Dim o_Matrix As SAPbouiCOM.Matrix
Dim Sum As Integer
Dim oRecordset As SAPbobsCOM.Recordset
Dim Container As Integer
Dim Count As Int32
o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
oRecordset = o_CompanyObj.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
Try
For Count = 0 To DBtable.Rows.Count - 1
CodeFill = Convert.ToString(DBtable.GetValue("Name", Count).Trme())
NameID = Convert.ToString(DBtable.GetValue("ColUID", Count).Trim())
Price = Convert.ToString(DBtable.GetValue("ColPrice", Count).Trim())
Quantity = Convert.ToString(DBtable.GetValue("ColQuant", Count).Trim())
Total = Convert.ToString(DBtable.GetValue("ColTotal", Count).Trim())
checkbox1 = o_Matrix.Columns.Item("ColSEnter").Cells.Item(Count).Specific
Checkbox2 = o_Matrix.Columns.Item("ColSExist").Cells.Item(Count).Specific
If (checkbox1.Checked = True) And (Checkbox2.Checked = True) Then
Dim Sql As String
Sql = "Update [@Supplier] Set U_Price=' " & Price & " ',U_ID=" & NameID & "Where Name ='" & CodeFill & " '"
oRecordset.DoQuery(Sql)
End If
Next Count
SBO_Application1.MessageBox("Record was Updated")
Catch ex As Exception
SBO_Application1.MessageBox(ex.Message)
End Try
End Sub -
Assign a matrix to a JTable? Possible?
OK. I will not know the incomming data matrix untill it is assigned. Is there anyway to put the following matrix into a JTable without a headache? All I see are examples of Object class variables assigned to JTables. If anyone knows how to make this work I will appreciate it very much. Here is what I have come up with as an idea:
String[][] originalDMatrix;
// Assigned String Matrix.
if(Program.printDataMatrix.isSelected()) {
originalDMatrix = new String[Program.matrix.length][];
for(int i = 0; i < Program.matrix.length; i++) {
originalDMatrix[i] = new String[Program.matrix.length];
for (int j = 0; j < Program.matrix[i].length; j++) {
originalDMatrix[i][j] = Program.matrix[i][j];
// Create the table and give it the matrix THIS IS WHERE IT WONT WORK.
final JTable originalDMatrixT = new JTable(originalDMatrix);
[/code[
ERROR OUTPUT:
cannot resolve symbol
symbol : constructor JTable (java.lang.String[][])
location: class javax.swing.JTable
final JTable originalDMatrixT = new JTable(originalDMatrix);
^
1 error
Errors compiling Results.Changing to strings gave same result but with Object:
symbol : constructor JTable (java.lang.Object[][])
location: class javax.swing.JTable
final JTable originalDMatrixT = new JTable(originalDMatrix);
^
1 error -
Event dead loop in updating column value of a matrix
Hi,
I need to do some auto calculation in a matrix. In my matrix, i have column A and B. If user enter a value in column A and leave the column then my add-on will do some calculation and assign a new value to column B, same thing on column B. In my event filtering, i use
"pVal.FormType == xxx && pVal.ItemUID == "xx" && pVal.ColUID == "U_xx" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_LOST_FOCUS && !pVal.BeforeAction"
to capture the event. But then my add-on enter into a dead loop. It seems when i write a value to column B in column A event it will trigger LOST_FOCUS event in column B and then it trigger same event of column A, and then it enters into a dead loop. In SAP B1 client, i can see the two columns start refreshing endlessly.
Apparently, when assigning a value into a column B during event of column A, it will trigger LOST_FOCUS event of column B. That's the only reason i strongly suspect that. Is there any one know the solution for my situation?
Thanks,
Lan
P.S. i first get the object of the textbox in the matrix, and use "oEditText.value = new_value" to assign the value.
Edited by: ZHANGLAN on Jul 8, 2010 2:26 AMHi
Why didn't you try the Validate event instead of Lost focus. That is pretty easy for such calculations.
"pVal.FormType == xxx && pVal.ItemUID == "xx" && pVal.ColUID == "U_xx" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_Validate && !pVal.BeforeAction"
Thanks
Anoop -
DateField not getting copy in the matrix using Datasource & Datatable
Hello All,
I have tried to copy data From Purchase Order Tables to my own created User Defined Form matrix columns using DBDatasource & Datatables ,Instead of Document Date all other data are getting copied but that document date field is not
getting the data plus it is not showing any error message as such.
Following is the code which i have written :-
=====================================
oPurchase_Amend.DataSources.DataTables.Add("oMatrixDT" )
oPurchase_Amend.DataSources.DataTables.Item("oMatrixDT" ).Clear()
Dim sSQL As String = "SELECT T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[Price],(Select InvntryUoM From OITM Where ItemCode=T1.ItemCode) as 'UoM',T1.LineNum,T0.DocNum as 'FrmDate' FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[DocNum] ='1' and T0.CardCode='C0001'
oPurchase_Amend.DataSources.DataTables.Item("oMatrixDT" ).ExecuteQuery(sSQL)
oMatrix = oPurchase_Amend.Items.Item("mtx_0").Specific
oMatrix.Clear()
Dim oDBDataSource As SAPbouiCOM.DBDataSource = oPurchase_Amend.DataSources.DBDataSources.Item("@OSL_POAMD")
Dim oDataTable As SAPbouiCOM.DataTable = oPurchase_Amend.DataSources.DataTables.Item("oMatrixDT" )
oDBDataSource.Clear()
For row As Integer = 0 To oDataTable.Rows.Count - 1
Dim offset As Integer = oDBDataSource.Size
oDBDataSource.InsertRecord(row)
oDBDataSource.SetValue("U_ItemCode", offset, oDataTable.GetValue("ItemCode", row).ToString())
oDBDataSource.SetValue("U_ItemName", offset, oDataTable.GetValue("Dscription", row).ToString())
oDBDataSource.SetValue("U_UoM", offset, oDataTable.GetValue("UoM", row).ToString())
oDBDataSource.SetValue("U_OldQty", offset, oDataTable.GetValue("Quantity", row).ToString())
oDBDataSource.SetValue("U_OldRate", offset, oDataTable.GetValue("Price", row).ToString())
> Line For Copying Document Date Data to the matrix datasource
oDBDataSource.SetValue("U_OldDate", offset, oDataTable.GetValue("FrmDate", row))
oDBDataSource.SetValue("U_LineId", offset, oDataTable.GetValue("LineNum", row))
Next
'--- Rebinding the datasource to the matrix columns -
oMatrix.Columns.Item("col_0").DataBind.SetBound(True, "@OSL_POAMD", "U_ItemCode")
oMatrix.Columns.Item("col_1").DataBind.SetBound(True, "@OSL_POAMD", "U_ItemName")
oMatrix.Columns.Item("col_3").DataBind.SetBound(True, "@OSL_POAMD", "U_OldQty")
oMatrix.Columns.Item("col_5").DataBind.SetBound(True, "@OSL_POAMD", "U_OldRate")
oMatrix.Columns.Item("col_7").DataBind.SetBound(True, "@OSL_POAMD", "U_OldDate")
oMatrix.Columns.Item("col_9").DataBind.SetBound(True, "@OSL_POAMD", "U_LineId")
oMatrix.LoadFromDataSource()
But i am not able to get the document date in the column of the matrix .
Please suggest what changes i have to meke in this code to get the desired output.
Thanks & Regards,
Amit
Edited by: AmitSharma_061985 on Dec 17, 2009 12:24 PMHi Michael,
FrmDate is the Document date of the purchase order which i am fetching through sql query and trying to copy that in the matrix
through datasource .
Edited by: AmitSharma_061985 on Dec 18, 2009 7:07 AM -
Hello how are you?
I really really need your help.
I have an aleatory number of squared pictures (ex: 4x4 of 6x6, or 10x10, etc) that may change everytime.
These files together become a "big picture".
What I want is an action to photoshop make a collage respecting the number of rows and collumns.
So, row 1 would have: Picture 1.png in collum 1; picture 2.png in collum 2
than row 2 would have: picture 3.png in collum 1; picture 4.png in collum 2
How can I do that?
Can I make an action that if I settle the matrix size, photoshop can take all the pictures from one folder and fulfill that matrix?
Thank you so much!
L2berzinsHello! I cannot believe I could have all these help in such a short time, you guys are amazing!!!
I am really a beginner, so yall are my photoshop guides! So I am sorry if I have so many questions.
What I am looking for is much much more simple than what i have been reading from you guys.
I am a beginner and i don't know what I am doing.
I saw the script, thank you, but First of all (and most important):
how do I save the script?
where do I save the script?
and how do i run the script?
So, hands on:
I went to your web page, I thought I was the only one in the world trying to do this crazy thing, so I was releived that I could have some help.
I saw that your final result is a poster that have 4 collums x 14 lines, with no border and no spacing.
I work in an orphanage and I have a folder 4x4 (640 pixels x 640 pixels) pictures in alphabetic order
What I want is:
a square poster, that the number os lines is equal the number of collumns.
I will receive a folder with images that all of them are either .jpg or .png, in alphabetic order, 640 pixels x 640 pixels.
What I DONT WANT is:
Neither of the pictures cannot have any alteration (size, resolution, dpi, colors, etc)
No border and no spacing
I CANNOT be aleatory, it has to follow the alphabetic order
I dont want them to be in different layers
I dont want to use alpha channels
I just want the square shape, pictures to be side by side, in alphabetic order, like in your example
If my folder have pictures from zero to 15, the final poster with 4 collumns x 4 rows would be:
picture0.jpg picture1.jpg picture2.jpg picture3.ppg
picutre4.jpg picture5.jpg picture6.jpg picture 7.jpg
picture8.jpg picture9.jpg picture10.jpg picture11.jpg
picture12.jpg picture13.jpg picture14.jpg picture15.jpg
Can this be a simple action?
Thank you all so much,
[ unreadable colors removed by admin ] -
Urgent HELP required on forming the Matrix of data using PL/SQL
Hi All,
I'm new to this thread and require your urgent help in this regard.
I've got a requirement for building a 5000 X 5000 matrix using PL/SQL. My original data tables have 5000 rows each and I need to do a correlation analysis using this data and need to store in a physical table and not in-memory. Is this feat achievable using mere PL/SQL? I understand that Oracle DB has a limitation of 1000 columns(but not sure) and hence I'd like to know whether there is any work-around for such scenarios. If not, what are the other alternative method(s) to achieve this feat? Do I need to use any 3rd party tools to get this done? An early reply from the experts is highly appreciated.
Thanking you all Gurus in advance.
Rgds
SaiWelcome to OTN!
I'll get to your quesiton in a moment, but first some welcome information. Many OTN posters consider it impolite to mark threads as "urgent". We are volunteers and have jobs of our own to do without people we don't know making demands. You are brand new and deserve some patience but please understand this. It is very likely before I finish this post someone will complain about the word "urgent" in your subject.
On to more interesting things :)
You can do the matrix, but are out of luck with a 5000 x 5000 table because Oracle only allows 1000 columns per table. There are ways to work around this.
How do do the matrix depends on what you want to do. You can do this different ways. You can create a table beforehand and use PL/SQL or simple SQL to populate it, or use the CREATE TABLE AS syntax to create and populate it in one step if you can get the underlying SQL to work the way you want, something like
create table my_table as
select a.*, b.*
from table1 a, table2 bcan populate a matrix from 2 tables with an intentional cartesian join (the WHERE clause was left out intentionally, provided your data is already in the data base.
If not you can use a PL/SQL routine to populate the data.
There are a couple of ways to solve the 1000 column limit. The easiest way might be to have 5 collections of 1000 columns each. A more complicated but more elegant soltion would be to have nested collections, allowing 2 colliections that you can loop through - a collection of collections. Nested collections can be hard to work with. A third way would be to use nested tables in the database but I personally do not like them and the insert, update, and delete statements for nested tables are hard to use.
I'm not going to give a code example because I am not sure which solution is best for you. If you have further questions post them. -
Urgent help required in creating matrix table report
Hi
I need a report in the below format with subtotal and total and custom order of columns and rows. I tried in using grouping and conditional region format but i am not getting the exact result.
product2 product 1 product 3 Total
Asia
India 10 20 30 60
Europe
london 20 30 40 90
Germany 30 40 50 120
Europe total 50 70 90 210
Full total 60 90 120 270
india,london,germany in field region
product 1, product2 product3 in field sales
measures in total amount field
I tried to use the pivot table but their no option for total and custom ordering for rows and columns and i am not getting the exact format. Please suggest me a method or procedure to get exact result as shown above.
Thanks and regards
sandy
Edited by: user2989722 on Mar 31, 2010 11:45 PMhi
I am attaching my xml please help me out in creating a matrix report.
<?xml version="1.0" encoding="UTF-8" ?>
- <ROWSET>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 1 [0 - .15]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>2307.165535041</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.475123902700634</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>30.2162475006637</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>1632.57338858</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>422.436554415462</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 10 (10 - 20]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>17137.13228197</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.405705629282986</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>207.096250125078</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>5783.36069429</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>26.7447698210976</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 11 (20 - 100]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>176.01654684</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.507714108946292</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>281.219317996251</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>6.35288644</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>33.5503479625902</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 12 Default</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>4701.426500882</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.448602202841554</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>100.000000024971</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>722.25731111</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>17.1137302584326</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 4 (.35 - .5]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>20075.347155131</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.435471063386539</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>65.043256695741</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>19214.33530761</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>39.8394919447153</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 6 (.75 - 1.35]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>55148.040085827</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.406837969201374</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>90.9915692969898</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>35168.28645631</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>24.2323573228287</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 7 (1.35 - 2.5]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>80782.306502494</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.401398105436061</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>104.939383907255</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>29327.09937088</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>64.5404944514989</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 9 (5.5 - 10]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>19918.353466582</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.403197283094678</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>145.38568228759</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>6968.38716055</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>22.4602872356297</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>1.Wholesale</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD3 (.25 - .35]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>4659.00625848</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.437222745016593</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>49.7763165044685</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>6328.43285318</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>56.9420433188724</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 1 [0 - .15]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>92099.47315523</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.49290316215652</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>8.1614679611239</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>40865.81313468</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.490255140986887</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 10 (10 - 20]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>5978.77892414</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.462986581515473</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>236.956154182651</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>38.17433944</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.220028397461449</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 11 (20 - 100]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>7996.70429901</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.487633014729318</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>211.059294848823</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>67.39087733</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.262386150656619</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 12 Default</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>5680.79501712</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.364996338745224</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>100.000000120142</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>9.44825003</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.274957460858617</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 2 (.15 - .25]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>18412.32474058</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.565813759474568</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>22.0959615585123</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>3375.14793919</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.31511224146282</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 4 (.35 - .5]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>8998.50534758</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.564193157888767</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>38.7032364619711</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>742.52198983</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.259162668085142</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 5 (.5 - .75]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>8566.81402593</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.551881376840796</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>49.4634096178362</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>404.85624382</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>2.51892931053278</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 6 (.75 - 1.35]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>10002.21838595</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.530272891319008</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>66.6791470811157</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>404.88147998</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.212464766871609</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 7 (1.35 - 2.5]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>10005.26092357</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.500044162824778</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>93.5636951722772</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>-490.56397567</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>46.4764541038698</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 8 (2.5 - 5.5]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>11226.21172151</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.468571958403512</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>131.927474849119</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>110.85147102</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.214124061873538</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD 9 (5.5 - 10]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>5963.41956141</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.466066773663567</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>185.088689160792</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>51.01957931</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.224693875694723</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
- <ROW>
<_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>2.Residential Mortgage</_FCT_NON_SEC_EXP_20090331_._Line_of_Business_>
<_FCT_NON_SEC_EXP_20090331_._PD_Range_>PD3 (.25 - .35]%</_FCT_NON_SEC_EXP_20090331_._PD_Range_>
<_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>9956.41682925</_FCT_NON_SEC_EXP_20090331_._Total_exp_amount____1000000>
<_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>0.55994575388673</_FCT_NON_SEC_EXP_20090331_._Weighted_Average_LGD_>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>29.9353533062809</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_RW_>
<_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>1216.31690239</_FCT_NON_SEC_EXP_20090331_._Undrawn_Commitments__m_____1000000>
<_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>0.28824424910818</_FCT_NON_SEC_EXP_20090331_._Exposure_Weighted_Avg_EAD____1000000>
</ROW>
> -
Matrix-like PKs based on three optional IN-constrained strings?
Hello,
I have a DB of actions that I want to represent. I want to model a number of actions as you know them from classic GUIs:
open
openFile
saveAs
exportToDirectory
reverseEngineerFromDatabase
As I analyzed the problem, I came to the conclusion, the keys above (which they ultimately are) have at least three parts:
1. an action: VARCHAR(20) CHECK (action IN ('open', 'save', 'export', 'reverseEngineer', ...))
2. a preposition: VARCHAR(4) CHECK (preposition IN ('as', 'to', 'from', ...))
3. a target: VARCHAR(20) CHECK (target IN ('file', 'directory', 'database', ...))
So the rule to construct the final key would be:
<action> + <preposition> + <target>
to model all sorts of combinations/permutations (forget about uppercasing the preposition and target if there for a moment).
As you can see from the strings, I have three dimensions of predefined values from which I construct the final key. Not every combination is possible, I want to represent valid combinations by an extra table having entries like:
INSERT INTO ValidActions ('open', '', '')
INSERT INTO ValidActions ('open', '', 'file')
INSERT INTO ValidActions ('save', 'as')
INSERT INTO ValidActions ('export', 'to', 'directory')
INSERT INTO ValidActions ('reverseEngineer', 'from', 'database')
My question is now:
How do I solve this, given that the PK is composed of ... PRIMARY KEY (action, preposition, target) ... and that an action has an OPTIONAL preposition and target? I have not come to a final decision, but I might relax the action to be optional, too, and then demand that either <action> OR <target> MUST be set.
How do I model matrix-like composed PKs consisting of a number of optionals? I currently see no other way of adding empty strings '' to the check constraint, however AFAIK Oracle does not make a difference between NULL and the empty string ''. How would such a solution look like?
I could use the final string as PK, but how do I make sure that string consists of the predefined ones only?
Karsten
PS: note action and target are actually two separate tables.What about using a model like this? I used surrogate keys because I wasn't sure if the ACTION, PREPOSITION and TARGET values were truly immutable. You could easily remove these from the model and use the respective columns as the PK for each table.
DROP TABLE ACT_PRE_TAR;
DROP TABLE ACTIONS;
CREATE TABLE ACTIONS
ACTION_ID NUMBER PRIMARY KEY
, ACTION VARCHAR2(15) NOT NULL
, CONSTRAINT ACTION#UNQ UNIQUE (ACTION)
INSERT INTO ACTIONS VALUES(1,'open');
INSERT INTO ACTIONS VALUES(2,'save');
INSERT INTO ACTIONS VALUES(3,'export');
INSERT INTO ACTIONS VALUES(4,'reverseEngineer');
DROP TABLE PREPOSITIONS;
CREATE TABLE PREPOSITIONS
PREPOSITION_ID NUMBER PRIMARY KEY
, PREPOSITION VARCHAR2(10) NOT NULL
, CONSTRAINT PREPOSITION#UNQ UNIQUE (PREPOSITION)
INSERT INTO PREPOSITIONS VALUES (1,'as');
INSERT INTO PREPOSITIONS VALUES (2,'to');
INSERT INTO PREPOSITIONS VALUES (3,'from');
DROP TABLE TARGETS;
CREATE TABLE TARGETS
TARGET_ID NUMBER PRIMARY KEY
, TARGET VARCHAR2(10) NOT NULL
, CONSTRAINT TARGETS#UNQ UNIQUE (TARGET)
INSERT INTO TARGETS VALUES (1,'file');
INSERT INTO TARGETS VALUES (2,'directory');
INSERT INTO TARGETS VALUES (3,'database');
CREATE TABLE ACT_PRE_TAR
ACTION_ID NUMBER REFERENCES ACTIONS(ACTION_ID)
, PREPOSITION_ID NUMBER REFERENCES PREPOSITIONS(PREPOSITION_ID)
, TARGET_ID NUMBER REFERENCES TARGETS(TARGET_ID)
, CONSTRAINT ACT_PRE_TAR#UNQ UNIQUE (ACTION_ID, PREPOSITION_ID, TARGET_ID)
);Based on your sample data the following result is produced:
SQL> SELECT ACTION
2 , PREPOSITION
3 , TARGET
4 FROM ACT_PRE_TAR
5 LEFT OUTER JOIN ACTIONS ON ACTIONS.ACTION_ID = ACT_PRE_TAR.ACTION_ID
6 LEFT OUTER JOIN PREPOSITIONS ON PREPOSITIONS.PREPOSITION_ID = ACT_PRE_TAR.PREPOSITION_ID
7 LEFT OUTER JOIN TARGETS ON TARGETS.TARGET_ID = ACT_PRE_TAR.TARGET_ID
8 /
ACTION PREPOSITIO TARGET
open
open file
save as
export to directory
reverseEngineer from database -
Can you help me to solve this matrix filling problem?
Hi,
I need to fill a matrix column. this is the description briefly.
1.This is my binding
oForm.DataSources.UserDataSources.Add("usr_col5", SAPbouiCOM.BoDataType.dt_DATE, 50);
oColumn = oColumns.Add("Col5", SAPbouiCOM.BoFormItemTypes.it_EDIT);
oColumn.Description = "Konteringsdato";
oColumn.TitleObject.Caption = "Konteringsdato";
oColumn.DataBind.SetBound(true, "", "usr_col5");
oColumn.Width = 89;
oColumn.Editable = false;
2.I am going to fill this column using record set's field. all of the other column's fillings are ok.but problem is here
oForm.DataSources.UserDataSources.Item("usr_col5").Value = oRs.Fields.Item("DocDate").Value.ToString();
I think there should be a casting instead of of using ToString(). But i couldn't able to do it. So please help me.Hi,
you can try once to set
((SAPbouiCOM.EditText)((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxItemUID").Specific)).Columns.Item("Col5").Cells.Item(cellnumber).Specific).String = oRs.Fields.Item("DocDate").Value.ToString();
or
((SAPbouiCOM.EditText)((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxItemUID").Specific)).Columns.Item("Col5").Cells.Item(cellnumber).Specific).Value = oRs.Fields.Item("DocDate").Value.ToString();
regards
David -
Display data to matrix using LoadFromDataSource
Hello all,
I tried to display data to matrix.
I used matrix object's LoadFromDatasouce.
But it didn't display data at all.
Pls help me!!
creationPackage.ObjectType = "EVOSS_BUSTR"
creationPackage.UniqueID = "TEST
creationPackage.FormType = "TEST"
creationPackage.BorderStyle = SAPbouiCOM.BoFormTypes.ft_Fixed
Set oForm = SBO_Application.Forms.AddEx(creationPackage)
sTableName = "@EVOSS_BUSTR"
oForm.Title = sTitle
oForm.Height = 300
oForm.Width = 350
oForm.DataSources.DBDataSources.Add ("sTableName")
Set oItem = oForm.Items.Add("1", it_BUTTON)
oItem.Left = 5
oItem.Width = 65
oItem.Top = 240
oItem.Height = 19
Set oButton = oItem.Specific
oButton.Type = bt_Caption
Set oItem = oForm.Items.Add("2", it_BUTTON)
oItem.Left = 75
oItem.Width = 65
oItem.Top = 240
oItem.Height = 19
Set oButton = oItem.Specific
oButton.Type = bt_Caption
'Adding a matrix
Set oItem = oForm.Items.Add("TEST, it_MATRIX)
oItem.Left = 5
oItem.Width = 340
oItem.Top = 10
oItem.Height = 200
oItem.AffectsFormMode = True
Set oMatrix = oItem.Specific
Set oColumns = oMatrix.Columns
'Adding col 1
Set oColumn = oColumns.Add("ColNb", it_EDIT)
oColumn.TitleObject.Caption = "#"
oColumn.Width = 20
oColumn.Editable = False
'oColumn.DataBind.SetBound True, "", "#"
'Adding col 2
Set oColumn = oColumns.Add("EVOSS_Code", it_EDIT)
oColumn.TitleObject.Caption = "Code"
oColumn.Width = 80
oColumn.Editable = True
oColumn.DataBind.SetBound True, sTableName, "Code"
'Adding col 3
Set oColumn = oColumns.Add("EVOSS_Name", it_EDIT)
oColumn.TitleObject.Caption = "Name"
oColumn.Width = 220
oColumn.Editable = True
oColumn.DataBind.SetBound True, sTableName, "Name"
oMatrix.AddRow
Set oColumn = oMatrix.Columns.Item("EVOSS_Code")
Set eItemCode = oColumn.Cells.Item(1).Specific
' oForm.Mode = fm_FIND_MODE
' oForm.DataBrowser.BrowseBy = "EVOSS_Code"
'oMatrix.SelectionMode = ms_None
oForm.Visible = True
add_line = True
oMatrix.LoadFromDataSourceHello.
For load a data to a matrix you need call a Query method of the dbdatasource to obtain data from the database.
By. -
How to create a Matrix table using this data in SQL Query Analyzer
Hello all,
I have a problem while I am trying to represent my Sql Table namely table1 in Matrix form
my table Format is
city1 city2 Distance--------------------------------------------------------
Mumbai Delhi 100
Delhi Banaras 50
Mumbai Rajasthan 70
Banaras haryana 40
Mumbai Mumbai 0
784 entries
there are 784 cities each having link to other
Now i want my output as
Mumbai Delhi Banaras haryana
Mumbai 0 100 -- --
Delhi 100 0 50 --
Banaras
haryana
respective distance from one city to other should be shown
final Matrix would be 784*784
I am using SQL Query Analyser for this
Please help me in this regardI'm pretty much certain that you don't want to do this in pure SQL. So that means that you want to do it with a reporting tool. I'm not familiar with SQL Query Analyzer, but if it is in fact a reporting tool you'll want to consult its documentation looking for the terms "pivot" or perhaps "cross tab."
Maybe you are looking for
-
How to send pages brochure as an email
I made a really nice Pages brochure and now I want to send it to clients in an email. I'd rather not have it there as a file... I'd rather they get the email and see the beautiful brochure, right there in the email. Is there a way to do this? I tr
-
Passing multiple parameters in sql query
Hi All, This may not be the correct place to post this. How to pass multiple paramters to a variable in sql developer. Ex: Select * from Country where state= :statename (Country is table name, state is column name) If I execute the above query in SQL
-
Hi, Some knows what is the last state of having an UISplitviewcontroller in an UITabbarController? Has any one any app with an UISplitViewController in a UITabBarController already in AppStore? I'm still finding in the documentation, that the UISplit
-
Faulting application name: AcroRd32.exe, version: 11.0.0.379, time stamp: 0x505fd19e Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000 Exception code: 0xc0000005 Fault offset: 0x5d69273f Faulting process id: 0xd64 Faulting app
-
HT1338 How do I upgrade from OS 10.5.8 to the most current version
Under "about this mac" it says I'm using OS 10.5.8, but when I click on "software update" it says that I'm all up to date. How do I get the latest OS?