iOS swift options for spreadsheet tables - ios

I'm new to Xcode but have been able to overcome every hurdle so far. Now I'm at a fork in the road and not sure which direction to go. My iPad app takes user input and then it generates reports based on the input. I want the reports to have as many columns as my entities have attributes, and for each attribute to be a column header and to be sortable, just like a spreadsheet. UITableview seems to let me display a dynamic number of rows, and then if I have a custom cell with several manually created labels mapped to attributes I could sort of simulate columns by having a bunch of buttons on a navigation bar that change how the table is sorted. Problem here is that if I change my data schema i need to redesign the cell view and write new code for for the sort columns. HTML also seems like an option, but it feels and looks very different for the user. There's also 3rd party, but stubbornly, I want to build it myself. Could you guys provide some guidance on the pros and cons of each option for my use case? If I go for the first one, is it possible (feasible) to write something that could auto generate the storyboard layout in the case of adding a new attribute to an entity? Platform: iPad, Language: swift, data set is not enormous (sub 100k rows, worst case), using core data, need flexibility on the reporting side - would love an interface that lets users generate their own reports (don't want my life to become custom reporting)

Are you familiar with the UICollectionView class?
Take a look at this example over at github:
https://github.com/darrarski/DRCollectionViewTableLayout-iOS
This is an excellent way to organize cells as in a spreadsheet.
There is a nice swift tutorial over here:
https://github.com/darrarski/DRCollectionViewTableLayout-iOS

Related

Umbraco 7 Creating Reusable Data (not layout of such)

I'm new to Umbraco (using latest version, which at this time is 7.4.3) and really don't have any experience with CMSs at all, for that matter. I'm needing to give content editors a way to create many "Reports" which consist of meta data about each (Date, Title, associated downloads) and then "Sections" of the "Report", which is basically a table of contents with associated content.
Reports
Report1
Title
Date
IsArchived
Sections
Section1
Title
Content
Section2
Title
Content
Report2 ...
Each "Report" could take quite a bit of time to set up and each one's data will be reused on various web pages and in different display formats (such as list of reports vs. full report detail).
Using Umbraco, what is the best approach for this? I'd like the content editors to be able to define the report data once and then pick that data to be displayed on various pages and in different ways.
I've seen posts about using Archetype to create reusable "pickable widgets" (http://24days.in/umbraco/2015/umbraco-zeitgeist/#picked-widgets), but that seems kind of hacky and unintuitive for the editor users. Then I've seen mention of creating whole new custom sections of the BackOffice, which seems like overkill and possibly a hell of a lot of work and ramp up time to learn how to do so.
Ideas?? TIA!
Your requirement seems like the data you want to provide is dynamic (in other words, going through different documents and collect data). If you use the datatype way of persisting the report data, it should be manually edited and data might become stale..
If this report needs to be pulled at run time, it may be wise to pull the data from Umbraco at run-time and may be cache it for a while so that request for the subsequent report requests are faster..

Saving and Filtering Favourites from a UITableViewController without Core Data

I am building a simple informational based app that provides the users with built in Leaflets and Images to view, on a variety of topics. It's a UITabBar -based application where the first tab is a list of Leaflets, the second is a list of Videos and the third is a list of Languages. Each tab is represented by a UITableViewController.
I would like to set up a favouriting mechanism where users can swipe across any leaflet or video in the UITableViewCell and "favourite" it. Whichever they favourite will then get added to the 4th tab called (unimaginatively), Favourites.
I'm not using Core Data with this application because there's no real need to do that and because I'm quite new to this concept, I'm wondering on the best way to save up to 50 favourites. How would I store this? Would I use something like a NSUserDefault for example?
It's a broad question because I've looked online and I'm not quite sure how to approach this.
I would really appreciate if anyone had any guides or thoughts on how to firstly save this and secondly, how to fetch the favourites for the favourites tab. Would/Could I use something like a NSFetchedResultsController even though I'm not using Core Data?
Should I just use Core Data with this, to save the favourites?
Any thoughts on this would really be appreciated.

Can I make a summary of only selected data?

I want to select only certain rows and columns and use the same "summary of responses" feature but for limited data rather than all of it. Is this possible?
The report is with ALL DATA from this sheet - I want the exact same output but with only certain email addresses.
Google Form: bit.ly/bilvalchal_results
If I have a google spreadsheet can I make a summary of only selected data?
Yes, but I think your Title may be misleading. I thought at first you wanted any summary but now believe you want the specific format provided by Form > Show summary of responses, and that is quite different.
Is this possible?
In essence, I think not. For example, in Excel it is easy enough to avoid charting data simply by hiding it. That seems not to work here. Even deleting data in the Form responses sheet does not change the Summary of responses.
This presumably because both the Form responses sheet and the Summary of responses are distinct views of server-side data. I doubt there is a means for a user to control the code that drives the Summary of responses, whose data is gathered from the individual form submissions (as is the data shown in the responses sheet). Submissions have spawned both the sheet and the Summary but the two are independent of one another.
On the other hand.
As mentioned by #zeroCoder, equivalent results might be obtained by a user though it would seem with a considerable effort. A script may be required to set the chart type to use for each question by question type (if to avoid an ad-hoc basis, Form by Form). Once the type appropriate to each column has been determined it would be a little tedious but not difficult to create the corresponding chart. Adjusting the formatting, scales etc to match that of Summary of responses would also be tedious but with a script would not need to be purpose-built for each Form individually.
That said, I hope I am crassly mistaken and that actually it is quite easy. I suspect however you would have heard by now were that so.
Another option is to use the Awesome Tables web app. It allows filtering of your data (and more). It is available as a gadget on Google Sites.
So this doesn't use the built in feature exactly but it does the trick.
Take your sheet with all the rows and figure out which columns you want to show.
Create a new sheet called preview or whatever.
in the top cell for each column reference the row from the responses sheet like this ={'Form Responses 1'!A:A}
Then hit File>Publish to web and chose to publish your Preview sheet only.
Get your shared link (shorten it if you must).
Post that url in your form only and presto.
You win!
You need to use pivot tables here are some tutorials on how to use them:
How to create a pivot table report
Summarize your data with pivot tables

