Drupal Views: Display most commented nodes - drupal-7

I'm wondering how I can display the most commented nodes in a page. I am using Drupal 7, trying to list 10 to 20 nodes on the bases of comment count.

You can create a view and set a sort by comment count and select display 'Display a specified number of items' for a pager and select your size as 10 to 20. Let me know if you need more help finding these settings.

Related

BlueSky, remove missing row

I'd like to remove a missing row of data. My data set looks like this (assume they all line up, and are imported from excel)
Canada 1 5 3
Afghanistan 3 7 2
Brazil 2 4 6
How do I remove the line for Afghanistan?
I'm using BlueSky 10.0.0, R package version 8, on windows 10. I want to remove the row, using BlueSky menu.
Thanks
I read a guide to blueSky, couldn't find how to do this. I searched stackoverflow, couldn't find how to do this. I might not know the right terms to use to search.
In the grid view of your data set, just choose the row with left mouse click
Then, with right mouse click you will get a menu to insert or delete a data row among others.

Position of a record within an index

If I have an index within a table, is there a way to locate the relative position of a record?
example, there are 5 records displayed:
1
4
5
6
7
then on locating value=5, is there a way to know 5 is the 3rd record in this index?
then what if there is a filter applied - my guess is when there is a filter applied, definitely have to loop through every record to find the position... so maybe there's still a chance to know if it is simply Index deployed (without filter).
thanks.
edited Purpose: to show a progress bar on position of this record relative to first and last record. thanks.

How to get the number of filtered rows in ag-grid without using in memory row model?

I am using ag-grid to display data. There are two tabs for current data and archived data. Above the grid for both tabs, in the title bar, there is a filter that filters the free text. The label of that filter shows the filtered rows/total number of rows.
In the archived tab, there is an additional filter that selects the data from past months. The filtered row count gets bigger than the actual number of rows when you quickly switch to:
Last Year
Last 6 Months
Last 3 Months
and then switch between tabs.
I think it is the in memory row model that is causing this issue.
I tried these two to get filtered rows
this.selectedRows = this.gridOptions.api.getModel().getRowCount();
this.selectedRows = this.gridOptions.api.getModel().rootNode.childrenAfterFilter.length;
I was just wondering is there any other way of doing it without using the in memory row model. Any help would be greatly appreciated.
Thanks a lot.
For future reference:
The code below is fine.
this.selectedRows = this.gridOptions.api.getModel().getRowCount();
The were some timing issues and I fixed this with resetting the row data by
this.gridOptions.api.setRowData([]);
this.gridOptions.api.setRowData(data);

SSRS: 2008 run same procedure with diff params for multi month report

I'm all about recycling-)
I have report that user want to run for selected number of month back (let say from 1 to 12).
If they selected 6 month back (Jul-13 thru Jan-2104, then I need to produce 6 pages with monthly report on each of them, and sp is the SAME for all reports just different time params.
How I can reuse my code??
For now I have 12 Tablix(s) with New Page=START, Hide condition set based on datediff(m,startDate,endDate) individually for each Tablix.
Then I need to run same sp with diff params, can I add some dynamics into it? or I better to have 12 sp(s)?
Thanks
Mario
You can achieve this with a single dataset and a List Report Item with an embedded Tablix:
Set the List Grouping to Group/Sort first by: =Year(Fields!YourDateField.Value) and then by =Month(Fields!YourDateField.Value).
Set the Page Breaks on the List Grouping to "Between each instance of a group".
Drag your Tablix inside the List Report Item.
Let me know if you need more detail.

Paging with a data set that can be changing?

I'm sure there is something out there about this topic but I just can't figure out how to word a search for it.
I have a table of records that gets loaded into a paging grid in the UI. The user has the ability to update/modify these records..also multiple users can use the system at once all hitting the same data. I have a filter on the paging grid allowing the user to see only X type of records.
When the user first enters with filter X selected they see items 1-25 on page 1 of 2. They page to the second page where the items should be 26-50..but before they paged lets say 25 records on the first page had their type changed by another user, now they don't appear when selecting that filter. So now we have 25 less items to page through which means items that were 26-50 before are now items 1-25 and what was page 2 is now page 1 and there is no page 2...
You can probably see the issue I'm getting into, I'm passing an offset to the query to get the next page of results..but now that offset is so high it returns a blank page of records confusing the user and our record processing.
There isn't really an easy solution to this problem. Even GMail/Google doesn't show the exact number of messages/pages found when searching something.
The first thing you can do (if you use a DataGrid/CellTable) is set the boolean exact as false when you call updateRowCount, and give it your current number of records instead of your total number of records. This will make the pager display "1 - 25 of over 25" instead of "1 - 25 of 50".
The next possibility is to update the row count regularly (using RPC polling to check for new/deleted records - or using server push techniques, see GWTEventService and ServerPushFAQ).
You can also check if your request returns items or not, and cancel the call/update the row count if it doesn't.

Resources