Turning Off Grouping In ObjectListView Turns Of Sorting - vb.net

I am struggling to find information on a lot of small issues I'm starting to come across since recently integrating the ObjectListView into my application. I must admit, I love the control and it takes a lot of work away from me by having the control pretty much do everything that I need.
However, amongst a few issues that I've come across thus far, one is the fact that if I turn off grouping for individual columns it no longer allows me to sort these columns.
For example, my ListView control has an ID, Summary, Location, etc., etc. I currently run grouping on the ID because I attach a unique footer against every ID and it looks good. But, when I click on Summary, or Location it then groups all items by Summary or Location and therefore I end up with the group header but no footer anymore because the footer no longer corresponds with the ID.
What I want to achieve is to allow the user to click on any other column, but still maintain the group by ID and thus keep the footer against each item. I only want the items to sort, not group, but as mentioned, when I turn off the grouping against each column, it turns off the sort function.
UPDATE
Basically, looking at the screenshot below, I want to be able to click on the Priority Column Header (for example) to sort the list of object by Priority, but still maintain the Group By Ticket (with the Group Footer details). And basically be able to click on any Column header to sort the list but keeping the grouping by Ticket.
I have intercepted the OLV_BeforeCreatingGroups event to add:
e.Parameters.GroupByColumn = Ticket_ID
This now seems to maintain my grouping by Ticket no matter what Column header I click on, but I now loose the sort functionality.

Try setting AlwaysGroupByColumn to be the TicketId column. That will do the trick :)
Second attempt:
Thanks for the screenshot. I think I understand what you want. You are hoping that clicking on the header will sort the groups themselves. That's not the default behaviour, which is to sort the rows within each group.
To do what you are asking:
Listen for BeforeCreatingGroups event and fill in the GroupComparer property on the event argument block. This comparer controls the ordering of the groups.
The default group order is based on OLVGroup.SortValue. So you could install a GroupFormatter delegate and change the SortValue for each group so they are ordered in the manner you want.
In either case, you will need to use PrimarySort and PrimarySortOrder to know which column the user last clicked.

Related

Custom Code to repeat static row on a new group instance only

I have a report where the end user has an input section strictly for in person use. It is a row where they choose "yes" or "no", basically. The issue is that this section is based per group. So, for example, each group is a sales order, that order may have many pages, this "yes/no" section requirement is to only show on the first page of each group.
Note, I have tried to used the Previous function to hide the row, using a field a field from the header section, no luck there. I'm not a programmer by trade and more over don't have experience in VBA
I have exhausted my searches on Google and it doesn't seem like anyone has done this before. It may not be possible because in the row the fields are static texts and aren't referenced from a real dataset.
Appreciate any input or work around that could work, or solidify the fact this isn't possible in SSRS

How to click on a link in a specific row of dynamically loaded table

I have a table similar to below in a WPF application.
We are using Silk Test 17.5 using VB.NET.
Table is dynamically loaded based on latest data.
I need to click on 'Default' ( Link) for specific row.
e.g. I need to click on 'Default' link for Trump1 , Trump2 row.
How should I do it? All locators of default links are same and I cannot differentiate between them.
Is there any I can append First Name locator to Default to figure out which locator to click?
Tokci
SilkTest has a framework for supporting such custom controls and a nice tutorial here
Theoretically you would have to:
List all the methods on the control
From the previous listing (or by talking with the developers) look up the method to access the rows inside the control
Filter your rows and get the one which is interesting for you
From the row you can get the cell by following the same pattern(find out the method which gives acces to it, get it, filter)
Click on the Link
Of course as the tutorial tells you, if you do not want to always do these iterations you should create some higher level utilities where you can just get the Cell at once. Example: GetGridViewRowCell(gridView, cellRow, cellColumn) where cellRows can be a more sophisticated filter object where you describe which cell must have which value in order to identify the proper row
Assuming the table has a hierarchical structure similar to HTML, you should be able to do the following:
Locate a cell in the row you are looking for that is easy to find, e.g. //WPFDataGridCell[#text='Obama'].
From that cell, move up the hierarchy one step using ...
Now you're in the correct WPFDataGridRow, search down again for the row's "Default" link with //WPFHyperLink[#caption='Default'].
Putting it all together, you'll get a locator like //WPFDataGridCell[#text='Obama']/..//WPFHyperLink[#caption='Default'].
Of course this is only an example based on the information you provided, so if you try it, make sure to pick the attributes with Silk Test's locator spy to make sure you get the correct values.

