Use Matrix
Hi
I have created a form using screen painter.In that,I added matrix and two buttons for Add and Cancel.I have created a table and bind the matrix. When I create the from Addmode, then the matrix is not editable. The matrix is blank. How to do
editable the matrix.
thanks
Karoly
Welcome here,
not very wise to start the first question but not mark the "thread as a question"
anyway - i'll help
when the matrix is empty add a row:
c#
((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxUID").Specific)).AddRow(1,-1);
lg David
Similar Messages
-
How to insert the data using matrix
Hi
All how to insert the data using matrix feild
plz help me
thanks
LoyHi Loy,
The best way to fill an entire matrix is to use a DBDatasource, here is some sample code:
Dim oForm As SAPbouiCOM.Form
oForm = SBO_App.Forms.Item("YourFormTypeID")
'1. Add a DBDataSource to the form
oForm.DataSources.DBDataSources.Add("OUSR")
Dim oColumnDBS As SAPbouiCOM.Column
Dim oColumnUDS As SAPbouiCOM.Column
Dim i As Integer
Dim GenEdt As SAPbouiCOM.EditText
Dim oMatrix As SAPbouiCOM.Matrix
Dim oColumns As SAPbouiCOM.Columns
Dim oDBDataSource As SAPbouiCOM.DBDataSource
oMatrix = oForm.Items.Item("7").Specific
oColumns = oMatrix.Columns
'2. DBDataSource: Binding a field / alias of the table to a column
oColumnDBS = oColumns.Item("V_1")
oColumnDBS.DataBind.SetBound(True, "OUSR", "U_NAME")
'3. getting the data sources bound to the form
oDBDataSource = oForm.DataSources.DBDataSources.Item("OUSR")
oMatrix.Clear()
' Querying the DB Data source
oDBDataSource.Query()
' Adding the data to the matrix
oMatrix.LoadFromDataSource()
When you want to fill a specific field use :
GenEdt = oMatrix.Columns.Item("V_2").Cells.Item(1).Specific
GenEdt.String = "Hello" -
Designing SSRS 2005 report using matrix
I have created a report using ssrs 2005 and matrix.
i have "to company" column group and "from company" row group.
i have filter for the report as "select currency type" - local currency (may be diff for diff companies)
foreign currency (same for all companies)
if user selects foreign currency i want to show total column and if user selects local currency then i want to hide total column (since curr can be diff so does not make sense adding)
i have added subtotal for amount which look like, (rightclick on, =field!tocy.value and add subtotal)
how to hide total column depending on currency selection ?
I tried to rightclick on total and hide it but it only hides the title. It displays column. i can not rightclick on cell right side of amount cell (below total).
Any solution to hide total column depending on codition ??
h2007Yes you can use an expression as below
=IIF(Not InScope("<ColumnGroupName>") And Parameters!Currency.Value = "<Local Currency Name>",True,False)
this should be set as the hidden property expression for the textbox in the data area ie the one containing SUM(Fields!Amt.Value) as the value expression
Also see
http://visakhm.blogspot.in/2010/01/inscope-operator-in-sql-reporting.html
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
I am doing very simple work with matrix.
In screen painter I have added one matrix control.
There was one column by default.
Then I set alias =<col name>
databound =true
table=<table name>
for the column
and run the form using screen painter.
but the matrix is not editable in add mode.
What is the problem.
pls. rply meyou will have to explicitly add the row to make this editable.
matrix.AddRow(1); -
Hi,
I facing problem in OM reporting , one position reporting to more than one position.
I have create new matrix structure positions wise below:
Dimension1 : Dimension1 matrix
object type : S
Eval. Path : A-002
Dimension2 : Dimension2 matrix
object type : S
Eval. Path : A-002
Relationship: A-002
Pls guide me, where i m wrong fro creating above matrix, and also tell me how to i use this matrix for defining Dual reporting by PPME Tcode. please provide me the solution to my problem.Hi,
Have you selected the Reporting Structure View.
I thought that, you need the view of two dimensional report. To view the Dotted line Reporting, its A088. Sorry for misunderstanding.
Good luck
Om. -
Loader shows error when loading cs4 movies which uses matrix 3d class
I am trying to load an swf which is made using cs4 and which uses the classes "flash.geom.Matrix3d" and "flash.text.engine", but when i load it it shows error and the swf is not getting loaded. i am getting the following error.
ReferenceError: Error #1065: Variable flash.geom::Matrix3D is not defined.
at prova_fla::MainTimeline()
VerifyError: Error #1014: Class flash.text.engine::ContentElement could not be found.
at global$init()
at visup.utils::AdvancedText()
at prova_fla::MainTimeline/frame1()
The issue happens only when i try to load the swf using the loader. Opening the loading swf seperatly does not have any issues. I am using flex builder 3 and using Actionscript 3.
Thanks in advance.are you publishing for flash 10?
-
Data entry using matrix object
HI,
I am new to SAP B1 and its SDK. I got struck while trying with the Turotial provided with SDK Help center - Blanket Agreement. Following are the problems.
1) The Status combo box is not having values
2) The values I entered into the Matrix columns are vanished when I navigated to next field(Combo box/Edit Text).
Please Help!
Thanks,
Ajith G.Hi Ajith,
You should look in the example code under the subs : AddDataSource and BindDataSource
For every items in SBO, you should create the user data source and Bind it to your item
If you fail to bind it, or error were raised when binding it, your input value will be lost.
Example for an EditText created . Unique ID for this item is "txtExample"
You have to
'Declare an user data source in global
Private oUDS As SAPbouiCOM.UserDataSource
'And then you add the data source to your form.
Private Sub AddDataSource(ByVal FormUID As String)
oform = sbo_Application.forms.item(FormUID)
oUDS = oform.datasources.userdatasources.Add("txtEx", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
End SUb
'Bind The Datasource to your Item
Private Sub BindDataSource(ByVal FormUID As String)
Dim oForm as sapbouicom.form
Dim oEdit as sapbouicom.EditText
oForm = sbo_application.forms.item(formUID)
oEdit = oform.items.item("txtExample").specific
oEdit.databind.SetBound(True,"","txtEx")
End Sub
Hope it helps
Regards
Edy -
Hi
I have a problem with the Matrix Object. This object can be filled with data manually, running on the 2004C SDK, but NOT on the 2007A version. The line data can be edited, if it is filled before through DB datasource, but cannot be edited if the Matrix is empty.
So my question would be that how can we enter data to the rows of the Matrix Object manually, if the Matrix is actually empty.
Thanks
Karolynice
some rewarded points would be nice but you're new here
lg David -
Problem in using matrix for addtion
Hi
I need to get the total of field called 'RATING' which caqn come more than once for one record. I need to sum it and show the total I gave the following code when Rating is coming three times but I get sum of first and last only...
Pls help
I gave this in BEAN
private void createData(
Vector rVector,
Vector column,
IRecordSet table2,
int Count) {
SimpleDateFormat myformatter = new SimpleDateFormat("dd-MMM-yyyy");
String Hiredate;
String Name1, Name2, prof;
int[][] iArray = new int[100][100];
int i = 0, j = 0, i2 = 1, j2 = 0, row = 0, col = 0;
Name2 = "";
double avg1 = 0, avg2 = 0;
try {
table2.beforeFirst();
Vector dataVec = new Vector();
row = 0;
col = 0;
while (table2.next()) {
Name1 = table2.getString("ENAME");
if (dataVec.isEmpty()) {
dataVec.addElement(Name1);
dataVec.addElement(table2.getString("STELL_DESCP"));
dataVec.addElement(table2.getString("PLANS_DESC"));
dataVec.addElement(table2.getString("MANAGER"));
dataVec.addElement(table2.getString("HIRE_DT"));
prof = table2.getString("RATING");
if (prof.trim().length() == 0)
prof = "99";
iArray[row][col] = Integer.parseInt(prof);
dataVec.addElement(prof);
} else {
//col = col+1;
if (Name2.equalsIgnoreCase(Name1))
prof = table2.getString("RATING");
if (prof.trim().length() == 0)
prof = "99";
iArray[row][col+1] =Integer.parseInt(prof);
dataVec.addElement(prof);
prof = "";
else
for (int k = 0; k < Count; k++)
avg1 = avg1 + iArray[row][k];
dataVec.addElement(String.valueOf(avg1));
dataVec.addElement(String.valueOf(avg2));
rVector.addElement(dataVec);
dataVec = new Vector();
col =0;
row = row+1;
Name2 = Name1;
Name1 = "";
//avg1 =0;
// table2.afterLast();
// { //rVector.addElement(dataVec);}
} catch (Exception e) {
//e.printStackTrace();
this.setModel(new DefaultTableViewModel(rVector, column));Hi try the change... u r not incrementing the col
if (dataVec.isEmpty()) {
} else {
// col = col+1;
if (Name2.equalsIgnoreCase(Name1)) {
prof = table2.getString("RATING");
if (prof.trim().length() == 0)
prof = "99";
iArray[row][col++] = Integer.parseInt(prof);
dataVec.addElement(prof);
prof = "";
} else { -
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. -
Featching Data From The Data Base Using DI API in Matrix
Hi
All of u i am shahid i faced a problem when i retrive
the selected data from the data base using matrix plz.
Healp me!.
Thanks
Mohd Shahid.
SAP Techinical Consultent
Option Strict Off
Option Explicit On
Friend Class UseMatrix
'// This parameter will use us to manipulate the
'// SAP Business One Application
Private WithEvents SBO_Application As SAPbouiCOM.Application
Private oForm As SAPbouiCOM.Form
Private oMatrix As SAPbouiCOM.Matrix
Private oColumns As SAPbouiCOM.Columns
Private oColumn As SAPbouiCOM.Column
'// declareing a DB data source for all the Data binded columns
Private oDBDataSource As SAPbouiCOM.DBDataSource
'// declaring a User data source for the "Remarks" Column
Private oUserDataSource As SAPbouiCOM.UserDataSource
' This Function is called automatically when an instance
' of the class is created.
' Indise this function
Public Sub New()
MyBase.New()
'// set SBO_Application with an initialized application object
SetApplication()
'// Create the UI
CreateFormWithMatrix()
'// Add Data Sources to the Form
AddDataSourceToForm()
'// Bind the Form's items with the desired data source
BindDataToForm()
'// Load date to matrix
GetDataFromDataSource()
'// Make the form visible
oForm.Visible = True
End Sub
Private Sub SetApplication()
'// Use an SboGuiApi object to establish connection
'// with the SAP Business One application and return an
'// initialized appliction object
Dim SboGuiApi As SAPbouiCOM.SboGuiApi
Dim sConnectionString As String
SboGuiApi = New SAPbouiCOM.SboGuiApi
'// by following the steps specified above, the following
'// statment should be suficient for either development or run mode
sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
'// connect to a running SBO Application
Try ' If there's no active application the connection will fail
SboGuiApi.Connect(sConnectionString)
Catch ' Connection failed
System.Windows.Forms.MessageBox.Show("No SAP Business One Application was found")
End
End Try
'// get an initialized application object
SBO_Application = SboGuiApi.GetApplication()
'SBO_Application.MessageBox("Hello World")
End Sub
Private Sub SBO_Application_AppEvent(ByVal EventType As SAPbouiCOM.BoAppEventTypes) Handles SBO_Application.AppEvent
Select Case EventType
Case SAPbouiCOM.BoAppEventTypes.aet_ShutDown
SBO_Application.MessageBox("A Shut Down Event has been caught" & _
Environment.NewLine() & "Terminating 'Add Menu Item' Add On...")
'// terminating the Add On
System.Windows.Forms.Application.Exit()
End Select
End Sub
Private Sub CreateFormWithMatrix()
'// Don't Forget:
'// it is much more efficient to load a form from xml.
'// use code only to create your form.
'// once you have created it save it as XML.
'// see "WorkingWithXML" sample project
'// we will use the following object to add items to our form
Dim oItem As SAPbouiCOM.Item
'// we will use the following objects to set
'// the specific values of every item
'// we add.
'// this is the best way to do so
Dim oButton As SAPbouiCOM.Button
Dim oStaticText As SAPbouiCOM.StaticText
Dim oEditText As SAPbouiCOM.EditText
'// The following object is needed to create our form
Dim creationPackage
creationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
creationPackage.UniqueID = "UidFrmMatrix14"
creationPackage.FormType = "TypeFrmMatrix14"
'// Add our form to the SBO application
oForm = SBO_Application.Forms.AddEx(creationPackage)
'// Set the form properties
oForm.Title = "Quality Check"
oForm.Left = 336
oForm.ClientWidth = 620
oForm.Top = 44
oForm.ClientHeight = 200
'// Adding Items to the form
'// and setting their properties
'// Adding an Ok button
'// We get automatic event handling for
'// the Ok and Cancel Buttons by setting
'// their UIDs to 1 and 2 respectively
oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
oItem.Left = 5
oItem.Width = 65
oItem.Top = 170
oItem.Height = 19
oButton = oItem.Specific
oButton.Caption = "Ok"
'// Adding a Cancel button
oItem = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
oItem.Left = 75
oItem.Width = 65
oItem.Top = 170
oItem.Height = 19
oButton = oItem.Specific
oButton.Caption = "Cancel"
'// Adding a Text Edit item
'oItem = oForm.Items.Add("txtPhone", SAPbouiCOM.BoFormItemTypes.it_EDIT)
' oItem.Left = 265
'oItem.Width = 163
'oItem.Top = 172
'oItem.Height = 14
'// Adding an Add Phone prefix column button
' oItem = oForm.Items.Add("BtnPhone", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
' oItem.Left = 160
' oItem.Width = 100
' oItem.Top = 170
' oItem.Height = 19
' oButton = oItem.Specific
' oButton.Caption = "Add Phone prefix"
'// Add the matrix to the form
AddMatrixToForm()
End Sub
Private Sub AddMatrixToForm()
'// we will use the following object to add items to our form
Dim oItem As SAPbouiCOM.Item
'// we will use the following object to set a linked button
Dim oLink As SAPbouiCOM.LinkedButton
'// Adding a Matrix item
oItem = oForm.Items.Add("Matrix1", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
oItem.Left = 5
oItem.Width = 500
oItem.Top = 5
oItem.Height = 150
oMatrix = oItem.Specific
oColumns = oMatrix.Columns
'// Adding Culomn items to the matrix
oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = "#"
oColumn.Width = 30
oColumn.Editable = False
'// Add a column for Item Code
oColumn = oColumns.Add("DSItemCode", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
oColumn.TitleObject.Caption = "Item Code"
oColumn.Width = 40
oColumn.Editable = True
'// Link the column to the ITEM master data system form
oLink = oColumn.ExtendedObject
oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_Items
oColumn = oColumns.Add("DSItemName", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = "Item Name"
oColumn.Width = 80
oColumn.Editable = True
'// Add a column for BP Card Phone
oColumn = oColumns.Add("DSWhs", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = "Ware House"
oColumn.Width = 40
oColumn.Editable = True
'// Add a column for BP Card Phone
oColumn = oColumns.Add("DSQuantity", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = "Quantity"
oColumn.Width = 40
oColumn.Editable = True
'// Add a column for Combo Box
oColumn = oColumns.Add("DSQuality", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
oColumn.TitleObject.Caption = "Quality"
' oColumn.ValidValues.Add("OK", "")
'oColumn.ValidValues.Add("NOT OK", "")
oColumn.Width = 40
oColumn.Editable = True
oColumn = oColumns.Add("DSReport", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = "Remarks"
' oColumn.ValidValues.Add("OK", "")
'oColumn.ValidValues.Add("NOT OK", "")
oColumn.Width = 40
oColumn.Editable = True
'// Add a column for BP Card Phone
' oColumn = oColumns.Add("DSPhoneInt", SAPbouiCOM.BoFormItemTypes.it_EDIT)
' oColumn.TitleObject.Caption = "Int. Phone"
'oColumn.Width = 40
'oColumn.Editable = True
End Sub
Public Sub AddDataSourceToForm()
'// every item must be binded to a Data Source
'// prior of binding the data we must add Data sources to the form
'// Add user data sources to the "International Phone" column in the matrix
' oUserDataSource = oForm.DataSources.UserDataSources.Add("IntPhone", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
'// Add DB data sources for the DB bound columns in the matrix
oDBDataSource = oForm.DataSources.DBDataSources.Add("OITW")
End Sub
Public Sub BindDataToForm()
'// getting the matrix column by the UID
oColumn = oColumns.Item("DSItemCode")
'oColumn.DataBind.SetBound(True, "", "DSCardCode")
oColumn.DataBind.SetBound(True, "OITW", "ItemCode")
'oColumn = oColumns.Item("DSItemName")
'oColumn.DataBind.SetBound(True, "OITW", "ItemName")
oColumn = oColumns.Item("DSWhs")
oColumn.DataBind.SetBound(True, "OITW", "WhsCode")
oColumn = oColumns.Item("DSQuantity")
oColumn.DataBind.SetBound(True, "OITW", "U_QCStock")
'// to Data Bind an item with a user Data source
'// the table name value should be an empty string
' oColumn = oColumns.Item("DSPhoneInt")
'oColumn.DataBind.SetBound(True, "", "IntPhone")
End Sub
Public Sub GetDataFromDataSource()
'// Ready Matrix to populate data
oMatrix.Clear()
oMatrix.AutoResizeColumns()
'// Querying the DB Data source
oDBDataSource.Query()
'// setting the user data source data
'oUserDataSource.Value = "Phone with prefix"
oMatrix.LoadFromDataSource()
End Sub
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
If (pVal.FormUid = "UidFrmMatrix") Then
If ((pVal.itemUID = "BtnPhone") And _
(pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) And _
(pVal.Before_Action = False)) Then
AddPrefix()
End If
If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And _
(pVal.Before_Action = False)) Then
SBO_Application.MessageBox("Form Unloaded, Addon will terminate")
System.Windows.Forms.Application.Exit()
End If
End If
End Sub
Public Sub AddPrefix()
Dim i As Integer
Dim PhoneExtCol As SAPbouiCOM.Column
Dim newPhone As String
Dim oItem As SAPbouiCOM.Item
Dim oEditTxt As SAPbouiCOM.EditText
'// Get the prefix edit text item
oItem = oForm.Items.Item("txtPhone")
oEditTxt = oItem.Specific
'// Flush user input into datasources
oMatrix.FlushToDataSource()
'// Get the DBdatasource we base the matrix on
oDBDataSource = oForm.DataSources.DBDataSources.Item("OCRD")
'// Iterate all the records and add a prefix to the phone
For i = 0 To oDBDataSource.Size - 1
newPhone = oDBDataSource.GetValue("phone1", i)
newPhone = newPhone.Trim(" ")
oDBDataSource.SetValue("phone1", i, oEditTxt.String + newPhone)
Next
'// Load data back to
oMatrix.LoadFromDataSource()
End Sub
End ClassHi Shahid,
I am not sure what your question is. The code you pasted looks like the MatrixAndDataSources example that comes with the SDK. What are you trying to do?
Thanks,
Adele -
How to use 2 dataset in on matrix
Hi All,
I have 2 datasets:
YearMonth, Orders
2013-1-1,300
2014-1-1,200
YearMonth,Customers
2013-1-1,1000
2014-1-1,5000
I would like to use Matrix to show the average orders per customer
It looks like:
YearMonth Orders/Customers
How to achieve it?
Thanks.Hi BIMaster,
According to your description, you want to show data from two datasets in one matrix. Right?
In Reporting Services, it's not supported including data from different region scope in one tablix. However, we can use lookup() function to show the data from dataset2. We can use the expression below in the tablix:
=lookup(Fields!YearMonth.Value,Fields!YearMonth.Value,Fields!Customers.Values,"DataSet2")
Reference:
Lookup Function (Report Builder and SSRS)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Problem in AddRow button and Matrix
Hello everybody...
Can anybody tell me...in my UDO Form AddRow button, matrix is not working...dont understand why???
But Add and Cancel buttons are working fine...there is no problem in code still I am not able to update values using Matrix...
See the code below...
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
Try
' Events of the Blanket Agreement form
If (FormUID = "FBLK") Then
If (pVal.Before_Action = False) Then
' Click on Add Row
If (pVal.ItemUID = "AddRow") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) Then
Dim f As SAPbouiCOM.Form
Dim oMatrix As SAPbouiCOM.Matrix
f = SBO_Application.Forms.Item(FormUID)
oMatrix = f.Items.Item("mat").Specific
f.DataSources.DBDataSources.Item(1).Clear()
oMatrix.AddRow(1)
End If
End If
End If
Catch ex As Exception
MessageBox.Show(u2018not workingu2019)
End Try
End Sub
Please tell me where I am wrong...
Thanks in advanceHi Satish,
Thanks for the reply and yes I am using SetFilters and Item Uid is also correct, i have checked....
See Code below for SetFilters()
Private Sub SetFilters()
'// Create a new EventFilters object
oFilters = New SAPbouiCOM.EventFilters
'// add an event type to the container
'// this method returns an EventFilter object
oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED)
oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_COMBO_SELECT)
oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_VALIDATE)
oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_LOST_FOCUS)
oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_KEY_DOWN)
oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_MENU_CLICK)
oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_CLICK)
'// assign the form type on which the event would be processed
oFilter.AddEx("149") 'Quotation Form
oFilter.AddEx("139") 'Orders Form
oFilter.AddEx("133") 'Invoice Form
oFilter.AddEx("169") 'Main Menu
SBO_Application.SetFilter(oFilters)
End Sub
Now tell me where I am wrong... -
Hello Community
Using Visual Studio 2008 I have created a Windows Forms Application in which I created
Embedded Reports (rdlc).
The embedded reports (rdlc) uses Matrix(s).
Now on this one rdlc I have dragged 2 Matrix(s) onto the body.
One of the Matrix datasource dataset name and table name is "DataSet1_Table1.
A cells in the Matrix has a total column on the end as follows:
=FormatNumber(Sum(Fields!fld1.Value)+Sum(Fields!fld2.Value)+Sum(Fields!fld3.Value)+Sum(Fields!fld4.Value)+Sum(Fields!fld5.Value),"0")
The other Matrix datasource dataset name and table name is "DataSet2_Table2.
The cell in this Matrix has a total column on the end as follows:
=Sum(Fields!fld1.Value)+Sum(Fields!fld2.Value)+Sum(Fields!fld3.Value)+Sum(Fields!fld4.Value)+Sum(Fields!fld5.Value)
As you can see each Matrix has a different table.
I would like to add the total columns from each table in each Matrix but I haven't been
able to do it successfully. If I have to drag another Matrix or a Textbox on the
body to do it that is okay and/or add another/different formula to a cell onto the body that is
okay too.
So my question is how can I add the contents of the total in cell from each table in each matrix
which will create the "grand total"?
Thank you
ShabeautIt is possible to reference SSRS elements directly using the ReportItems collection. If your total tablix cell is outside of yoour matrix groups, you can use this collection to accomplish what you want:
=ReportItems!Matrix1Total.Value + ReportItems!Matrix2Total.Value
where Matrix1Total and Matrix2Total is the name of the cell that contains your totals. Note that for this to work, the cell name must be unique. If the total cell is inside a group, it will be repeated once for each instance of the group and will not be
unique.
You may be able to do it using the Sum aggregate and specifying the dataset for the scope variable:
=Sum(Fields!fld1.Value, "DataSet1")+Sum(Fields!fld2.Value,
"DataSet1")+Sum(Fields!fld3.Value,
"DataSet1")+Sum(Fields!fld4.Value,
"DataSet1")+Sum(Fields!fld5.Value,
"DataSet1")+Sum(Fields!fld1.Value,
"DataSet2")+Sum(Fields!fld2.Value,
"DataSet2")+Sum(Fields!fld3.Value,
"DataSet2")+Sum(Fields!fld4.Value,
"DataSet2")+Sum(Fields!fld5.Value,
"DataSet2")
This will work as long as you are not filtering the dataset in your Matrix properties. If you are, those
filters will not apply to this expression and the numbers will not total correctly.
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek. -
SSRS - How to achieve multiple instances of a matrix output in a single page?
Hi,
I am in a scenario where I am supposed to build a report aggregated on Sales for each store in a city.
I have a data set like this.
City Store Name Yr Sales
C1 S1 2000
100000
C1 S1 2001
150000
C2 S2 2000
200000
C2 S2 2001
250000
C2 S3 2000 300000
C2 S3 2001 300000
Now my report has to be displayed in this way:
C1
Yr S1
2000 100000
2001 150000
C2
Yr S2 S3
2000 200000 300000
2001 250000 300000
How do I achieve this..? I tried to use Matrix report but not able to arrive at the required result.??
Can someone please help me!!Thats easy
DO the following steps
1. Add a matrix with rowgroup as Yr field and Column group on StoreName
2. Add a parent row group on City field. delete the columns or grouping retaining group alone(ie choose Delete Columns only option
3. Add a new tablix with a single row group on City field
4. Add a row below under same group in table
5. Move the matrix inside the new row and you will get desired output
see screenshots below
Also attached is a sample report for your reference using your sample data
https://drive.google.com/file/d/0B4ZDNhljf8tQek1HNldPOFVjNTA/view?usp=sharing
Just change datasource to point to any of your server and database and execute the rdl
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page
Maybe you are looking for
-
Can no longer sync Ipod to Itunes after upgrading to Itunes 7
I can no longer sync Ipod to Itunes since upgrading to Itunes 7. When I try it freezes my Itunes and I have to force quit the application. Anyone else know how to solve this? Anyone else having this problem? Powerbook G4 Mac OS X (10.4.9)
-
Mac Mini Server freezes hard, too hot?
Hi, Our Mac Mini Server (half a year old) with the newest system crashes hard now and then. It could run for up to three weeks occasionally but now in the summer it could sometimes only run for minutes until it hangs hard with frozen mouse and clock.
-
Help on working with MySQL databases in Dreamweaver
I am new to the world of dynamic webpages. I have been following along on the Lynda.com videos Dreamweaver CS3: Beyond the Basics, and Dreamweaver CS3: Dynamic Development, and have basically got it figured out for doing stuff on my local computer. H
-
Not able to assemble two interactive PDF forms to form a single interactive PDF
Hi, I am trying to assemble two interactive PDF forms to form a single PDF. I am using LiveCycle process with Assembler and Invoke ddx file for this. But the resultant PDF is a flattened non interactive file. Please guide me in obtaining a interactiv
-
Determining in and out Gamut values for RGB profiles
Hi all, I am looking into how to check if a swatch value falls within my .icc profile gamut. If I have a color value for example L=74 a=12 b=-37 and I want to see if it falls within my .icc profile I can select Edit>Convert to Profile and choose my p