How to make tablix expand towards the left? - visual-studio

I have a tablix, one with dynamic columns. The order is fine ("total" shows up last) but the problem is that, for scanning purposes, the last column needs to always be aligned right and any additional columns have to be to the left of that origin point. How to accomplish this?
I've tried setting the "Direction" of the column to RTL and tried putting another object on the right of the tablix but that just gets pushed to the right for every extra column. Is there some sort of anchor property I'm missing or something that'll keep the tablix from growing on the right side?

There aren't any properties that allow you to dynamically change the width of columns or the position of tables etc. As a table grouping grows, it pushes other elements out of the way. First thing to try is put both of the tables in a rectangle. This can help keep them in position.
Another option is to use visibility to change where your values appear, while maintaining the same underlying layout. Depending on the specifics of how you're trying to lay things out, this may be difficult to use for your purposes.

Related

how to show a field in oracle reports at the bottom of the last page which is placed outside the border

how to show a field in oracle reports at the bottom of the last page which is placed outside the border
A trivial answer is: place it outside the border.
I presume you already did that and encountered problems. It would really help if you specified which one(s).
The most usual error is that you're referencing a column at a wrong frequency, i.e. you can't just "move" it outside of its parent frame. (I guess that the frame is what you call a "border".) If that's so, well, you can't do that.
One way out is to create a new column (in the Data Model layout editor) (be it a formula or a placeholder column) which doesn't belong to any group, but is independent. Then you can place it anywhere you want.
If, on the other hand, you do have a formula (or placeholder, or summary) column and "border" you mentioned is the margin, then - while in Paper Layout editor - click the "Margin" icon in the toolbar to switch to ... well, margin layout editor. Now place that field anywhere you want.
Or, did you try to move the field but frames were resized and other fields moved along with the movement of the field you're moving? Pay attention to "Flex" and "Confine" ON/OFF buttons in the toolbar as they make the difference.
If none of above, what is your situation, then?

Does anyone know why an object would miss a property?