Best way to handle multi-valued fields as a view/grid

In several notes applications, instead of handling related data as separate documents, if the size of the data is small (less than the 32k limit), I'll make several multi valued fields and display it in what I call a "List Panel". It's a table where each column displays one multi-value field. Since fielda(1) goes with fieldb(1) that goes with fieldc(1) there is a concept of rows. (I did a similar thing in my auditing routine discussed here )
It is always assumed that each field has exactly the same number of elements.
All the multi-value fields are then stored on the single document. This avoids several coding conventions that made my eyes bleed like having date changed, who changed it, new value fields for each field we wanted to audit. Another thing that this kept to a minimum was having to provide multiple fields for the same thing that locked you into a limit. Taxrate1, Taxrate2, Taxrate3, etc...
In my "Listpanel" the first column is a vertical checkbox. (One for each element in my lists) This is so I can select one item to bring up and edit, or select multiple values to delete "rows" or apply some kind of mass change to them.
What would be the best way to handle this under xPages to get this functionality? I tried making a table but am having the devil of a time to get the checkboxes to line up with their corresponding data items.
Views and dojo-grids seem to assume we're using a document for each row.....
This TableWalker may provide what you want http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Tutorial-Introduction-to-XPages-Exercise-23
It was created when XPages was all very new, so it's SSJS rather than Java. But if you're comfortable wiith Java, converting it probably won't be a challenge.
You could use a repeat control to display the values and build a table using the table row tags in the repeat. You would want to calculate the id of the checkbox to be able to take an action on that selected row. The repeat var would be just one of your multi-value fields and you use the index of the repeat to get the value for that row from the other multi-value fields.

How to display filtered data rows as a tooltip in Tableau Public?

Noob here, I have a table with different entries (rows) per different (repeating) regions.
I'd like to be able to display the data rows filtered - matching that particular region thanks - so I get those particular fields related to each region as a tooltip on a map. (I know how to build the map)
Thank you
Just dragging the fields you want to Details or Tooltip is not doing the trick?
Putting a measure on a shelf (other than filter shelf) includes that field in the visualization query results -- i.e. applies the chosen aggregation function to yield an aggregate result value for each partition of the data (as specified by the unique combination of dimensions)
Putting a dimension on a shelf (other than the filter shelf) also includes that field in the query results, but since the dimensions define how data rows are partitioned, it can affect the level of detail of the query. You'll notice this often as suddenly getting many more marks in your visualization after you add a dimension to a shelf. If you are familiar with SQL, dimensions define the fields that follow the GROUP BY keyword.
EDIT
Thanks for the addition, #AlexBlakemore. I've never said dragging a dimension would not work, only that it wouldn't work as the OP wanted it to (basically the same as you're saying).
And though everything you said (above) is true, it's particularly not exact when it comes to maps. Yes, dragging a dimension will further partition the data, but it will not create additional marks on a map (unless it has also geographical properties). Rather, the tooltip will get the first occurrence of that dimension, and display data for that only. For instance, if you drag "Product" to details, and the possible values are "Bread", "Coffee" and "Milk", it will probably just show "Product: Bread", and the measures for "Bread" only. So yes, it will partition, but no, it won't create additional marks.
Back to OP problem. What I believe you want is a tool tip with all values of the dimension (in my poor example you'd like to see "Bread, Coffee, Milk"). Tableau does not have functions to aggregate strings yet, so it's hard to do so.
What I would suggest is to create a separate sheet, and just drag the dimensions and measures you want to rows. Then put it side by side with the map on a dashboard, and use the map as a filter. Then, when you click on a country/region/city, you'll see the data of that region on the other chart.
Refer to: http://kb.tableausoftware.com/articles/knowledgebase/creating-filter-actions-dashboards
or https://www.tableausoftware.com/learn/tutorials/on-demand/authoring-interactivity

How to make a MS Acess Report where you have one page per record?

I cannot figure this out for the life of me.
I want a report object where each page (no matter how big, small, etc) corresponds to one record in the underlying source query (each record corresponds to a Client along with some financial data).
I've tried grouping by Client, inserting page breaks, trying to integrate forms, etc. Nothing. Everything just combines together into one giant list -- there's no separation per page.
Select the Group Header and view Properties (F4). It should be named something like GroupHeader0. For the Force New Page attribute, select Before Section, After Section, or Before & After Section.
The hardest part of this for me was finding the correct item to click that has the Force New Page attribute -- it isn't the field itself, but the Section (which is named "GroupHeaderX" by default).