Core Data calculation result at startup - cocoa

Thanks for the help.
I have a doc based Core Data app consisting of a table with two columns. The column cells are populated with US Currency dollar values. I have two labels at the bottom of each column with Number formatters. Each label displays the sum of it's respective column. I'm doing this with bindings:
Bound to the arrayController
Controller Key - arrangedObjects
modelKey - #sum.regAmount, #sum.regAmount1
The label attribute Types are int 16 in the data model.
Anyway, these calculations work fine, and the resulting values are displayed at startup.
What I need to do is also display the difference between the two resulting sums at startup in a third label. For some reason I can't pick up the sum values to preform the calculation.
This action works using a sender:
(runningBalance.intValue = (theDeposits.intValue - theAmounts.intValue));
How can I automatically display the calculated difference of the two sums at startup without manually executing the action?
Thanks again.
Paul

You don't need an action, you need a model key you can bind to just as you do with the sums. Then you bind that to the label's display(?) property and it should be called automatically.

Related

SSRS Static fields in groups

Good afternoon!
I have created a report with the wizard to create a matrix that is grouped and has drill down rows. I have added filters to the rows and columns and it works great! I then copied that matrix and modified the filters, so I had two matrixes.
But what I really wanted was those two rows in the same matrix, just in different row groups. So I added another group, using the adjacent below option, and then added all the child groupings. However, when I run the report it shows the values for the first row of the drill down data.
When I look at the groupings I can see the one I did manually has a 'Static' field in each row grouping but the ones that the wizard did (with the red ?), they don't have that "extra" row:
What do I need to change or how do I need to add my groups so that I don't get that "static" row and not show the data? I have the visibility set to 'Hidden' and the toggle set up for the prior grouping set data.
Assuming a few things....
the data comes from a single dataset
You are differentiating between Property and Violent crimes by filtering on a column, I'll call it IncidentGroup for the sake of illustration..
I've understood your question ! :)
Get to the point where you had just a single tablix filtered to show 'Property crime'.
Now remove or edit that filter so it shows all the data you need in the report.
Finally, right click on your Matrix1_IncidentCategory row and add a parent group, choose IncidentGroup (or whatever the column is actually called) and check the box to add a group header.
That should be it, there is no need for a second tablix.
Without knowing how you are filtering currently it's hard to give a complete answer but this should get you close, if not all the way there.
If this doesn't work for whatever reason, please post sample data from your dataset output and your current filters.

How to correctly bind a DDL in LibreOffice Calc

I'm trying to bind a serie of simple lists with 2 values to a DDL in LibreOffice Calc. I want the DDL show the description and that returns the relative ID in the linked cell. I currently can just partially do that, I'm unable to show the description in the DDL, as per my image:
I have other lists but the concept is the same, the list should always show the decription and return the relative ID, every list is on its own, so element in list A is not in list B as they are groupped up by type.
The following are the settings in my DDL, the marked setting is always disabled, regardless of what other setting I select. The marked setting should be "data field" and I suppose that it should allow me to specify what column in my list contains the data.
In your example, the control is not bound to any data source. So, it cannot be bound to an underlying field.
The full solution is to create a data source in LibreOffice Base and then use it as the underlying source for the form. Then it is straightforward to bind the combo box control to a field, either through a wizard or by changing the settings.
However, perhaps you want to avoid the complexity of Base. In that case, if the descriptions are unique, then use those as the source of the list, and get the IDs with a function such as VLOOKUP.
EDIT:
Here is an example of VLOOKUP in A6, where A5 is the linked cell.

SSRS - Merge Repeating Texboxes w/ Distinct Row Values

Everything except for the name may or may not be different, but it doesn't matter.
How do you make it so the name and address (first column) can only show once if the value on multiple rows is the same? There is no way to merge the rows together due to the numbers of rows being generated from a group expression. But if there is another way to merge then can someone tell me how to do it? If not, then is there at least a way to blank out the second and third repeating names (and address)?
This is how you hide repeating values in a tablix column.
In design mode, click on the detail cell that you want to keep from repeating if the values are the same. In this case, you are referring to that one as the name and address column.
Look for the HideDuplicates property in the Properties pane. Set the value to the name of the dataset the tablix is using.
Now, when you run the report, that value should only show once. The other rows where the value had been repeating will be blank in that cell.
Set the borders appropriately (none, or solid) to make it look like the cells are merged. Doing the above alone will not merge the cells. Only a row group will do that.

Populating NSTableView with content from array in another array

everyone!
How to populate first column of nstableview with strings from array and the second column with strings from another array in dependence of selection in first column?
For example, look at the iTunes window, where the first column is selected playlist, and the second, a list of songs.
I could not find something like this on the internet.
I would be very grateful for the help.
This is little info about my model:
array with content for tableView populated with instances of NSObject sublass. This instances have three properties, to properties - NSString object, and last property an NSArray object with another strings. First and second properties used to populate first column, and i don't know how to populate sec on column with third property (strings from another array).
How to do this with bindings?
First of all: You do not populate columns, but rows. But reading your whole question, it seems to be that you understood this.
The solution is, that you do this with nested arrays and two table views:
Bindings:
A. The first table view gets the array of instances via an array controller that are on the top level of your model. Let's say "list of playlists". This array builds the rows for that table view with probably one column. The first column is bound to a property, likely "title".
playlistsArrayController.contentArray: somewhere.playlists
viewColumn.content: playlistsArrayController.arrangedObjects.title
B. Then you have a second table view with a second array controller. This is bound to the selection of the first one (playlists) and the property that contains the subentries, i. e. songs. This second array builds the rows of the second table view. Typically you have more columns there, every bound to a specific property ("title", "length", …)
songsArrayController.contentArray: playlistsArrayController.selection.songs
viewColumn1.content: songslistsArrayController.arrangedObjects.title
viewColumn2.content: songslistsArrayController.arrangedObjects.length
Both bindings are typed in Safari only for explanation.

Orbeon form builder - limit repeating element based on field value

I am using Orbeon Form Builder and have a form with a repeat section. The no. of repeats has been set to 3 however I want to vary this depending on the value set in another field. Do you know if this is possible?
The field and repeating element are in different sections on the form.
Thanks
Paul
I created a working example. The idea:
place an event handler reacting to a change of value of the count field
depending on whether the value is larger or smaller than the current number of iterations, remove or insert new iterations
this relies on the xxf:bind() function, and on knowledge of the grid repeat template
This said, as is I don't think it's a good user interface, as it can delete data upon tabbing out of the count field.

Resources