grouped UITableView to generate block rows - core-data

I want each row of my table view to appear, as it's own independent block, a little like how the Twitter app has on the Discover section (they have the top 3 trending word as 3 blocks.
I am trying to recreate this and the route I am trying to go down is having my table as a grouped tableview but instead of treating each row as a row of one section, I will treat a row as a section, thus generating blocks, each block will have only 1 row.
It sounds like a hack, I'm sure it's not the way to be doing it, but can anyone lend some tips about this kind of setup ?
Also I am using NSFetchedResultsController and I need to specify I want my objects ordered by date, but the section be defined by a unique id which would allow me to generate a section per row. I am not getting any luck with my fetch request either, so I guess this is 2 questions.
Although if I am wrong with the first part, the second becomes irrelevant.
Thank you.

I would not do it this way. Looking at the Twitter app, I have no doubt that this is a grouped table view, and the block sections use the first row as the title and a second row with a bigger row height for the content.
You can adjust the sections and rows as needed in the table view datasource methods, based on what comes back from the NSFetchedResultsController. Only caveat is that you have to be careful when you use the index path to refer to the core data objects.

The design of the Twitter "blocks" suggest a grouped table view, in fact I did manage to achieve this with a plain table view I just needed to be careful with the borders and background colours behind the cells...

Related

SSRS Separate Table for each grouping

I have a simple SSRS report which has one group and details. The grouping is by employee and the details are performance data on each. After tedious calculation, it just comes down to
select * from table
and I have SSRS do the grouping on the employee column. There are several tasks for each employee, so that is why the grouping in the first place.
My problem is, the user would like to be able to distribute these stats to the employees, and it would be easier if there were some white space between these groups (between each employee).
I've tried adding a blank row inside or outside the group, but I can't find a way to do that so it won't put a row between each task. I tried using a list, but in the end, got the same problem--the group still forced it to behave that way.
I know I can insert a page break between groups, but that would be a huge waste of paper, having each employee on a separate sheet.
Is there a way to essentially have each employee (group), be in a separate "table"--such that I would have maybe a half dozen on a sheet that could easily be guillotined?
EDIT: Here's a screenshot of it as it is now:
Table
I don't know how I could use a rectangle because the results (groups) are all in the same table. The idea would be to insert a space between each group (person).

Excel: Averaging the values from a set of rows, but only include them if they have a specific value in a column

I'm looking for help dynamically averaging the column values of every item in an Excel table that has a given value in one of its columns. Specifically:
I have an Excel sheet where each row represents an entity in a video game I am working on, and each column is a numerical value for different attributes on these entities. Movement Speed, Health, Attack Damage, etc. Each of these rows also has a column where I tag the row with the name of the class that this entity is a part of: "tank", "support", etc. This table has roughly a hundred items in it, and is likely to grow to two or three times that size.
It looks something like this:
What I would really like to do is have, on a separate tab, a table where each row represents one of the classes, and shows the average value of all of the entities that have that class in their "group" column. And I want it to automatically include new entities of that class as they are added to the first table.
It would look something like this, where these values are automatically generated from the data in the first table (I have no problem manually entering the class names, I just need the numerical data to be driven):
I imagine that the solution will be a complex, nested pile of VLOOKUPs and MATCHes and other Excel functions, but I am not really sure how to accomplish this. I didn't even know the proper terminology to search for existing answers to this question, so I hope that it isn't too redundant. Thanks very much for any advice you have!
Version: I am using Excel 2013.
I think all you need is a pivot table. (its been around since the 90s?) - and very useful!
there are lots of ways of refreshing etc depending on where the data comes from
http://office.microsoft.com/en-us/excel-help/pivottable-reports-101-HA001034632.aspx

How do I create report-like data tables in Excel?

In the past I have created websites that extract data from a database and format it using tables.
Now, I am trying to do the same thing but with Excel, and I'm lost. I am used to using SQL commands to extract data from given fields and then sort/manipulate it.
Currently, I am able to print a report that provides me with an Excel spreadsheet full of raw data, but I would like to make my life easier and organize it into a report.
The column that I would like to reference contains duplicates, but the data in the adjacent columns is different.
To give an example, assume I had a spreadsheet of sales transactions. One column would be the Customer ID, and the adjacent columns would contain the quantity, the cost per unit, total cost, order ID, etc.
What I would want to do in this case would be to select all the transactions with the same Customer ID and add them together based on their Order ID. Then, I would want to print the result to a second sheet.
I realize that I can use built-in functions to accomplish this, but I would also like to format this report evenually using VBA. Also, since I will have a variable number of rows that differ from one report to the next, I haven't encountered a fucnction that will allow you to add rows.
I'm assuming this must be done with VBA.
Well you can do it manually, but it would take ages. So VBA would be good, particularly as you would be able to generate future reports quickly.
My interpretation of what your saying is that each row in your report will be the total for one customer ID. If it's something else, I imagine the below will still be mostly relevant.
I think it would be a bit much to give you the full answer, particularly as you haven't provided full detail but to take a stab at what you'd do:
Create your empty report page, whether it be a new worksheet or a new workbook
Loop through the table (probably using While next is not empty)
a. Identifying if a row is for a customer ID you haven't covered yet
i. If so then add a new entry in your report
ii. Else add it to the existing customer ID record (loop through until you find it)
Format your report so it looks pretty, e.g:
a. Fill the background in white
b. Throw in some filled bars
c. Put in good titles and totals etc.
For part 1, it might be better building an array first and then dumping the contents into the report. It depends how process intensive it will be - if very intense, an array should shave off time.

repeat control from categorized view

I have tried to get the column values in repeat control from Categorized view in xPages,that time i got the column values are coming with single row,and the same row repeated
How to get the column values in "repeat control from categorized view"?
Thanks
I had a situation where I had to drill down from a much larger view and repeated the info back out with the following.
View is categorized in first column by what I'm drilling down by. I achieve this in the XPage/Custom Control by defining the view as a source in the data tab, then select "filter by category name", bind my repeater to that view data source, and compute the value I'm drilling down.
Then in my repeated table, each of my computed fields for each of the column entries read like:
rowData.getColumnValues()[1]
Adjust for your other columns by position with the array modifier after your getColumnValues method. This is not an elegant solution, but worked for my needs. Hope this helps if it's what you're looking for.
[Update]
It's worth noting that doing this can potentially create a memory handle for any DateTime objects which may be returned in the entirety of the getColumnValues method. If you're going to use this approach, I strongly recommend getting a handle on the column values separately, so you can perform a session.recycle(colVals); on them to prevent any memory creep.
[/Update]

How to filter out a column entry in YUI Datatable that ends with a given string

Currently, I am working on a YUI datatable with hundreds of entries. The table consists of four columns, the first one (ID) being the primary key. What we want to do is to ignore any entries whose ID "ends with" a specific number. The source code is very big and ugly, so instead of posting code snippets, I wanted to post a rather high level question.
I've seen several YUI datatable samples, but none of them examplified what I want to do, namely filtering out data that ends with a given string. Has any of you been able to do this?
Are you wanting to filter the data before it is bound to the datatable? Have you looked at the datasource events such as doBeforeCallback?

Resources