Matrix - Fixed number of columns
Turntwo
Folsom, CA
Is there any way to create a Matrix with a fixed number of columns? I want to put several Matrixes on the same report where the columns line up - but each Matrix has a different number of columns based on different grouping.
Another option that could also work would be the ability to have the Matrix be a fixed size, and the columns take up the available space equally (then at the least the Total columns would line up).
Thanks,
Jason
Another option that could also work would be the ability to have the Matrix be a fixed size, and the columns take up the available space equally (then at the least the Total columns would line up).
Thanks,
Jason
Comments
You may access the prepared matrix and do something with its columns (hide some, or adjust width). See the attached example which you can run from the Demo.exe.
I tried adding columns, and the columns are included (the Columns.Count is higher), but the Columns don't display. What do I have to set to get the added columns to display.
I added them with Matrix1.ResultTable.Columns.Add(new TableColumn());
I also tried,
TableColumn col = new TableColumn();
col.Visible = true;
col.MaxWidth = 200;
col.Width = 100;
Matrix1.ResultTable.Columns.Add(col);
Using Matrix1.Data.AddValues(), I could add columns of blank values. I wanted to add columns of 0.00 values, but the ManualBuild didn't have the calculated rows available to work with, and I think I needed the headings to get the 0s to show. I tried using AddValues in ModifyResult, but it didn't change anything. With blank values, the only issue I had was getting the blank headers at the end instead of the beginning, and I think I could have figured that out.
Instead I left the extra areas blank by changing the column widths to a fixed value, and then calculating the width for the Total column (right-justified), as the remaining space (needed to increase the MaxWidth also). This lines up the columns across the different Matrixes, stretches them across the available area and gives me the look I needed (except missing the 0 columns, which is just clutter anyway).
Thanks for the help.