Different Editors for one column in EditorGridPanel ExtJS

I am trying to show/load different editor on different rows of a editorgridpanel. Like a textbox on one row combobox/superboxselect on another and it could be any order, random.
The conditions which dictate which editor will be shown reside in the database.
Please tell me if this is possible and if so, how do i go about it.. I have tried pulling the conditions asynchronously which are pulled on a click event for the respective column, but calling it async causes problems. Please advise
Anything is possible, but what you want to do would take a bit of work. The basic idea would be to configure the needed grid editor(s) dynamically and update the columns with the new editors when needed. Now... what would be required to make that actually work I couldn't say offhand without digging into the Ext source -- it would almost definitely require overriding default behavior in the grid and/or column model.
Pulling your conditions asynchronously would (I imagine) be too slow for the interaction of clicking on a row to edit inline. If it takes a second or more from click to configured editors, that would not be acceptable performance. I would try to find a way to send your conditions down along with the other row data if at all possible (they can be in the store's data model on the client without having to be shown in the grid).
Without knowing more about your business requirements, it might be more appropriate to ditch the editable grid and instead go with a dynamically-configured FormPanel tied to the grid. This way the interaction of clicking and then pausing slightly while the form is configured would appear to be more natural. Also, the functionality of rendering a form with a particular configuration is perfectly standard and would require nothing fancy on your end. See this example as a starting point (your form would be dynamic, but maybe the same type of interaction could work?)

Document User Interface using QuantumGrid (TcxGrid) from Developer Express

I need to generate a user interface for entering a sales document (eg invoice). I'm trying to use components of "developer express" specifically the QuantumGrid component (TcxGrid). I've seen the demos of master-detail components and search in the devexpress support center, but none has helped me because all use 2 grids to handle the master-detail relation, and edit multiple records at once.
I just need to edit a record (document) at a time and using a pair of objects dataware components (eg TDBEdit) in the header and a grid to handle the detail.
something like this
Where can I find a basic example of using these components in this way?
Tthe Master/Child properties in the QuantumGrid are mainly designed to nest multiple items in the grid. If you setup the relationship in the data components you can simply hook the controls up to the correct DataSource and everything will work.
So if you have two DataSets Customer and Invoice. The Invoice Master Datasource is the Customer DataSource. Then on your edit controls you point to the Customer DataSource and you point the Grid to the Invoice DataSource.
If you think about what the Master/Detail relationship is doing it really just filters the records on the Detail DataSet to match the current record on the Master DataSet. Individual Edit controls will always display the "current" record in the DataSet they are connected to. Grids will show all visible records in the DataSet they are connected to.
I have a tendency to not use Master/Detail relationships in an edit form like you show here. I'm assuming there is some way on a different screen to pick the invoice to edit. I usually create a copy of the needed DataSets with only the records needed for this edit. If I am editing a existing invoice I copy the current records. If it is a new invoice I can start off with an empty recordset. It is more work - I have some generic library functions that will copy a DataSet Structure and then copy one or more records into that Dataset. Depending on your setup you can also requery your Database to just get the records you are interested in. Obviously that should not be done in all cases. Another issue with this approach is you need a way to update any other Datasets you may have with this data - i.e. your main search screen.
However, once I get on the edit screen I find it makes things eaiser. Now I don't need to worry about the master detail relationship at the top level. If the invoice has internal Master/Detail relationships you can just deal with those, but you know that the DataSets only have the data for this one invoice - not everything in the Database.
In the case of your form if you limit the Data in the DataSets you can just hook everything up directly and it should work as you expect. You would only have one record in the Customer DataSet and the invoice would just have the records for this Invoice.
I think you'll need to take care of the master-detail relations in your ClientDataSource components. The grid will then follow this relation.
Why don't you ask this at support#devexpress.com ?
The reason why I have a vcl subscription is, apart from the quality of the components of course, because they do have a great support site and staff ?
There you ask it directly to the people who have written the stuff, and they are most likely happy to supply you with a sample program (at least I have received a lot of samples over the years).
The premise is the same as with any other master-detail relationship, regardless of the components. You will need to setup the master-detail on the dataset level to accomplish what you want.

Resources