Combobox column in a user matrix
hi!
I've a user matrix in a user form whith 2 ComboBox columns. I've just filled these whith their values and descriptions. But, when the addon is running, if i select a value in a combo cell, it doesn't appear in the cell!
I explain myself: i load the form, i click on the combo column (1st row), i click on a value from the combo list, the list is closed but the cell is still empty! Why?
Please help me,
thanks
Giuseppe
that's ok!
I have to add an UserDataSource!
Now it run well
Similar Messages
-
Image in column header of user matrix
Hi,
does anybody know how i can show an image in the column header of a matrix. I'm using a user matrix.
thanks for help.
Markus1. SBO 2004 will not allow this action. The Header Column item is a EditBox type and you can not override this directly.
2. What you can do is "paste" an image item on the column header (using Screenpainter). This will allow you to display a picture. You must just make sure the form can't be resized OR "move" the image item when the column is moved about.
This - to my knowledge - is your only option. -
Adding custom column to a user matrix
Hi all
I have a little problem
When i create my matrix i add columns according to how many ship to's i have
from there if i have 3 ship to's three columns are created with the shipto Name as the title.
My problem is
The ship to itself length is > 10 characters then my program crashes and says
INVALID length string cannot surpass 10 characters.
I know this has to do with the datasources the thing is the datsource are useally created AFTER the matrix is created. So i cannot define a length for the column BEFORE the matrix is created because i get a null reference
My question is is there a way without datasources or with to set the colmun length
and when i say length i do not mean size. ( i actually mean how many characters this column can accept)
Thanks looking forword to your answers!Hi
To answer your Question
Here is the order in which i create a MATRIX
1) Create Form
2) Add Matrix with columns
3) Create Datasources for Matrix columns
Now according to what you said i can very well do it at step 3 the problem is
my columns are Filled at step 2. on creation of the Matrix before the datasources are instantiated.
I am wondering if there is a way to instantiate my datasource BEFORE creating my column
The other way of fixing this problem is changing my code which at this point is the last option.
Thanks for any help sorry i was not clear. -
I want to make matrix with combobox column, it is not dificulte, but did somebody know is it posible with different values in each cell?
first row ( 0, Zero ), ( 1, One )
second row ( 0, Zero ), (2, Two ), (6, Six)
third row ( 0, Zero), (1, One )
.... ( Value, Description )
I make something but all cell's have the same set of pair (Value, Description )
P.S. Sorry for my englishHi Andy,
I have been playing around with this for a while now and (seeing that Ibai actually already gave you a solution) I'm just gonna post where I am up to now. I have a matrix with two columns on it (c_1 and c_2). c_1 holds the value 1, 2 or 3. Whenever the user clicks on c_2 I repopulate the combo box according to the value selected in c_1. The only problem is that it shows the second last selected row and not the one that is currently selected. I am just posting it here so it can maybe someday put someone onto the right track.
If pVal.FormTypeEx = "MainForm" Then
If pVal.ItemUID = "m_List" Then 'Matrix
If pVal.ColUID = "c_2" Then 'Column 2
If pVal.BeforeAction = False Then
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_GOT_FOCUS Then
Dim oForm As SAPbouiCOM.Form
Dim oEdit As SAPbouiCOM.EditText
Dim oCombo As SAPbouiCOM.ComboBox
Dim oMatrix As SAPbouiCOM.Matrix
Dim oCol As SAPbouiCOM.Column
Dim i As Integer
oForm = oApplication.Forms.ActiveForm
oMatrix = oForm.Items.Item("m_List").Specific
oCol = oMatrix.Columns.Item("c_1")
oEdit = oCol.Cells.Item(pVal.Row).Specific
oCol = oMatrix.Columns.Item("c_2")
oCombo = oCol.Cells.Item(pVal.Row).Specific
For i = oCombo.ValidValues.Count - 1 To 0 Step -1
oCombo.ValidValues.Remove(i, SAPbouiCOM.BoSearchKey.psk_Index)
Next
If oEdit.Value = "1" Then
oCombo.ValidValues.Add("1", "One")
ElseIf oEdit.Value = "2" Then
oCombo.ValidValues.Add("2", "Two")
oCombo.ValidValues.Add("22", "TwoTwo")
ElseIf oEdit.Value = "3" Then
oCombo.ValidValues.Add("3", "Three")
oCombo.ValidValues.Add("33", "ThreeThree")
oCombo.ValidValues.Add("333", "ThreeThreeThree")
End If
End If
End If
End If
End If
End If
Hope it helps,
Adele
PS: Ibai, why do you have a new user name? You are the same Ibai Peña right? -
Hi all,
I am considering moving from a matrix to a grid
a. How do I assign valid values to a grid combobox column?
b. Does the grid support all matrix features (link button, etc)?
best,
AsherHi Chris,
Here is my code:
// Data table:
DataTable dataTable = testForm.DataSources.DataTables.Add("aaa");
dataTable.ExecuteQuery("SELECT * FROM [@AAA]");
// Grid:
Item gridItem = testForm.Items.Add("grd", BoFormItemTypes.it_GRID);
gridItem.Width = 450;
gridItem.Height = 300;
Grid grid = (Grid)gridItem.Specific;
grid.DataTable = dataTable;
// Columns:
GridColumn textColumn = grid.Columns.Item(2);
((EditTextColumn) textColumn).LinkedObjectType = "4";
GridColumn comboColumn = grid.Columns.Item(0);
comboColumn.Type = BoGridColumnType.gct_ComboBox;
((ComboBoxColumn) comboColumn).ValidValues.Add("3", "3");
This code fails on the last line with this exception:
Unable to cast COM object of type 'SAPbouiCOM.GridColumnClass' to interface type 'SAPbouiCOM.ComboBoxColumn'.
Any ideas?
Asher
P.S.
The link works fine. Thanks. -
Hello,
i have to add a column to a non-user matrix in sbo 2005. To achieve this i have to clear the matrix first. After this it is possible to add the column. Now i want to refill the matrix with the old values. Is there any possibility to do this?
Thank you in advance.Hello,
The only way is to call AddRows again (or e.g. in A/R or A/P programmatically launch the item select dialog etc. etc.) and to fill in the data via the particular Specifics of the cells - as necessary; please note that when you enter e.g. the item code other columns will be filled automatically...:
You will need to figure out exactly which cells you need to change + you will need to handle issues like the case that the user has chosen to hide some cell that would need to be filled (or has set it to read-only...)
I.e. you must be extremely careful when using this trick - and I would really try to avoid using it!
Frank -
Hey All,
If the user clicks on a column header in a user matrix is there a quick way of sorting that data accordingly? I understand that the developer has to do this manually.
Does anyone have a code example of how to do this?
I cannot find any in the forums, samples or help files.
I use this code to populate my matrix:
oDBDataSource.Query(oConditions);
this.OMatrix.LoadFromDataSource();
Thanks.Hi Laura,
You have another message talking about how to sort a matrix:
Re: Sort data in matrix using DBDataSources
The only think you have to do is put this code inside the ItemEvent DoubleClick on the first column of your matrix. Then you have to sort your datas depending on the column clicked.
Regards
Trinidad. -
How to Set column value in SO matrix , if the column is not visible.
Hi,
We are trying to set value in to a column from sales order matrix with the below mentioned code
((SAPbouiCOM.EditText)oMat.Columns.Item("U_TWBS_AC_BaseEntry").Cells.Item(pVal.Row).Specific).String
it will throw an u201CForm Item is not editable u201C error if the column ("U_TWBS_AC_BaseEntry") visible is set to false through form settings.
how can we solve the issue,can we use any DI object in order to reset the form settings.
Thanks & RegardsHi
Try and make the column visible then set the value and make it invisible then
Hope this helps
Regards
Vivek -
How to get fourthly row (row4) first column value (col1) in matrix
Hi to all,
In FMS, how to get fourthly row (row4) first column value (col1) in matrix in document.
select $[$38.1.4]
But it display the first row
Please give me hint.
Thank youHi Eric,
FMS may only apply to current row. There is no way to get any other fixed row.
Thanks,
Gordon -
Forum FAQ: How do I achieve column break in a matrix?
Symptom
Although you can set page break for column group in Reporting Services 2008, page breaks are ignored on column groups. Reference:
http://msdn.microsoft.com/en-us/library/ms156434.aspx
Solution
Here are some workarounds, available forboth Reporting Services 2005 and2008:
Workaround 1
Spread the columns from one matrix into several matrixes. You can first copy one matrix and then paste it into several ones you want. Then set the filter for each column group to make sure that the total columns’ length in one matrix just fit a page’s width.
Workaround 2
The other method is to use a custom code.
a. Please copy the following code to the custom code area:
Dim FlagTable As System.Collections.Hashtable
Dim Flag AS Integer
Function MyFunc(ByVal NewValue As Object) As Integer
If (FlagTable Is Nothing) Then
FlagTable = New System.Collections.Hashtable
End If
If (NewValue Is Nothing) Then
NewValue = "-"
End If
If (Not FlagTable .Contains(NewValue )) Then
Flag =Flag + 1
FlagTable.Add(NewValue, nothing)
End If
MyFunc = Flag
End Function
b. Create a list in your report.
Imagine thatthe column group of a matrix is grouped bythe field ‘Column_Group’, then set the detail group of list withthe expression like this:
=Ceiling(Code.MyFunc(Fields!Column_Group.Value)/5)
Note: This means the Max number of column in matrix will be five after you follow step C.
c. Sort the dataset by column group field, and then drag the matrix into the list. Click Preview.
Workaround 3
Similar to the second method, you need to modify the dataset.
a. Create an ID column for the column group in your dataset.
For example,there isa datasetwith the following query:
SELECT * FROM Table
The column group is grouped on the field “Group1”.Then, modify the query like this:
SELECT *, Dense_Rank()OVER(order by Group1) AS ID FROM Table
b. Create a list in your report, set the detail group of the list with the Expression like this:
=Ceiling(Fields!ID.Value/5)
Note: This meansthat the Max number of column in matrix will be five after you followthe step C.
c. Sort the dataset bythe column group and then drag the matrix into the list. Click Preview.I have near about 30 matrics. so I need a paging. I did every thing as per this post and it really works for me.
I have total four columns. On one page it should show three and the remaining one will be moved to next page.
Problem occurs when in my first row i have 3 columns and in next page if I have one columns then it show proper on first page but on second page also it gives me three columns insted of one. the first column data is exactly what I have but in remaining two
columns it shows some garbage data.
I have data like below.
Metric ColumnNo RowNo
1 1
1
2 2
1
3 3
1
4 1
2
so while grouping i have a row parent group on RowNo and Column group on ColumnNo.
can anyone please advice on this. -
I can't import a table contains BLOB column from one user to another user.
1) I create two user both have connect role,and each has its own tablespace, DDL:
create user d2zd identified by d2zd default tablespace d2zd quota unlimited on d2zd account unlock;
grant connect to d2zd;
create user d3zd identified by d3zd default tablespace d3zd quota unlimited on d3zd account unlock;
grant connect to d3zd;
2)Then enter oracle as d2zd and create a table contains BLOB column and insert data to the table.
3) export d2zd as follow:
exp d2zd/d2zd file=d2zd.dmp
4) import to d3zd as follow:
imp d3zd/d3zd fromuser=d2zd touser=d3zd file=d2zd.dmp
the question is the table with BOLB colum can't be import,
it says:have no privilege on tablespace d2zd.
How can I import a table contains BLOB column from one user to another user?Hi - the reason for as our friend already told ist that a blob can be stored outside of the table segment, in another Tablespace, This is for performance reason.
Sou you would need to have Quota on two tablespaces.
the one which holds the table segment the other which holds the blob(segment).
Regards
Carl
Message was edited by:
kreitsch -
Is it possible to add a column to the Item matrix in the ItemLookup form (C
Hi,
Is it possible to add a column to the Item matrix in the ItemLookup form (CFL or Find Lookup).
I need to display a value in the newly added column if the itemgroup in that row matches a certain value , how can I achieve this.
ThanksHi,
You may check this: Can we add CFL to the system/form defined textbox?
Please close your previous open thread.
Thanks,
Gordon -
How to avoid Flickaring When Adding data in Addon User Matrix
Experts,
I am Adding Query Result in User Matrix one by one. but there is lots of Flicker.
how to Avoid this Flickering.
Bomiitems = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
If Bomtyp = "U" And BomNo = "0" Then
BOMItem = "SELECT Distinct T0.[Code], T1.[ItemName] , ( 1 / Isnull(T2.[Qauntity],0))* Isnull((T0.[Quantity]),0),('" & Quanti & "'/ Isnull(T2.[Qauntity],0))* Isnull((T0.[Quantity]),0) as "
BOMItem = BOMItem + " 'Quanti',T1.[Excisable],'N' as U_Rec , T1.[InvntryUom],T0.[Warehouse] 'Warehouse',T0.[IssueMthd]'IssMthd' FROM ITT1 T0 INNER JOIN OITM T1 "
BOMItem = BOMItem + " ON T0.Code = T1.ItemCode INNER JOIN OITT T2 ON T0.Father = T2.Code "
BOMItem = BOMItem + " WHERE T0.[Father] ='" & Icode & "'"
Bomiitems.DoQuery(BOMItem)
ElseIf Bomtyp = "U" And BomNo <> "0" Then
'BOMItem = "SELECT T0.[Code], T1.[ItemName] , ((T0.[Quantity]/ T2.[Qauntity])*'" & Quanti & "') as 'Quanti',T1.[Excisable],'N' as U_Rec FROM ITT1 T0 INNER JOIN OITM T1 ON T0.Code = T1.ItemCode INNER JOIN OITT T2 ON T0.Father = T2.Code WHERE T0.[Father] ='" & Icode & "'"
BOMItem = "SELECT T1.[U_Icode], T1.[U_IName],(1 / Isnull(Cast( T0.[U_Bqty] as Float) ,0)) * Isnull(Cast(T1.[U_Quanti] As Float),0) ,('" & Quanti & "' / Isnull(Cast( T0.[U_Bqty] as Float) ,0)) * Isnull(Cast(T1.[U_Quanti] As Float),0) as 'Quanti',T2.[Excisable], T0.[U_Rec],T2.[InvntryUom] ,T1.[U_Whs] 'Warehouse','B' AS 'IssMthd' "
BOMItem = BOMItem + "FROM [dbo].[@OITTA] T0 inner join [dbo].[@ITTA1] "
BOMItem = BOMItem + "T1 on t0.cODE = t1.Code INNER JOIN OITM T2 ON T1.[U_Icode] = T2.[ItemCode]"
BOMItem = BOMItem + " WHERE T0.[U_Icode] = '" & Icode & "' AND T0.[U_AltBom] ='" & BomNo & "' AND T0.U_Btyp = 'U' "
Bomiitems.DoQuery(BOMItem)
ElseIf Bomtyp = "P" Then
BOMItem = "SELECT T1.[U_Icode], T1.[U_IName],(1 / Isnull(Cast( T0.[U_Bqty] as Float) ,0)) * Isnull(Cast(T1.[U_Quanti] As Float),0),('" & Quanti & "' / Isnull(Cast( T0.[U_Bqty] as Float) ,0)) * Isnull(Cast(T1.[U_Quanti] As Float),0) as 'Quanti',T2.[Excisable], T0.[U_Rec] ,T2.[InvntryUom],T1.[U_Whs] 'Warehouse','B' AS 'IssMthd' "
BOMItem = BOMItem + "FROM [dbo].[@OITTA] T0 inner join [dbo].[@ITTA1] "
BOMItem = BOMItem + "T1 on t0.cODE = t1.Code INNER JOIN OITM T2 ON T1.[U_Icode] = T2.[ItemCode]"
BOMItem = BOMItem + " WHERE T0.[U_Icode] = '" & Icode & "' AND T0.[U_AltBom] ='" & BomNo & "' AND T0.U_Btyp = 'P' "
Bomiitems.DoQuery(BOMItem)
End If
Bomiitems.DoQuery(BOMItem)
If Bomiitems.RecordCount > 0 Then
'RecCount1 = RecSet1.RecordCount
Bomiitems.MoveFirst()
i = 0
'osubForm .Freeze(True)
oMatrix = oForm.Items.Item("1000001").Specific
oMatrix.FlushToDataSource()
While Not (Bomiitems.EoF)
If i = 0 Then
oMatrix.AddRow()
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("LineId", 0, i + 1)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemCode", 0, Bomiitems.Fields.Item(0).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemName", 0, Bomiitems.Fields.Item(1).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_BaseQty", 0, Bomiitems.Fields.Item(2).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PlanQty", 0, Bomiitems.Fields.Item(3).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IssueQty", 0, Bomiitems.Fields.Item(3).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whs", 0, Bomiitems.Fields.Item("Warehouse").Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IsueType", 0, Bomiitems.Fields.Item("IssMthd").Value)
Dim orsWhsDetails As SAPbobsCOM.Recordset
Dim strWhsDetails As String
orsWhsDetails = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
strWhsDetails = "SELECT T0.[OnHand], T0.[IsCommited], T0.[OnOrder],T1.[OnHand] FROM OITW T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[ItemCode] ='" & Bomiitems.Fields.Item(0).Value & "' AND T0.[WhsCode] ='" & Bomiitems.Fields.Item("Warehouse").Value & "' "
orsWhsDetails.DoQuery(strWhsDetails)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whsestk", 0, orsWhsDetails.Fields.Item(0).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_AVILSTK", 0, (orsWhsDetails.Fields.Item(0).Value - Bomiitems.Fields.Item(3).Value))
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PLANTSTK", 0, orsWhsDetails.Fields.Item(3).Value)
oMatrix.LoadFromDataSource()
Else
oMatrix.FlushToDataSource()
oForm.DataSources.DBDataSources.Item("@TPROD1").InsertRecord(i)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("LineId", i, i + 1)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemCode", i, Bomiitems.Fields.Item(0).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_ItemName", i, Bomiitems.Fields.Item(1).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_BaseQty", i, Bomiitems.Fields.Item(2).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PlanQty", i, Bomiitems.Fields.Item(3).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IssueQty", i, Bomiitems.Fields.Item(3).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whs", i, Bomiitems.Fields.Item("Warehouse").Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_IsueType", i, Bomiitems.Fields.Item("IssMthd").Value)
Dim orsWhsDetails As SAPbobsCOM.Recordset
Dim strWhsDetails As String
orsWhsDetails = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
strWhsDetails = "SELECT T0.[OnHand], T0.[IsCommited], T0.[OnOrder],T1.[OnHand] FROM OITW T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[ItemCode] ='" & Bomiitems.Fields.Item(0).Value & "' AND T0.[WhsCode] ='" & Bomiitems.Fields.Item("Warehouse").Value & "' "
orsWhsDetails.DoQuery(strWhsDetails)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_Whsestk", i, orsWhsDetails.Fields.Item(0).Value)
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_AVILSTK", i, (orsWhsDetails.Fields.Item(0).Value - Bomiitems.Fields.Item(3).Value))
oForm.DataSources.DBDataSources.Item("@TPROD1").SetValue("U_PLANTSTK", i, orsWhsDetails.Fields.Item(3).Value)
oMatrix.LoadFromDataSource()
End If
i = i + 1
Bomiitems.MoveNext()
oMatrix.LoadFromDataSource()
End While
oMatrix.LoadFromDataSource()
End If
Regards,
Pravin Bajifollow steps
1) Execute query so we can get data set
2) Clear matrix and data source (omatrix.clear(), oDBS.Clear())
3) Open loop
4) Insert record to oDBS using oDBS.InsertRecords(oDBS.Offset)
5) Then set value using oDBS.Setvalue(u2026u2026
6) Move next record
7) Finally close the loop
8) Matrix load from record set using oMatrix.LoadfromData()
it will be work -
Hi guys,
I created a report of some quality test results containing table with nested matrix for details. I need the
sub-matrix to be grouped by row and by
column and limit the number of result columns in row (to fit the width of report neatly). I went trough the articles about doing column group break already:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/32f28407-e1ca-457e-92fd-d292e32dde4e/limit-no-of-columns-in-ssrs-matrix-report?forum=sqlreportingservices
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/ea9d795b-8d17-41d2-a1d7-a4069ebb4539/forum-faq-how-do-i-achieve-column-break-in-a-matrix?forum=sqlreportingservices (I have used the 2nd workaround)
My solution without the column count limit feature works perfectly. But when trying to break, the report seems to associate the column groups related to another parent table row, because the number of result grouped columns in row is
less or equal to the set number (=4) as follows:
Test type Test
A A1
Parameter A1-1 A1-2 A1-3 A1-4 // OK - break made after 4 columns of A1
Min x x x x
Max y y y y
Measured z z z z
Parameter A1-5 A1-6 // OK - break made after test type A1 (?Bug cause: "column count 2 for now")
Min x x
Max y y
Measured z z
A2
Parameter A2-1 // OK - break made after test type A2 (?Bug cause: "column count 3 for now")
Min x
Max y
Measured z
B B1
Parameter B1-1 // Not OK - break already made after 1st column (?Bug cause: "column count 4 for now:"=>BREAK)
Min x
Max y
Measured z
Parameter B1-2 B1-3 B1-4 // OK - break made after test type B1
Min x x x
Max y y y
Measured z z z
C C1
Parameter C1-1 C1-2 C1-3 C1-4 // OK - break made after 4 columns of C1
Min x x x x
Max y y y y
Measured z z z z
Parameter C1-5 C1-6 // OK - break made after test type C1
Min x x
Max y y
Measured z z
I have modified the proposed function script for my purposes - set the reset of ID counter in the header of parent row test, set the column ID as concatenation of all level values (test type, test and watched parameter), played with ordering
of data and extra grouping, but with no success.
Does anybody have a suggestion what is going on and how to solve this issue?
Thanks,
Marion
PS: I'm sorry for the table illustration (done the best that I could). As a newbie I'm not allowed to post with picture.
Edit: Do you need some extra information to help? Does somebody have an idea how to achieve the same design with column break some other way?Hi,
The column break needs to reset when it starts a new row grouping. The customer code therefore needs parameters for the row grouping and for the column grouping.
The code below is slightly different to a lot of examples.
Creating hashtables would keep a record of every column value, so for large reports, this would use a small but significant amount of memory. It only needs to know when it changes. I've also used static variables as the scope only needs to be
the function and not global, plus this makes it a single module of code which helps on larger projects.
The ceiling calculation has been replaced with some integer maths to prevent odd rounding issues that cause hard to trace/reproduce bugs. E.G. a 4 column should be 4-4-4-4-4 but 16 /4 should be 4 but might be
4.000000000000001. Ceilling then returns 5 so you end up with a column jumping to the next line :- 4-3-5-4-4.
Note that everything that used to calculate the row grouping should be concatenated as a single parameter for the most robust solution. In the example the sub group is unique for the entire dataset so is not an issue, but if a sub group is only unique
in the group, there is a small change of a miscalculation.
Here's my solution:
In the code
Function GroupFunction(
ByVal NewGroup as string ,
ByVal NewColumn as string ,
ByVal ColumnBreak as Integer ) As Integer
static OldGroup as string = ""
static OldColumn as string = ""
static RecordCount as integer = 0
if (OldGroup <> NewGroup ) then
OldGroup = NewGroup
OldColumn = ""
RecordCount = RecordCount + ( ColumnBreak - RecordCount Mod ColumnBreak )
end if
if (OldColumn <> NewColumn) then
OldColumn = NewColumn
RecordCount = RecordCount +1
end if
GroupFunction =RecordCount +
( ColumnBreak - (RecordCount - 1) Mod ColumnBreak )
End Function
In the report
= Code.GroupFunction( Fields!MainGroup.Value & ":" & Fields!SubGroup.Value , Fields!Parameter.Value , 4 )
If you want a different number of columns, you can change the 4 to a report parameter.
Output
A
A1
Value Type
A1-01
A1-02
A1-03
A1-04
Max
2
5
8
11
Measured
3
6
9
12
Min
1
4
7
10
Value Type
A1-05
A1-06
A1-07
A1-08
Max
14
1
1
1
Measured
15
1
1
1
Min
13
16
1
1
Value Type
A1-09
A1-10
Max
1
1
Measured
1
1
Min
1
1
A
A2
Value Type
A2-01
Max
1
Measured
1
Min
1
B
B1
Value Type
B1-01
B1-02
B1-03
B1-04
Max
1
1
1
1
Measured
1
1
1
1
Min
1
1
1
1
Value Type
B1-05
Max
1
Measured
1
Min
1
C
C1
Value Type
C1-01
C1-02
C1-03
C1-04
Max
1
1
1
1
Measured
1
1
1
1
Min
1
1
1
1
Value Type
C1-05
C1-06
Max
1
1
Measured
1
1
Min
1
1
Best Regards
Fergus -
Find the difference between two columns in an ssrs matrix ? MSCRM
Hi All,
I am working in reporting part of our project (On-line MSCRM 2013) & in reporting services.
I am trying to create report using fetch xml based. Below is the snap what we required the result.
Kindly help me, how to get the difference in both column. (Its a matrix table where year is grouped).
We need difference between both year Like (Plan Revenue of 2013 & Plan Revenue of 2014 difference in Plan Revenue Diff section) and same for Actual
Revenue.
https://social.microsoft.com/Forums/en-US/054d5ca4-0d38-4dc6-84a8-88866cc228fe/find-the-difference-between-two-columns-in-an-ssrs-matrix-mscrm?forum=crmdevelopment
Thanks,
Mohammad ShariqueHi Bro,
I used parametrized option for year and done the report,Currently we are getting values in Difference column now i want to show
that value in percentage. How can we show the percentage based on that value. Means i want to show the Difference in Percentage.
Kindly help me i tried but getting some issue. Below i am mentioning the code and snap with result.
Below expression using to showing Plan Revenue in Percentage for year.
=
Sum(IIF(Fields!new_year.Value =Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))
- Sum(IIF(Fields!new_year.Value =Parameters!EndYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))
/IIF(Sum(IIF(Fields!new_year.Value = Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))>0,
(Sum(IIF(Fields!new_year.Value = Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0))))
,1)
)*100))
Result issue is as below in snap with highlighted in red colour.
Kindly help me on this issue also :)
Maybe you are looking for
-
I like to edit my web pages easily, - click to see html, edit it, (file name already there), save it - hit restore on browser - see what I did - Just changed from IE which gave me NotePad, which is just fine for me Just changed to FireFox and it disp
-
How do I tag a sender so all of their emails go to a folder and not the inbox?
I consistently get emails from a sender that I want to keep but I don't want them in my inbox. There are many of them throughout the day so I want them to go straight to a folder that I would designate for those emails so that my inbox is not flooded
-
Adobe AIR desktop app with an embedded runtime
Hi, Does an Adobe AIR desktop app with an embedded runtime (standalone/portable) that got published on Windows work on a Mac too? Thanks
-
HT2376 Trying to install scrapbook software but wont install due to quicktime
I recently tried to install Software Scrapbook Boutique on my MAC Pro OS X Version 10.7.4 and all the files wont install without Quicktime. I have Quicktime Version 10.1, and it won't work. I am administrater, I recently bought my laptop from a frie
-
FIeld selection for MIRO Incoming Invoice
HI, Iam creating invoice entry (MIRO). After entring purchase order number i will get all the GRN against that PO. But iam getting all the fields with not necessary. pls tell what is the path in SPRO setting to select filed selection. Regards Sunil