Column break in nested matrix

Hi guys,
I created a report of some quality test results containing table with nested matrix for details. I need the
sub-matrix  to be grouped by row and by
column and limit the number of result columns in row (to fit the width of report neatly). I went trough the articles about doing column group break already:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/32f28407-e1ca-457e-92fd-d292e32dde4e/limit-no-of-columns-in-ssrs-matrix-report?forum=sqlreportingservices 
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/ea9d795b-8d17-41d2-a1d7-a4069ebb4539/forum-faq-how-do-i-achieve-column-break-in-a-matrix?forum=sqlreportingservices (I have used the 2nd workaround)
My solution without the column count limit feature works perfectly. But when trying to break, the report seems to associate the column groups related to another parent table row, because the number of result grouped columns in row is
less or equal to the set number (=4) as follows:
Test type Test
A A1
Parameter A1-1 A1-2 A1-3 A1-4 // OK - break made after 4 columns of A1
Min x x x x
Max y y y y
Measured z z z z
Parameter A1-5 A1-6 // OK - break made after test type A1 (?Bug cause: "column count 2 for now")
Min x x
Max y y
Measured z z
A2
Parameter A2-1 // OK - break made after test type A2 (?Bug cause: "column count 3 for now")
Min x
Max y
Measured z
B B1
Parameter B1-1 // Not OK - break already made after 1st column (?Bug cause: "column count 4 for now:"=>BREAK)
Min x
Max y
Measured z
Parameter B1-2 B1-3 B1-4 // OK - break made after test type B1
Min x x x
Max y y y
Measured z z z
C C1
Parameter C1-1 C1-2 C1-3 C1-4 // OK - break made after 4 columns of C1
Min x x x x
Max y y y y
Measured z z z z
Parameter C1-5 C1-6 // OK - break made after test type C1
Min x x
Max y y
Measured z z
I have modified the proposed function script for my purposes - set the reset of ID counter in the header of  parent row test, set the column ID  as concatenation of all level values (test type, test and watched parameter),  played with ordering
of data and extra grouping, but with no success.
Does anybody have a suggestion what is going on and how to solve this issue?
Thanks,
Marion
PS: I'm sorry for the table illustration (done the best that I could). As a newbie I'm not allowed to post with picture. 
Edit: Do you need some extra information to help? Does somebody have an idea how to achieve the same design with column break some other way?

Hi,
The column break needs to reset when it starts a new row grouping.  The customer code therefore needs parameters for the row grouping and for the column grouping.
The code below is slightly different to a lot of examples.
Creating hashtables would keep a record of every column value, so for large reports, this would use a small but significant amount of memory.  It only needs to know when it changes.  I've also used static variables as the scope only needs to be
the function and not global, plus this makes it a single module of code which helps on larger projects.
The ceiling calculation has been replaced with some integer maths to prevent odd rounding issues that cause hard to trace/reproduce bugs.  E.G. a 4 column should be 4-4-4-4-4 but 16 /4 should be 4 but might be
4.000000000000001.  Ceilling then returns 5 so you end up with a column jumping to the next line :- 4-3-5-4-4.
Note that everything that used to calculate the row grouping should be concatenated as a single parameter for the most robust solution.  In the example the sub group is unique for the entire dataset so is not an issue, but if a sub group is only unique
in the group, there is a small change of a miscalculation.
Here's my solution:
In the code
Function GroupFunction(
ByVal NewGroup as string ,
ByVal NewColumn as string ,
ByVal ColumnBreak as Integer ) As Integer
static OldGroup as string = ""
static OldColumn as string = ""
static RecordCount as integer = 0
if (OldGroup <> NewGroup ) then
OldGroup = NewGroup
OldColumn = ""
RecordCount = RecordCount + ( ColumnBreak - RecordCount Mod ColumnBreak )
end if
if (OldColumn <> NewColumn) then
OldColumn = NewColumn
RecordCount = RecordCount +1
end if
GroupFunction =RecordCount +
( ColumnBreak - (RecordCount - 1) Mod ColumnBreak )
End Function
In the report
= Code.GroupFunction( Fields!MainGroup.Value & ":" & Fields!SubGroup.Value   , Fields!Parameter.Value , 4 )
If you want a different number of columns, you can change the 4 to a report parameter.
Output
A
A1
Value Type
A1-01
A1-02
A1-03
A1-04
Max
2
5
8
11
Measured
3
6
9
12
Min
1
4
7
10
Value Type
A1-05
A1-06
A1-07
A1-08
Max
14
1
1
1
Measured
15
1
1
1
Min
13
16
1
1
Value Type
A1-09
A1-10
Max
1
1
Measured
1
1
Min
1
1
A
A2
Value Type
A2-01
Max
1
Measured
1
Min
1
B
B1
Value Type
B1-01
B1-02
B1-03
B1-04
Max
1
1
1
1
Measured
1
1
1
1
Min
1
1
1
1
Value Type
B1-05
Max
1
Measured
1
Min
1
C
C1
Value Type
C1-01
C1-02
C1-03
C1-04
Max
1
1
1
1
Measured
1
1
1
1
Min
1
1
1
1
Value Type
C1-05
C1-06
Max
1
1
Measured
1
1
Min
1
1
Best Regards
Fergus

