08-16-2023 09:14 AM
Hello all,
how can I delete a row of a 2DTable? There is already a solved topic with examples, but the links of them are dead.
Thank you and best regards
Mark
Solved! Go to Solution.
08-17-2023 02:29 AM - edited 08-17-2023 02:30 AM
Hello Mark,
The IndexSettings object of the table can be used to set whether the number of rows is fixed or should be determined automatically, for example. Depending on what is suitable for you set IndexSettings.IndexMode to the value e2DTableIndexModeFixed or e2DTableIndexModeAutomaticallyIncreasing.
The following code adds a new table with one column and set the row count to 20:
dim Table, RowCount, Column
set Table = Report.Sheets(1).Objects.Add(eReportObject2DTable, "myTable")
Table.Position.ByBorder.Bottom = 30
' Add a column
set Column = Table.Columns.Add(e2DTableColumnChannel)
Column.Channel.Reference = "[1]/Time"
' The default mode for the new added table scaling is e2DTableIndexModeFixed
RowCount = 20
Table.Settings.IndexSettings.IndexEnd = RowCount
call Report.Refresh
If you don't want to set a fixed number of rows, then let the table determine the number of rows.
dim Table, Column
set Table = Report.Sheets(1).Objects.Add(eReportObject2DTable, "myTable")
Table.Position.ByBorder.Bottom = 30
' Add a column
set Column = Table.Columns.Add(e2DTableColumnChannel)
Column.Channel.Reference = "[1]/Time"
' Use the mode e2DTableIndexModeAutomaticallyIncreasing instead of fixed row count
Table.Settings.IndexSettings.IndexMode = e2DTableIndexModeAutomaticallyIncreasing
call Report.Refresh
Regards
AnJalpaka
08-17-2023 02:53 AM
Hello AnJalpaka,
thank you so much for your help.
Understood, you have used a channel. I have used 2DTable with Text-Data.
So I will use the Channel-Data to delete the rows by deleting some indices of the channel.
Best regards
Mark