Context unique to each group at a specified level - wolfram-mathematica

Recent versions of Mathematica provide the option of having a unique $Context for each cell group, via:
Evaluation > Notebook's Default Context > Unique to Each Cell Group
This is an appealing concept, but I find it unusable, as my code spans multiple cell groups.
I would like a way to specify a unique context for cell groups of a certain level such as every Section, but not a separate context for every Subsection or Subsubsection.
A solution will need to affect new cell groups as they are created.

You should be able to do this by modifying your notebook's stylesheet. You can use the option CellContext to set the context. The mma documentation does this to restrict example context to Cell groups.

You can achieve this by grouping cells manually instead of relying upon the automatic grouping mechanism. In the notebook in question, use the menu item Cell / Grouping / Manual Grouping to enable manual grouping. Now, as you enter sections, subsections, etc. they will not be grouped automatically. Select the cells that you wish to be in a single group and use the menu item Cell / Grouping / Group Cells/Group Together. Now that they are grouped, you can set the CellContext to be CellGroup and they will all play well together.

Related

Trying to get Tableau parameter to recognize filters applied

I have a dashboard with two worksheets. One of the worksheets is a bar chart with just one dimension, Model Name. I've added a Top N parameter to it, set to display only the Top N highest priced items.
The other worksheet is a bar chart at a higher category level, and I'm using that as a filter for the other. So when I click on one of the categories, the other worksheet should display the Top N items for that category. But, when I click on a category, the other bar chart goes blank. My thinking is that the parameter is applying to the entire dataset, and not recognizing the filters applied.
I've tried changing the filters to context, but that hasn't rectified the situation. Is there a way that I can get the parameter to recognize the active filters?
If you want the filter to be evaluated first, you can do that by right-clicking on the filter item and select "Add to context."
For more, see Tableau's "Use Context Filters".

Orbeon: add section for each row in repeating grid

I would like to build a form that has some kind of overview at the top, where the user defines a list of items (repeating grid). For each item, there should then be a section further below (repeating section) where the user needs to add additional information to that specific item (it's A LOT of information, that's why I need a whole section per item and can't just add additional fields in my repeating grid).
So the easiest way would be to let the user manually add a section per item, but that's not very user friendly and also I need to make sure that there is exactly 1 section for every item.
I tried using count($my-item), count($my-grid) and count(xxf:repeat-items($my-grid)) as the min and max iteration count of my repeating section, but neither work. Also when I add $my-item as the calculated value of the first text field, always the first item in my grid is taken (should be the i-th, i being current iteration count).
Demo here (should be self-explanatory):
http://demo.orbeon.com/demo/fr/orbeon/builder/edit/92384bdcfd5dfeef2f79e79540e566501e6e5243
How can I achieve this?
Orbeon Forms 2018.2 will have a component to automatically synchronized repeated content. See the documentation for details.

Remove Tablix Static Columns Row Groups in SSRS

I have a report in SSRS that uses a matrix with static columns.
Here are the static columns:
After generating the report, the rows with same values end up being grouped together:
Is there any way to get rid of these groups? I'd rather the values be repeated for each row, so it looks more like an excel sheet.
Here is a better picture of my report design plus the row and column groups. These groups were created when I added them to the matrix and are not needed as far as what I can tell for my report:
As you are not doing any calcuations on hte row gorups, there is no need for them.
Delete all but one of the row groups by right-clicking the rowgroup in the Row Groups pane at the bottom of the screen and choosing Delete Group. If prompted, choose Delete Group Only, otherwise it will delete the associated columns too.
When you noly have one group left, right-click it and choose Group Properties and delete the group expression, this will change it to be a details style group.
Make sure the Hide Duplicate expression is back to default (blank or None) in case you changed it earlier.
That should work. I replicated a similar scenario to your and the above step did the trick.
You will probably also need to go back to your group properties and set the sorting options to ensure data is sorted correctly.

Telerik Reporting: Repeat a page containing 2 graphs and a table

I need to build a report (in Visual Studio) that takes an ObjectDataSource, and groups the data into separate pages. Each page needs to contain 2 graphs and a table that deal with that particular group of data.
How can I approach this? There is some documentation on page breaks on groups in a table, but my pages need to contain charts as well. Is there a demo that shows how to build what I need?
Eventually I will also need to add this report into a ReportBook, but first things first.
If I understand your question correctly this should be straightforward:
Create a new report
Add a group definition to group the data into the two distinct groups that you want to display. [Careful here because if you don't define your groups correctly, you could end up with more than 2 pages] Use a Boolean or "greater than" and "less than or equal" (or vice versa) are your best bets.
Size the Group Details section to be the size of the page you want (8.5"x11" or whatever fits on "one page")
Insert a Panel into the Group Details section and expand it to be the same size as the Group Details section
Anchor the panel to all sides, and set the CanGrow and CanShrink properties to "false"
Inside the Panel add your Graphs and Table and bind to the grouped data
Set the Page Break property of the Group Footer to: "After" to separate the data into two pages

(DHTMLX Grid) Grouping show/hide column checkboxes

So I have a treegrid, and I want users to be able to not only show and hide columns, I want them to be able to show and hide columns in bulk. Right now, I'm using mygrid.enableHeaderMenu() in order to allow the users to show and hide columns. However, I have about 50 columns, and need to give them the ability to show/hide columns in bulk.
For example, a sample of my columns would be:
foo
bar
baz
unrelated
I want users to be able to show/hide the foo, bar, and baz columns using one checkbox, as well as be able to show/hide each column separately.
The shortest way seems to add your own context menu to the header, and call a needed functionality in the item clicking.
In case of using the dhtmlxMenu you may use:
menu = new dhtmlXMenuObject();
menu.renderAsContextMenu();
mygrid.hdrBox.id = "gridHeader";
menu.addContextZone("gridHeader");
Here is the tutorial about the dhtmlxMenu component:
http://docs.dhtmlx.com/menu__index.html
I wound up modifying the enableHeaderMenu function and adding the grouping mechanism in there.
To clarify, I used the source code in dhtmlxgrid_hmenu and created my own functions based off of that code. The actual grouping is done in _createHContext. To have it so that the checkbox for the group enabled or disabled grouping for the entire group, I copied the code for applyHideFunction, named it something else, and had that code apply setColumnHidden to all of the checkboxes in that group.

Resources