We have a script that export our Indesign documents to HTML and one of the routine is to export tables. In this script we go throught each Tables->Rows->Cells and evaluate some of the properties (i.e. bottomEdgeStrokeType, topEdgeStrokeType, etc...) and transport them to HTML.
Now yesterday we had problem converting one particular document because some cells were missing the "bottomEdgeStrokeType" property entirely. I've discovered this by outputting the properties of each cells and compare the faulty ones with the others.
This line bellow was trowing the error: "Invalid object for this request.".
var cellType = cell["bottomEdgeStrokeType"];
Now, to fix this I've wrapped this around a try catch block to handle the case when it's not there, but now what is puzzling me is how on earth can Extendscript instantiate an object with missing properties?
Indesign version: CS5.5
A property is not only 'undefined' if it cannot exist at all (such as asking for the parent text frame for a character in overset text), but InDesign's Javascript engine also fails to return a reasonably accurate result for multiple values.
If you ask for "the" point size of a paragraph, where this paragraph contains multiple sizes, poor ID does not consider to return something like CONSTANT.Mixed, or the first value only, or (what I might have preferred) an array of the values; it returns undefined instead.
So how can a single table cell have multiple bottom strokes? If the cell underneath it is split into multiple cells, and one has a "top" stroke but the other has not.
It's difficult to recommend an adequate solution. You could first test if the current cell is "merged" (as far as InDesign's internal table model is concerned) with columnSpan; and if so, iterate over the number of columns spanned and test the next row's cells for their top stroke, which in theory should match the bottom stroke of the cell above. (I find myself wondering if this is always true. ID's table model is ... weird. It's not entirely like a HTML table, despite the functional overlaps.)
If columnSpan is greater than 1 and equal to the number of cells immediately below the current one, you could test if all of their "top" values are the same and if so use that value. (I never tested this so ID's table model may simply fail because a cell is merged, regardless of same-values or not.)
One could attempt to flag this cell's next row to output "top" strokes as well -- but alternating top and bottom strokes may not align nicely in CSS, side to side. Perhaps it's best to translate only the first top stroke value to "the" bottom stroke property for your current cell, and fix up manually where needed (how?) or, a reasonable action, hope that no-one will ever notice it.

Coordinating highlighting between two tables

The challenge is this: 2 coordinated tables, 1 with an overview that is laid out on a grid, the other contains detailed information about the cells in the first table. (This overview is used for other information as well, which has been removed from the minimal example below.) Mousing over either one will highlight both. Clicking on the overview table will hide or show the rows of the data view.
The problem is that the data is being defined by a JSON data object and the order of that object is very important. It's important that the data is mapped to the overview without reordering either. There may be cells not represented in the data view that are in the overview and nothing bad should happen.
http://fiddle.jshell.net/g8z5h/14/
The problem is using select all lets d3 define the order things will be taken. I need to coordinate the mapping myself. I'm hoping there's an elegant solution to this that doesn't involve writing separate mouseover and mouse click functions.
You can use a key function to tie the selection to your data:
http://bost.ocks.org/mike/selection/#key
http://bost.ocks.org/mike/constancy/#key-functions

List Control Adds a Space for an Image to Column 0 When Subsequent Columns Have Images

I’ve come across a problem with Windows list controls (I am specifically using MFC, but it looks like it applies to all list controls in the Windows common controls library).
In my specific case, I want to create a list control that has two or more columns. The first column (0) is text-only and is used to allow the user to jump to entries by typing the text in that row. Column two (or three, or four, or whatever) has an image (or an image and text; either way).
This much is all well and good and can be done easily without problem, however the final list control then ends up having a space to the left of the text in column 0 (it may be on the right on an RTL system). This spacer appears to be reserved for an image and I cannot figure out a way to prevent it. (Arranging the specific order of the columns did not change anything.)
Looking around, I found some other people complaining of the same thing, specifically this thread which leads to this thread. The proposed solution does not work because as was stated, simply shrinking the width of column zero merely cuts off the text rather than the image spacer (plus, you then have to prevent and/or process any changes to column widths that the user tries to make).
Does anyone have any ideas of how to fix this bug short of writing a list control from scratch or using one of the too-fancy grid controls on CodeProject/CodeGuru/etc.?
Thanks a lot.
Did you try to change the iIndent member of the LVITEM struct? MSDN says this:
iIndent Version 4.70. Number of image widths to indent the item. A
single indentation equals the width of
an item image. Therefore, the value 1
indents the item by the width of one
image, the value 2 indents by two
images, and so on. Note that this
field is supported only for items.
Attempting to set subitem indentation
will cause the calling function to
fail.
Column 0 is special in a ListView. As soon as you assign a small image list to the ListView, the control expects you to show an image in column 0, so it leaves space for it.
Solutions:
make column 0 zero-width, give it the value you want the user to be able to type. Column 1 becomes your "first" text column. Columns 2+ are for your images. You need full row select style for this to work. Yes, you have to prevent the user from resizing column 0. Yes, that is a pain.
make a column that does have an image to be column 0 and use LVM_SETCOLUMNORDERARRAY to rearrange the display order
owner draw the items.
give column 0 an icon (just to cover all bases)

What are ways to reduce the number of columns in a table/grid?

I have a datagrid with many columns. This makes it pretty wide. Now we want to add more information to the table. Aside from removing or shortening existing columns what are some ways we might be able to add additional information without adding new columnes.
The data we want to add would be one of several values. For example:
Projected
Actual
Other
For other cases when the value was an off/on or true/false we would change the color of the row. In this case that doesn't seem to be a good option.
Another thing we considered is using an icon to indicate the information.
Any other ways this could be done?
A solution i've seen implemented with grid components is to have a column chooser - some sort of popup dialog that lists the columns and you can select which ones you would like to see in the grid. You should be able to invoke this popup by triggering it from the grid, e.g. it might appear as an option when the user right clicks and causes the context menu to appear.
Can you group related information into tabs?
an overflow area? ie a number of fields underneath the table that populate based on the selected row.
or just only show the minimum needed info and the have full details in a popup when doble clicked or something..
1) Popup on row hover
2) Drop open inline in the grid with extra info on row click
One technique I've used in the past was to create a "container" type of class that has its own labels and textboxes, and you can arrange them however you want, then insert this class into a single grid column. You still have to do some tricks on binding multiple controls that are not native "grid column" controls, but should help you along. Then, you can actually have each row a single container control in a single grid column...
You can't add completely new data to a grid without reserving a column to display it. The best solution I've seen is to provide only the essential information in the grid displaying all records, and then create a drilldown view that shows all of the data for one row. The drilldown can either be a new view in the same form, a popup for an additional window, or perhaps a mouseover popup.
I've worked on systems that use all sorts of shortcuts to display every last bit of information on a single page, and I found that it just made everything more confusing and harder to use. "Oh, that little icon there means that <insert something totally unrelated to the icon picture>."

Resources