Similar Messages

  • Forum FAQ: How do I achieve column break in a matrix?

    Symptom
    Although you can set page break for column group in Reporting Services 2008, page breaks are ignored on column groups. Reference:
    http://msdn.microsoft.com/en-us/library/ms156434.aspx
    Solution
    Here are some workarounds, available forboth Reporting Services 2005 and2008:
    Workaround 1
    Spread the columns from one matrix into several matrixes. You can first copy one matrix and then paste it into several ones you want. Then set the filter for each column group to make sure that the total columns’ length in one matrix just fit a page’s width.
    Workaround 2
    The other method is to use a custom code.
    a.     Please copy the following code to the custom code area:
    Dim FlagTable As System.Collections.Hashtable
    Dim Flag AS Integer
     Function MyFunc(ByVal NewValue As Object) As Integer
    If (FlagTable Is Nothing) Then
    FlagTable = New System.Collections.Hashtable
    End If
    If (NewValue Is Nothing) Then
    NewValue = "-"
    End If
    If (Not FlagTable .Contains(NewValue )) Then
    Flag =Flag + 1
    FlagTable.Add(NewValue, nothing)
    End If
    MyFunc = Flag
    End Function
    b.     Create a list in your report.
    Imagine thatthe column group of a matrix is grouped bythe field ‘Column_Group’, then set the detail group of list withthe expression like this:
    =Ceiling(Code.MyFunc(Fields!Column_Group.Value)/5)
    Note: This means the Max number of column in matrix will be five after you follow step C.
    c.      Sort the dataset by column group field, and then drag the matrix into the list. Click Preview.
    Workaround 3
    Similar to the second method, you need to modify the dataset.
    a.     Create an ID column for the column group in your dataset.
    For example,there isa datasetwith the following query:
    SELECT * FROM Table
    The column group is grouped on the field “Group1”.Then, modify the query like this:
    SELECT *, Dense_Rank()OVER(order by Group1) AS ID FROM Table 
    b.     Create a list in your report, set the detail group of the list with the Expression like this:
    =Ceiling(Fields!ID.Value/5)
    Note: This meansthat the Max number of column in matrix will be five after you followthe step C.
    c.      Sort the dataset bythe column group and then drag the matrix into the list. Click Preview.

    I have near about 30 matrics. so I need a paging. I did every thing as per this post and it really works for me.
    I have total four columns. On one page it should show three and the remaining one will be moved to next page.
    Problem occurs when in my first row i have 3 columns and in next page if I have one columns then it show proper on first page but on second page also it gives me three columns insted of one. the first column data is exactly what I have but in remaining two
    columns it shows some garbage data.
    I have data like below.
    Metric ColumnNo RowNo
    1 1
    1
    2 2
    1
    3 3
    1
    4 1
    2
    so while grouping i have a row parent group on RowNo and Column group on ColumnNo.
    can anyone please advice on this.

  • Nested Matrix Group Subtotals

    Hi -
    Does anyone know how to make a standard matrix report give subtotals for a level 1 group?
    Scenario:
    standard matrix report
    level 1 and level 2 row groups
    one column group
    I need the report to give me subtotals for each of my level 1 groups per column. Because this is a nested matrix report, I cannot use the Matrix with a Group design - it blows up.
    Thanks for your help.
    ~SM

    i am sure there is a way to do that using summary columns, placeholder columsn and some pl/sql code .. however it is hard to give the exact solution without knowing your report in detail.
    thanks,
    ph.

  • Page break on nested table

    Hi,
    I am getting blank page because of page break after nested table.
    When page is full with the records then because of nested table, it added one space after that.
    Has anyone faced this issue before?
    Thanks

    Hi,
    Upload the .rtf template and XML sample so we can see your issue.
    Also I recommend you to review our page-break document:
    http://docs.oracle.com/cd/E28280_01/bi.1111/e22254/create_rtf_tmpl.htm#BIPRD2457
    Regards,
    Liviu

  • Report column breaking - display text centred in cell

    Hi,
    I am looking for some help achieving the following:
    I have a report which has column breaks on the first three columns. Currently, when the report is displayed, the first column value is displayed in the top row with the rows underneath blank and so on for columns 2 and 3. Then the data for the other columns is displayed as normal.
    What I want to do is have the column values that are used in the break spanning the rows they break over so the text is displayed centred (vertically)
    ie:
    Col1     Col2     Col3           Col4     Col5
                                    dat1     dat2
                                    dat2     dat3
    val1     val2     val3          dat4     dat5
                                    dat6     dat7
                                    dat8     dat9
    val2    xx        xxx         xx        xx
    ________________________________________________ (Hope this works in ascii!!!) - Col1,2,3 etc are the columns - ignore the vals and dats - they're just data placeholders.
    All help much appreciated! :)

    Hi,
    Something like: http://htmldb.oracle.com/pls/otn/f?p=33642:112 ?
    If so, see: Re: How to achieve Page/Form/Report layout?
    Andy

  • How to Set column value in SO matrix , if the column is not visible.

    Hi,
    We are trying to set value in to a column from sales order matrix with the below mentioned code
    ((SAPbouiCOM.EditText)oMat.Columns.Item("U_TWBS_AC_BaseEntry").Cells.Item(pVal.Row).Specific).String
    it will throw an u201CForm Item is not editable u201C  error if the  column ("U_TWBS_AC_BaseEntry")  visible is set to false through form settings.
    how can we solve the issue,can we use any DI object in order to reset the form settings.
    Thanks & Regards

    Hi
    Try and make the column visible then set the value and make it invisible then
    Hope this helps
    Regards
    Vivek

  • How to get fourthly row (row4) first column value (col1) in matrix

    Hi to all,
    In FMS, how to get fourthly row (row4) first column value (col1) in matrix in document.
    select $[$38.1.4]
    But it display the first row
    Please give me hint.
    Thank you

    Hi Eric,
    FMS may only apply to current row.  There is no way to get any other fixed row.
    Thanks,
    Gordon

  • Is it possible to add a column to the Item matrix in the ItemLookup form (C

    Hi,
    Is it possible to add a column to the Item matrix in the ItemLookup form (CFL or Find Lookup).
    I need to display a value in the newly added column if the itemgroup in that row matches a certain value , how can I achieve this.
    Thanks

    Hi,
    You may check this: Can we add CFL to the  system/form defined textbox?
    Please close your previous open thread.
    Thanks,
    Gordon

  • Find the difference between two columns in an ssrs matrix ? MSCRM

    Hi All,
    I am working in reporting part of our project (On-line MSCRM 2013) & in reporting services.
    I am trying to create report using fetch xml based. Below is the snap what we required the result.
    Kindly help me, how to get the difference in both column. (Its a matrix table where year is grouped).
    We need difference between both year Like (Plan Revenue of 2013 & Plan Revenue of 2014 difference in Plan Revenue Diff section) and same for Actual
    Revenue.
    https://social.microsoft.com/Forums/en-US/054d5ca4-0d38-4dc6-84a8-88866cc228fe/find-the-difference-between-two-columns-in-an-ssrs-matrix-mscrm?forum=crmdevelopment
    Thanks,
    Mohammad Sharique

    Hi Bro,
    I used parametrized option for year and done the report,Currently we are getting values in Difference column now i want to show
    that value in percentage. How can we show the percentage based on that value. Means i want to show the Difference in Percentage. 
    Kindly help me i tried but getting some issue. Below i am mentioning the code and snap with result.
    Below expression using to showing Plan Revenue in Percentage for year.
    =
    Sum(IIF(Fields!new_year.Value =Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))
    - Sum(IIF(Fields!new_year.Value =Parameters!EndYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))
    /IIF(Sum(IIF(Fields!new_year.Value = Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))>0,
    (Sum(IIF(Fields!new_year.Value = Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0))))
    ,1)
    )*100))
    Result issue is as below in snap with highlighted in red colour.
    Kindly help me on this issue also :)

  • SQL Loader Constraints with Column Objects and Nested Tables

    I am working on loading a Table that (god forbid) contains columns, column objects, and nested tables (which contains several depth of column objects). My question is does SQL Loader have a hidding undocumented feature where it states how the column objects must be grouped in refereneced to the nested tables within the loader file? I can load the various column objects, and nested tables fine right now, however, I am loading them all in strange and insane order. Can anyone answer this question? Thanks.
    Peter

    I just noticed that my email is wrong. If you can help, plese send email to [email protected]
    thanks.

  • Image in column header of user matrix

    Hi,
    does anybody know how i can show an image in the column header of a matrix. I'm using a user matrix.
    thanks for help.
    Markus

    1. SBO 2004 will not allow this action. The Header Column item is a EditBox type and you can not override this directly.
    2. What you can do is "paste" an image item on the column header (using Screenpainter). This will allow you to display a picture. You must just make sure the form can't be resized OR "move" the image item when the column is moved about.
    This - to my knowledge - is your only option.

  • How to create table with dynamic amount of columns which are nested columns

    M trying to fetch data and show in a javaFX table.
    My table displays the details of different items from ItemVO , where :
    public class ItemVO()
    String itemName;
    List<ItemTypeVO> type;
    and My ItemTypeVO has the following attributes :
    public class ItemTypeVO()
    String typeName;
    Integer quantity;
    Integer price;
    Now, i want to display the details of an item in a table in which the itemname and quantity will be displayed, the quantity column will have nested columns showing different types(typeName) as found from List<ItemTypeVO> inside ItemVO.
    This question is similar to this link but my not able to find how to link a list with itemVO for nested columns. :(
    Please help !!
    M still unable to find a solution..
    Edited by: abhinay_a on Jan 14, 2013 10:50 AM

    Hi Abhilash,
    Thanks for the quick reply.
    Actually the problem is with the image, as I am not able to rotate 270 degree. Crystal report cannot support the rotation of image.
    i have another problem, I have to create a report in which
    Lables are fixed on the left side of report and 3 columns per portrait page. Those columns are
    dynamically created and shown in the report.
    The format is like the above. Can you please help me in doing this report, as I tried it doing
    with CrossTab. I am really stuck to this report.

  • Press enter puts column break instead of line break in

    does anyone know why pressing enter puts column break instead of line break in - I loaded InDesign on my Windows 8 notebook?

    Edit > Keyboard Shortcuts... and make a new set.
    Change the Product Area dropdown to Type and Tables, then scroll down the list to Insert Break Character: Paragraph Break and then put your cursor in the new shortcut box. Press the Enter key on the numpad and change the context to Text. You'll get a warning that the shortcut is already assigned below the shortcut field, but just click the assign button.
    If you want a new shortcut for the column break, scroll back up to that one, then type in a new shortcut. You can use the ctrl, alt and shift modifier keys if you like, along with anything other than a key on the numpad.

  • Column break problem in word 2010

    Hi,
    I have a 2 column document. Some how i feel it has inserted a column break in the middle of page 7 of my word document which consists of 12 pages. It is a reviewed document & tracking is also going on and 'Track Changes: On' message is also visible on
    my progress bar. On page 7 i have a figure also which is one column wide. The text above this figure goes on to next column after 9th line. There is still a 3 line gap between my text & figure. But its moving the text to next column. After the figure it
    shows me the text which should come after the moved text. Please guide me how to fix this problem.
    Zulfi.

    Hi Zak100,
    Thanks for posting in MSDN forum.
    This forum is for developer discussing developing issue involve Word application. Since the issue is more relative to end-user, I would like to move it to
    Word IT Pro Discussions forum.
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thanks for your understanding.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Column break

    Is there such a thing as a column break in Illustrator
    ie: To force the text to the top of the next column
    Steve

    Lou your were joking but that has been the stumbling block in getting this very simply feature into Illustrator. There are some very intelligent
    and knowledgeable users of Illustrator here on the forum who have argued against using resources for this because they just make another text box,
    align them and then group them and they don't seem to think you even need columns when you can do this?
    How would hitting the enter key to move to the next column save time, is their thinking and some of them did not think multiple artboards were useful.
    of I agree with you fully except for the multiple page thing, I do not really think a multiple page feature is what Illustrator needs the artboards are much better for Illustrator since they can vary in dimensions from one art board to the next have have artboards within artboards and be exported via printing to pdf with a range of artboards. That is more powerful in some ways then just pages.
    There is however a future for output as pages and spreads which would be good especially if it could be both for Acrobat and InDesign formats. That could be cool..
    What do you think?

Maybe you are looking for

  • Issue in Target Column mappings in ODI

    Hi Guru's, Unable to uncheck Insert and Update checkbox in the Update section of target column mappings. How we can uncheck the Insert and Update checkbox for the columns which should not affect in the target datastore? Thanxs --Madhavi              

  • How do I determine the size of an event queue?

    Hi, I'd like to be able to programmatically determine how many events are in queue so that I can change how they are processed based on how far behind the loop is. Is there a way to easily do this in labview?  I suppose I could create an identical pa

  • Trying to use the Instance Method

    I'm trying to get the second class to use the instance method in the first class to make some Turtles move around in Triangle shape. Class one code: public class TryInstanceMethod private Turtle t; public TryInstanceMethod(Turtle turtle) t = turtle;

  • How to record menus that display when mouse hovers

    The software I am creating a training session for has pull-down menus that display when the mouse clicks on them or when the mouse hovers over them. I can only get Captivate to record the menus when the mouse is clicked - and cannot determine how to

  • Error in feeding JMF with inputstream, please help

    Hi, in order to feed JMF with inputstreams, audioinputstreams actually, you have to modify the DataSource.java and write a custom one so that it accepts inputstreams for the construction of the datasource, because with MediaLocator you can only speci