Matrix VisualRowCount Vs RowCount property
Hi,
Which one is a better way to loop in a martix?
oMatrix.VisualRowCount Or oMatrix.RowCount
I see that when i delete some rows in a mtrix by right clicking on the row and select Remove, the RowCount value still show the old value(that means including the deleted row) but VisualRowCount shows the correct no of rows (excluding the deleted rows)
Can VisualRowCount property be used insted of RowCount property?
Thanks,
Satish.
That depends, if you delete the records directly if you click "delete row", (so not only from the matrix, but also from db) then you must use <i>VisualRowcount</i>, because the other records don't longer exist.
However, when you do it nice, the SBO way, you just hide the records you want to delete, and loop the matrix with <i>RowCount</i> and delete the hidden rows when the user clicks Update/Ok...
I always go for the last way, because that's the way SBO uses it... (the users are familiar with it) Also, when a user presses "Cancel/Abort", with the first method, you have a little problem because you already deleted the rows from db. With option two there is nothing to worry about, just close the form...
Hope it helps...
Grtz, Rowdy
Similar Messages
-
Hi,
We are using SAP MII 12.1.5 ( build 83).
We have been connecting to a PI historian to get data and performing some calculations.
Since the client gives more important on the accuracy of data, we are using the history event mode.
( With history event , we could not get the results as expected)
While querying a particular tag, the value is not as expected.
After doing all the testing, We found out the For the particular period PI has some where around 18000 rows. and we are only getting 9999 rows since we have specified this in the tag query row count.
In the transaction I tried to increase the rowcount to 20000. It is not working.
The maximum count is 10000. After that the query gives unknown error Java LH exception.
Is there a limitation on the rowcount property?
If we fix the row count for a certain limit and the query returns more than those number of rows, how to get all data?
I am sure handling these huge number of rows is not a very good thing to do. But the algorithm to calculate the end result requires each and every data as registered in PI.
Any input is appreciated.
Thanks in Advance,
Kishore kumar P SHi Mike,
We have initially told about the performance issues if we go with this approach.
But once we have shown the demo last week, they agreed with the modified approach.
Now we are using the Statistics with TOT. Still the totalizer value is not taking effect.
As I know from the help docs, the totalizer factor is used to change the from one unit to another unit.
the help Doc says
"The area under the curve (effectively a "totalizer" value) can be calculated by multiplying the time-weighted average by the width of the time interval in seconds. However, quite often, the instrument or measurement is in different units (perhaps gallons per minute versus per second), and the TotalizerFactor parameter can be used to perform the correction."
But there is no effect on the totalizer value. There is one more point in totalizer value is depend upon the connector. We are using the UDC connector. Currently I am not getting anything on this connector type.
Any inputs will be appreciated.
Thanks & Regards,
Kishore kumar P S -
Hello,
how you can set the rowCount visible on a Spark list, <mx:List> had rowCount property for the limit the displayed items. <s:List> doesn't.
<s:List id="list" width="100%">
<s:layout>
<s:VerticalLayout requestedRowCount="3" gap="0" horizontalAlign="contentJustify" />
</s:layout>
</s:List>
"layout" doesn't work properly in flex 4.5 hero mobile
thanks.I believe requestedRowCount should do what you are looking for.
This sample application seems to work fine for me in Flex 4.5:
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<s:List width="100%">
<s:layout>
<s:VerticalLayout requestedRowCount="3" gap="0" horizontalAlign="contentJustify" />
</s:layout>
<s:dataProvider>
<s:ArrayList>
<fx:String>0</fx:String>
<fx:String>1</fx:String>
<fx:String>2</fx:String>
<fx:String>3</fx:String>
<fx:String>4</fx:String>
<fx:String>5</fx:String>
<fx:String>6</fx:String>
</s:ArrayList>
</s:dataProvider>
</s:List>
</s:Application> -
Rowcount property of Multipane in Component configuration
Hi All,
I've created application configuration for the HRRCF_A_STARTPAGE_EXT_CAND wherein I'm configuring the HRRCF_C_PERSONL_DATA_UI component. Using this I have to hide the all fields under Temporary address on screen. The entire address node is under Multipane UI element. To make the Temporary address fields hidden I'll need to change the Row Count property of Multipane to 1.
I can see this property through se80 however no such property if getting displayed in the Component Configuration mode.
Any idea how I can get this property displayed in the config mode? or How I can make the Temporary Address fields hidden without making changes to the standard.
Regards,
Seema Rane.
Edited by: Seema Rane on May 6, 2009 12:50 PMThe online help has quite a bit of details. I would start there:
http://help.sap.com/saphelp_nw04s/helpdata/en/94/9cdc40132a8531e10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c5/f4b9422e0fb911e10000000a1550b0/frameset.htm -
Hi All,
I am tring to get the total number of rows contained in the Sales Order Matrix. Does the rowcount property work?
I have tried the mymatrix.rowcount -1 but i always get 0 even after an event and the matrix contains many rows?
Code snippet:
'//VB.NET
'Other declarations assumed
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
Dim iRow As Integer
Dim oMtx As SAPbouiCOM.Matrix
Dim oForm As SAPbouiCOM.Form
Dim iCol As Integer
Dim sCellValue As String
If pVal.FormType <> 0 And pVal.Before_Action = False Then
Select Case pVal.EventType
Case APbouiCOM.BoEventTypes.et_LOST_FOCUS
Select Case pVal.ItemUID
Case SALES_GRID_MTX '38
iRow = pVal.Row
iCol = pVal.ColUID
If iCol = 1 Then
Dim iRowCount As Integer = 0
oForm = SBO_Application.Forms.Item(FormUID)
oMtx = oForm.Items.Item(SALES_GRID_MTX).Specific
iRowCount = oMtx.RowCount
sCellValue = oMtx.Columns.Item(1).Cells.Item(iRow).Specific.Value 'Works, no problem here
SBO_Application.MessageBox(iRowCount)
End If
End Select
End Select
End If
end sub
Regards RaynerYou haven't listed the definition of SALES_GRID_MTX in your code. I suspect you might have defined this as a numeric type, and that is probably the cause. It should be the string value "38", not the number 38.
Regards,
John. -
Difference between Matrix.Visual RowCount and ...
Hi
Is there any Difference between VisualRowCount and RowCount of Matrix ??
thxHi Pankaj,
The help file explains it like this:
VisualRowCount: Returns a long integer specifying the number of rows in the matrix excluding deleted and collapsed rows
RowCount: Returns the number of rows in the matrix
Hope it helps,
Adele -
Delete Last Row in Matrix on SBO 2005
Hi,
Im using SAPB1 2005 SP1 with B1DE.
I've seen a post that indicates that the following code should delete a row from a matrix (even the last row) when using SBO 2005
I still find that all rows except last row of matrix are removed from the database.
<b>How do I delete the last row from the Del button event handler????</b>
I'm using
<i> [B1Listener(BoEventTypes.et_CLICK, false)]
public virtual void OnAfterClick(ItemEvent pVal)
bool ActionSuccess = pVal.ActionSuccess;
Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
Item item = form.Items.Item("del");
Button button = ((Button)(item.Specific));
// ADD YOUR ACTION CODE HERE ...
int row;
Matrix oMtx = (Matrix)form.Items.Item("mtx_0").Specific;
DBDataSource oDBDS = (DBDataSource)form.DataSources.DBDataSources.Item("@SD_POOLCONTRCT_LINE");
row = oMtx.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);
oMtx.DeleteRow(row);
if (oMtx.RowCount == 0)
oDBDS.RemoveRecord(0);
if ((form.Mode != BoFormMode.fm_ADD_MODE) | (form.Mode != BoFormMode.fm_UPDATE_MODE))
form.Mode = BoFormMode.fm_UPDATE_MODE;
}</i>Hi Ben,
[B1Listener(BoEventTypes.et_CLICK, false)]
public virtual void OnAfterClick(ItemEvent pVal)
bool ActionSuccess = pVal.ActionSuccess;
Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
Item item = form.Items.Item("del");
Button button = ((Button)(item.Specific));
// ADD YOUR ACTION CODE HERE ...
int row;
Matrix oMtx = (Matrix)form.Items.Item("mtx_0").Specific;
DBDataSource oDBDS = (DBDataSource)form.DataSources.DBDataSources.Item("@SD_POOLCONTRCT_LINE");
Rest of your code will remain same.
I am making the modification here. I am using the RowCount property that gives me the address of the last row of the matrix.
<b>row = oMtx.RowCount;</b>
Every time this will return you the last row and that row will be deleted.
<b>row = oMtx.RowCount;</b>
oMtx.DeleteRow(row);
if (oMtx.RowCount == 0)
oDBDS.RemoveRecord(0);
if ((form.Mode != BoFormMode.fm_ADD_MODE) | (form.Mode != BoFormMode.fm_UPDATE_MODE))
form.Mode = BoFormMode.fm_UPDATE_MODE;
Regards,
Prashant -
Matrix - Help with setting 1st column for line numbers
Hi,
I have created a matrix on a custom form and would like to add line numbers to the # column line that of the quotation screen.
The matrix itself is populated correct from the Query and LoadFromDataSource, and all the fields and columns are filled in correctly, the only column I am having trouble with is the 1st one for line numbers. My code for adding the line numbers is
SBO_Application.MessageBox("Matrix Count: " & tMatrix.RowCount)
For i = 1 To tMatrix.RowCount
oEditText = tColumns.Item("#").Cells.Item(i).Specific
oEditText.Value = i
Next
For the example I am using I get the message box appear:
Matrix Count: 26
So I know I should have the line number go from 1 to 26, however I only get 1 to 9 displayed, all the remaining lines are blank.
Any ideas on why it stops at 9 or what I should do to correctly set the line numbers in the Number column like that of the system Quotation/Sales orders forms.
Your help is much appreciated
MatthewHi,
I tried changing it to the following as you suggested:
SBO_Application.MessageBox("Matrix Count: " & tMatrix.VisualRowCount)
For i = 1 To tMatrix.VisualRowCount
oEditText = tColumns.Item("#").Cells.Item(i).Specific
oEditText.Value = i
Next
The message box still displays 26, however my lines still only go up to number 9.
Thanks for the quick response. -
Problem Field of type "connection" the matrix
Hi,
I want to make an attachment function in an Matrix. But to link to my column with a capo in the database of the type "Connection" does not work. And if i do the same for one field it_EDIT out of the matrix, it works.
I want to make the function of the attachment (annex) pattern SAP in my Matrix.Hi,
Please gothrough below code.
Case SAPbouiCOM.BoEventTypes.et_CLICK
Try
Select Case pVal.ItemUID
Case "b_browse"
If pVal.BeforeAction Then If frmProject.Items.Item(pVal.ItemUID).Enabled = False Then BubbleEvent = False
If pVal.ActionSuccess Then
If oMatrix2.RowCount <> 0 Then
If oMatrix2.Columns.Item("TrgtPath").Cells.Item(1).Specific.value.Equals("") Then
oMatrix2.Clear()
oDBDSDetail2.Clear()
End If
End If
If SetAttachMentFile(frmProject, oDBDSHeader, oMatrix2, oDBDSDetail2) = False Then
BubbleEvent = False
End If
End If
Case "b_display"
If pVal.BeforeAction Then If frmProject.Items.Item(pVal.ItemUID).Enabled = False Then BubbleEvent = False
If pVal.ActionSuccess Then
For i As Integer = 1 To oMatrix2.VisualRowCount
If oMatrix2.IsRowSelected(i) Then OpenAttachment(oMatrix2, oDBDSDetail2, i)
Exit For
Next
End If
Case "b_delete"
If pVal.BeforeAction Then If frmProject.Items.Item(pVal.ItemUID).Enabled = False Then BubbleEvent = False
If pVal.ActionSuccess Then
DeleteRowAttachment(frmProject, oMatrix2, oDBDSDetail2, oMatrix2.GetNextSelectedRow(0, SAPbouiCOM.BoOrderType.ot_RowOrder))
End If
Case "Attach"
If pVal.BeforeAction = False And pVal.Row > 0 Then
If oMatrix2.IsRowSelected(pVal.Row) Then
frmProject.Items.Item("b_display").Enabled = True
frmProject.Items.Item("b_delete").Enabled = True
End If
End If
End Select
Catch
End Try
'Fuctions
#Region " Attachment Option "
Sub AddAttachment(ByVal oMatAttach As SAPbouiCOM.Matrix, ByVal oDBDSAttch As SAPbouiCOM.DBDataSource, ByVal oDBDSHeader As SAPbouiCOM.DBDataSource)
Try
If oMatAttach.VisualRowCount > 0 Then
Dim rsetAttCount As SAPbobsCOM.Recordset = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
Dim oAttachment As SAPbobsCOM.Attachments2 = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oAttachments2)
Dim oAttchLines As SAPbobsCOM.Attachments2_Lines
oAttchLines = oAttachment.Lines
oMatAttach.FlushToDataSource()
rsetAttCount.DoQuery("Select Count(*) From ATC1 Where AbsEntry = '" & Trim(oDBDSHeader.GetValue("U_AtcEntry", 0)) & "'")
If Trim(rsetAttCount.Fields.Item(0).Value).Equals("0") Then
For i As Integer = 1 To oMatAttach.VisualRowCount
If i > 1 Then oAttchLines.Add()
oDBDSAttch.Offset = i - 1
oAttchLines.SourcePath = Trim(oDBDSAttch.GetValue("U_ScrPath", oDBDSAttch.Offset))
oAttchLines.FileName = Trim(oDBDSAttch.GetValue("U_FileName", oDBDSAttch.Offset))
oAttchLines.FileExtension = Trim(oDBDSAttch.GetValue("U_FileExt", oDBDSAttch.Offset))
oAttchLines.Override = SAPbobsCOM.BoYesNoEnum.tYES
Next
oAttachment.Add()
Dim rsetAttch As SAPbobsCOM.Recordset = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
rsetAttch.DoQuery("Select Case When Count(*) > 0 Then Max(AbsEntry) Else 0 End AbsEntry From ATC1")
oDBDSHeader.SetValue("U_AtcEntry", 0, rsetAttch.Fields.Item(0).Value)
Else
oAttachment.GetByKey(Trim(oDBDSHeader.GetValue("U_AtcEntry", 0)))
For i As Integer = 1 To oMatAttach.VisualRowCount
If oAttchLines.Count < i Then oAttchLines.Add()
oDBDSAttch.Offset = i - 1
oAttchLines.SetCurrentLine(i - 1)
oAttchLines.SourcePath = Trim(oDBDSAttch.GetValue("U_ScrPath", oDBDSAttch.Offset))
oAttchLines.FileName = Trim(oDBDSAttch.GetValue("U_FileName", oDBDSAttch.Offset))
oAttchLines.FileExtension = Trim(oDBDSAttch.GetValue("U_FileExt", oDBDSAttch.Offset))
oAttchLines.Override = SAPbobsCOM.BoYesNoEnum.tYES
Next
oAttachment.Update()
End If
End If
'Delete the Attachment Rows...
Dim rsetDelete As SAPbobsCOM.Recordset = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
rsetDelete.DoQuery("Delete From ATC1 Where AbsEntry = '" & Trim(oDBDSHeader.GetValue("U_AtcEntry", 0)) & "' And Line >'" & oMatAttach.VisualRowCount & "' ")
Catch ex As Exception
oApplication.StatusBar.SetText("AddAttachment Failed:" & ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning)
Finally
End Try
End Sub
Sub DeleteRowAttachment(ByVal oForm As SAPbouiCOM.Form, ByVal oMatrix As SAPbouiCOM.Matrix, ByVal oDBDSAttch As SAPbouiCOM.DBDataSource, ByVal SelectedRowID As Integer)
Try
oDBDSAttch.RemoveRecord(SelectedRowID - 1)
oMatrix.DeleteRow(SelectedRowID)
oMatrix.FlushToDataSource()
For i As Integer = 1 To oMatrix.VisualRowCount
oMatrix.GetLineData(i)
oDBDSAttch.Offset = i - 1
oDBDSAttch.SetValue("LineID", oDBDSAttch.Offset, i)
oDBDSAttch.SetValue("U_TrgtPath", oDBDSAttch.Offset, Trim(oMatrix.Columns.Item("trgtpath").Cells.Item(i).Specific.Value))
oDBDSAttch.SetValue("U_ScrPath", oDBDSAttch.Offset, Trim(oMatrix.Columns.Item("scrpath").Cells.Item(i).Specific.Value))
oDBDSAttch.SetValue("U_FileName", oDBDSAttch.Offset, Trim(oMatrix.Columns.Item("filename").Cells.Item(i).Specific.Value))
oDBDSAttch.SetValue("U_FileExt", oDBDSAttch.Offset, Trim(oMatrix.Columns.Item("fileext").Cells.Item(i).Specific.Value))
oDBDSAttch.SetValue("U_Date", oDBDSAttch.Offset, Trim(oMatrix.Columns.Item("date").Cells.Item(i).Specific.Value))
oMatrix.SetLineData(i)
oMatrix.FlushToDataSource()
Next
'oDBDSAttch.RemoveRecord(oDBDSAttch.Size - 1)
oMatrix.LoadFromDataSource()
oForm.Items.Item("b_display").Enabled = False
oForm.Items.Item("b_delete").Enabled = False
If oForm.Mode <> SAPbouiCOM.BoFormMode.fm_ADD_MODE Then oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
Catch ex As Exception
oApplication.StatusBar.SetText("DeleteRowAttachment Method Failed:" & ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning)
Finally
End Try
End Sub
Function SetAttachMentFile(ByVal oForm As SAPbouiCOM.Form, ByVal oDBDSHeader As SAPbouiCOM.DBDataSource, ByVal oMatrix As SAPbouiCOM.Matrix, ByVal oDBDSAttch As SAPbouiCOM.DBDataSource) As Boolean
Try
If oCompany.AttachMentPath.Length <= 0 Then
StatusBarErrorMsg("Attchment folder not defined, or Attchment folder has been changed or removed. [Message 131-102]")
Return False
End If
Dim strFileName As String = FindFile()
If strFileName.Equals("") = False Then
Dim FileExist() As String = strFileName.Split("\")
Dim FileDestPath As String = oCompany.AttachMentPath & FileExist(FileExist.Length - 1)
If File.Exists(FileDestPath) Then
Dim LngRetVal As Long = oApplication.MessageBox("A file with this name already exists,would you like to replace this? " & FileDestPath & " will be replaced.", 1, "Yes", "No")
If LngRetVal <> 1 Then Return False
End If
Dim fileNameExt() As String = FileExist(FileExist.Length - 1).Split(".")
Dim ScrPath As String = oCompany.AttachMentPath
ScrPath = ScrPath.Substring(0, ScrPath.Length - 1)
Dim TrgtPath As String = strFileName.Substring(0, strFileName.LastIndexOf("\"))
oMatrix.AddRow()
oMatrix.FlushToDataSource()
oDBDSAttch.Offset = oDBDSAttch.Size - 1
oDBDSAttch.SetValue("LineID", oDBDSAttch.Offset, oMatrix.VisualRowCount)
oDBDSAttch.SetValue("U_TrgtPath", oDBDSAttch.Offset, ScrPath)
oDBDSAttch.SetValue("U_ScrPath", oDBDSAttch.Offset, TrgtPath)
oDBDSAttch.SetValue("U_FileName", oDBDSAttch.Offset, fileNameExt(0))
oDBDSAttch.SetValue("U_FileExt", oDBDSAttch.Offset, fileNameExt(1))
oDBDSAttch.SetValue("U_Date", oDBDSAttch.Offset, GetServerDate())
oMatrix.SetLineData(oDBDSAttch.Size)
oMatrix.FlushToDataSource()
If oForm.Mode <> SAPbouiCOM.BoFormMode.fm_ADD_MODE Then oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
End If
Return True
Catch ex As Exception
oApplication.StatusBar.SetText("Set AttachMent File Failed:" & ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning)
Return False
Finally
End Try
End Function
Sub OpenAttachment(ByVal oMatrix As SAPbouiCOM.Matrix, ByVal oDBDSAttch As SAPbouiCOM.DBDataSource, ByVal PvalRow As Integer)
Try
If PvalRow <= oMatrix.VisualRowCount And PvalRow <> 0 Then
Dim RowIndex As Integer = oMatrix.GetNextSelectedRow(0, SAPbouiCOM.BoOrderType.ot_RowOrder) - 1
Dim strServerPath, strClientPath As String
strServerPath = Trim(oDBDSAttch.GetValue("U_TrgtPath", RowIndex)) + "\" + Trim(oDBDSAttch.GetValue("U_FileName", RowIndex)) + "." + Trim(oDBDSAttch.GetValue("U_FileExt", RowIndex))
strClientPath = Trim(oDBDSAttch.GetValue("U_ScrPath", RowIndex)) + "\" + Trim(oDBDSAttch.GetValue("U_FileName", RowIndex)) + "." + Trim(oDBDSAttch.GetValue("U_FileExt", RowIndex))
'Open Attachment File
OpenFile(strServerPath, strClientPath)
End If
Catch ex As Exception
oApplication.StatusBar.SetText("OpenAttachment Method Failed:" & ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning)
Finally
End Try
End Sub
Sub AttchButtonEnable(ByVal oForm As SAPbouiCOM.Form, ByVal Matrix As SAPbouiCOM.Matrix, ByVal PvalRow As Integer)
Try
If PvalRow <= Matrix.VisualRowCount And PvalRow <> 0 Then
Matrix.SelectRow(PvalRow, True, False)
If Matrix.IsRowSelected(PvalRow) = True Then
oForm.Items.Item("b_display").Enabled = True
oForm.Items.Item("b_delete").Enabled = True
Else
oForm.Items.Item("b_display").Enabled = False
oForm.Items.Item("b_delete").Enabled = False
End If
End If
Catch ex As Exception
StatusBarErrorMsg("Attach Button Enble Function...")
End Try
End Sub
#End Region -
Scanning a matrix with collapsible rows
Hello all,
I need to scan the right matrix (ItemUID = "2") on the "Purchase Order Confirmation" form. This matrix has collapsible rows, and I can only scan through them if they are all expanded (not collapsed).
Is there a way to check whether there are any collapsed rows in a matrix on a system form? I tried comparing Matrix.RowCount with Matrix.VisualRowCount, but it didn't work.
An even better solution cound be to expand all the matrix's rows through UIApi, but I couldn't do it either...
Thanks in advance,
AntonHi Anton,
Hope these threads will have some values to you:
Data from collapsed grid by Events
Re: difference between Matrix.Visual RowCount and ...
How do you read data from collapsed rows in a matrix
Thanks,
Gordon -
Matrix Select Row And Click()
Good Day
Experts:
I am in a bit of a quandry here today. I cannot figure out why I am unable to programatically acheive the 2 following actions:
1)Select a row in a Matrix
2)Click in a field to set cursor
I have the right-click Add Row event working. A new row is added to the Matrix. However, right now
the row I right-clicked on to add a new row is staying highlighted. I want to deselect that row and/or select the newly added row. Then click in a certain column in the new row.
The forum has many helpful suggestions but it seems I have tried al of them with no luck.
Here is what I have for the AddRow(after right-clicking on a row in the Matrix) and attempt at selecting a
row and clicking it:
MatlRFQMatrix.AddRow()
ClearMatrixDataSourceAdd(MatrixRowCount + 1)
PrevSeq = MatlRFQMatrix.Columns.Item("clHash").Cells.Item(MatlRFQMatrix.VisualRowCount - 1).Specific.value
PrevRFQSeq = MatlRFQMatrix.Columns.Item("clDocSeq").Cells.Item(MatlRFQMatrix.VisualRowCount - 1).Specific.value
MatlRFQMatrix.Columns.Item("clHash").Cells.Item(MatrixRowCount + 1).Specific.value = PrevSeq + 1
MatlRFQMatrix.Columns.Item("clDocNum").Cells.Item(MatrixRowCount + 1).Specific.Value = ReqNoPassed
MatlRFQMatrix.Columns.Item("clDocLine").Cells.Item(MatrixRowCount + 1).Specific.Value = ReqLinePassed
MatlRFQMatrix.Columns.Item("clDocSeq").Cells.Item(MatrixRowCount + 1).Specific.Value = PrevRFQSeq
MatlRFQMatrix.Columns.Item("clStatus").Cells.Item(MatrixRowCount + 1).Specific.Value = "Order"
Dim oMatrix As SAPbouiCOM.Matrix
oMatrix = MatlRFQForm.Items.Item("mtxMatRFQ").Specific
oMatrix.SelectRow(MatrixRowCount + 1, True, False)
MatlRFQMatrix.Columns.Item("clCardCd").Cells.Item(MatrixRowCount + 1).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
Any ideas why I can't select a row or have a click sei in a column?
Thanks,
EdHi Ed,
on which event you are doing this coding.
It should be on right click After Event.
As well as you add the new row into the matrix, the visual row count increamented by one.
So insted of using Matrix.VisualRowCount+1 or matrix.VisualRowCount -1, you have to usae only and simply Matrix.VisualRowCount.
whats the value of MatrixRowCount. Is it a variable.
please try to more clear your code. -
Greetings All,
Does anyone know how i can check if a matrix row is enabled or disabled prior to updating the field? I need to know because my add on is throwing an exception stating invalid form item if the matrix row is disabled.
Any ideas?Hi Curtis
I'm not aware if you can make a row enabled or disabled...never seen it. I know you can make a whole matrix enabled or disabled. Also if you want an extra line in the matrix you add a extra one and that then becomes available. When you say disabled is this when you haven't said you want an extra row and it doesn't allow to add the row details?
Well, to check if a matrix is enabled you do something like
Dim item As SAPbouiCOM.Item
item = oForm.Items.Item("matrixID")
If item.Enabled = False Then item.Enabled = True
Then to see how many records are in your matrix use
oMatrix.RowCount
It will return the number of records in the matrix. But remeber if its your own matrix you should always add a line omatrix.addrow before specifying the row contents.
Hope this helps -
SQL Query works in SQL Developer, but not always in MII
Hi all,
I encountered a strange behaviour with a query in MII 12.0.2. Maybe someone has a guess what happens.
I have created a SQL query which runs against Oracle 10g tables. I have tested the query using SQL Developer, and it throws a couple of lines, depending on the contents of the where clause.
Next I have copied the query to a MII SQL Query (FixedQuery). However, the output is empty most of the time, without showing any errors. After some testing I got the impression that older data are not displayed, but there is no time or date setting in MII.
As the SQL Developer always returns rows, I am unsure where to search for the error.
Regards
MichaelMichael,
I would imagine that you have sub-select statements in your FixedQuery, all which will fall subject to the RowCount property of the query template (SQL defaults to 100), which is issued through the driver and typically honored by the database when returning the data from your request.
Most of the native database query tools allow you to make unbound query requests with no limit on rows, which would probably account for the difference between SQL Developer and the query template.
For SQLServer it's ROWCOUNT: http://msdn.microsoft.com/en-us/library/ms188774.aspx
For Oracle it's ROWNUM: http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
So the answer would be not to make the query template row count some rediculous number, but more appropriately refine the way that the database request is issued.
Regards,
Jeremy -
How to check the sql:query is return null value
I have use :
<sql:query var="sql1" dataSource="${db}">
select col_name from table_name
where a=<c:out value="${row.test1}"/>
and b='<c:out value="${row.test2}"/>'
</sql:query>
So, how can I check this statement return null value which is no record within this table?The Result should never be null but can be empty. You can check if the Result is empty using an if tag and checking the rowCount property:
<sql:query var="books"
sql="select * from PUBLIC.books where id = ?" >
<sql:param value="${bookId}" />
</sql:query>
<c:if test="${books.rowCount > 0}">
</c:if>http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSTL7.html#wp84217
Look for query Tag Result Interface -
Revision: 5170
Author: [email protected]
Date: 2009-03-04 17:50:32 -0800 (Wed, 04 Mar 2009)
Log Message:
Round 2 of bug fixes for the Spark skins for Halo components. Thanks to Alex for help with the data grid issues.
Bugs fixed:
SDK-19655 - Setting rowCount property on DataGrid causes extra blank row to be displayed
SDK-19652 - Items in a DataGrid do not line up after scrolling.
SDK-19605 - disabled Halo ColorPicker with Gumbo skin draws too dark
SDK-19596 - When you have a single button on an Alert, the left edge looks flatter than the right
SDK-19585 - Menus compiled with the halo theme in Flex 4 have a different backgroundColor than in Flex 3
SDK-19665 - Halo List with Gumbo skin doesnt draw the alternating item color all the way to the right edge of the control if VScrollBar is present
SDK-19651 - odd header rendering issue on Halo DataGrid with Gumbo skin
QA Notes: The alert layout code was positioning the buttons/text on sub-pixel boundaries if the width or height of the alert was an odd number of pixels. We always snap to pixel boundaries now, but this may cause bitmap compare issues with Alert.
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-19655
http://bugs.adobe.com/jira/browse/SDK-19652
http://bugs.adobe.com/jira/browse/SDK-19605
http://bugs.adobe.com/jira/browse/SDK-19596
http://bugs.adobe.com/jira/browse/SDK-19585
http://bugs.adobe.com/jira/browse/SDK-19665
http://bugs.adobe.com/jira/browse/SDK-19651
Modified Paths:
flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as
flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/alertClasses/AlertForm.as
flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as
flex/sdk/trunk/frameworks/projects/halo/defaults.css
flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ColorPickerSkin.mxml
Maybe you are looking for
-
Can I simply just use my Time Capsule as a normal External Hard drive? A wireless external hard drive?
-
Problem with playing video via composite av cable on iPod classic 2009 model 160gb
Things went well, after purchasing the new Ipod classic 160 gb i tryied to watch movies on my LED TV via Composite AV Cable. I did it once. Everything worked correctly & I was able to see my photoes, watch movies. Today i tryied to connect it agai
-
I am trying to install the CC on my Mac because my desktop computer died on me. I logged in, selected photoshop ( or premiere, or after effects) and hit the download button. The site says download in progress but nothing happens. I have downloaded ot
-
Web client returned different no. of records in same query
May anyone can help me ? I am now using Web Client 9.2.0.0.196 Windows XP. I am only an user to retrieve records using one static query thorugh Hyperiion Interactive Reporting Web Client for business purposes. The back-end database would be updated m
-
White background causes colour shift
Ran into a bit of a strange problem... am sure there's a simple explanation... Gradient or solid colour in the blue range set at 40% transparency 1/ When placed on a blank surface (no background) looks ok 2/ When placed over an underlying white backg