RDLC report table merge cells issue - visual-studio-2005

I have a rdlc report in which I have a table with 6 columns. Of these 6 columns, the visibility of the 2nd and 4th column are toggled. i.e. if 2nd column is visible, 4th is not visible and vice versa. The report displayed properly with these settings.
Then a new row was added to the table. All the cells in this row were merged and a rectangle added to this row. Then a few textboxes were added to this rectangle. Now when this report is run, the display of the table is disturbed. An empty column in shown before the last column and the header of the last column also appears displaced.
After a few permutations, I zeroed in the actual problem.
If you have a table with a row with merged cells and a rectangle in the merged cells, then hiding any column does not disturb the display, but if you add a textbox to the rectangle, the display of the table is disturbed as mentioned above.
Is this an inherent problem in RDLC reports or I am missing something here ?
Note, the reports are run in local mode and environment is Visual Studio 2005.

This seems to be defect in ReportViewer. Setting a column's hidden property to true should be sufficient to complelety obscure the column. However in this case, along with setting its hidden property to true you also have to set its width to 0.0 inches to completely obscure it.
I am discarding my earlier answer. The solution described above does work but has some glitches.
A more proper method is allocating a new column array to the column collection of the RDLC report table via deserialization and then serializing the report back. Deserializing an RDLC report exposes it as an Object. This column array will contain the original table columns except the ones that are to be hidden.
The solution is complicated but effective.

Related

free-jqgrid: hide/show column affect to frozen column?

I have a jqgrid with 2 frozen columns. Frozen works fine if I do not anything.
After I hide/show another columns (not frozen columns) frozen is not working.
I use free jqGrid version 4.14.0
I don't know what happen.
Can anyone help me! Thanks in advance..
If you use low-level methods showCol, hideCol, showHideCol directly then you should choose yourself which one from two solution ways provides the best performance in your case.
Showing/hiding of columns is relatively slow, because all rows of the grid, column headers (inclusive the filter toolbar) need be looked through and the inline css style on the corresponding cells be changes (display property should be set to none or the none value should be removed). After that the with and the height of the grid could be changed too. If the grid has frozen columns, then the same should be done in the frozen dives. Additionally the width and the height of frozen dives should be recalculated and the height of every row of the frozen columns should be recalculated too.
Thus one have two alternatives:
hide/show all columns which you need by calls of showCol, hideCol, showHideCol and then trigger jqGridResetFrozenHeights event on the grid to force recalculation of all width/height properties of frozen dives
destroy the frozen columns by call of destroyFrozenColumns, apply hiding/showing the columns by calling of showCol, hideCol, showHideCol and to recreate frozen columns once more by call of setFrozenColumns.
I recommend you to make some tests to choose, which one from the above two ways provides the best performance in your application.

jqGrid frozen:true creating an overlapping duplicate column

I have a jqGrid with 10 columns and when I freeze(frozen:true) on first column, it actually puts a horizontal scroll bar into columns header div before data is even loaded AND when data is loaded, there is actually two columns worth of data on top of one another, in the first column. You can see the duplicate because the formatting of duplicate is offset as if it had different style.
When I freeze first two columns, the horizontal scroll bar is only in 2nd column header, but now the 1st and 2nd columns have duplicates. As I freeze more columns, the last frozen column has the scroll bar and all the columns have duplicates.
I know this is long, but in instead of image I wanted to detail issues.
The freezing of the columns does work per se, but it causes the issues mentioned above.
Any ideas?
Added image.
image http://www.nvsninc.com/frozen2.jpg
update: I discovered after looking at resulting html, the reason for duplicate columns is that there were two divs, one had the columns without freeze and one with column freeze.
update: It turns out the height of the rows in the frozen column is not being set to same height of rows of unfrozen column, so rows from both columns is being seen.

Setting background color to row in Reporting Services table does not affect all cells

I have a Reporting Services 2005 report that has a tablerow with a background color conditionally set. The individual cells do not have that property being set. When I run the report, one of the columns in the resulting table does not have any background color. The other cells in that row do. I am noticing that the markup results in the table cells themselves being set and not the row. The table cell(s) in question do not have background color set via html.
FYI, the column in question does have its action set.
Any ideas would be greatly appreciated!
Thanks
I ran across this problem and basically here's what was happening... When you set the background for a row, internally the background for each column is set. If you add a column (or change a column) after setting the row background, the background for the column is reset... so even if the row background is still set, that column will be cleared... You'll need to go back in and set the column's background (or just remove the row's background and then reset the row's background) to set all the columns on the row.

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)

Expression Blend: Insert a row into a grid at design time

Ok, so I have a grid with lots of controls. And oops, I missed something and need to move everything down one row...
type type type
My mistake, I needed two rows...
type type type
Ok, this really sucks. So, how do I insert a row in a way that will move everything down.
Not sure which version of Blend you are on, but in version 4 I can click to the left of the grid to divide a row into two. This has three effects:
creates a new row in the Grid.RowDefinitions section
adds 1 to the Grid.Row attributes of all rows beneath your division (moves them all down a row)
adds 1 to the Grid.RowSpan attribute of all controls in the row you have divided
You can now manually change the the RowSpans back to their original value and voila - you have a blank row.

Resources