locked
can a table show directly under a comment inside the borders of a cell of another tablix? RRS feed

  • Question

  • hi we run 2016 enterprise and develop in vs2017.  i have a requirement for a tablix that essentially shows the following...

    col            displays

    1               barcode of an id

    2               human readable form of same id

    3               2 or more lines of comments separated by carriage control

    4               blank column for reader to write his 1st comment

    5               blank column for reader to write his 2nd comment

    the challenge is that i'd like a 3 column table to show in col 3 under the comments, and only in the 1st cell.

    will i need a tablix for just cell 1?  and then the 3 column table followed by a tablix shaped just like the one for cell 1?

    Thursday, August 13, 2020 10:48 PM

Answers

  • this was difficult and i'll need to live with slight gaps between grid lines.  those gaps are slightly larger when the report is saved to word.  the gaps are between rows in the main tablix only when there is no 3 col tablix following a main tablix row.

    by basically following the instructions at the link mentioned earlier i found that ssrs expressions are aware of the grouping columns in scope.

    i also learned that a column not in a tablix can be used in a group.

    so i added a flag (might have mentioned earlier) in my ds that is 0 if there is no detail and 1 if there is for this id. and added it to the group by for the main tablix.

    Then i put visibility expressions in BOTH the 3 col tablix and each of the remaining (after merge) cells left in the "inserted below within group" row of the main tablix. if you dont do both you get left with wider gaps or empty 3 col tablix's. 

    Before copy/pasting the 3 col tablix into the merged cell area, i made the height of the inserted row's remaining cells  the lowest allowable height in ssrs.

    Saving as PDF looks more like the original rendering than Word.   

    • Marked as answer by db042190 Friday, August 21, 2020 4:03 PM
    Saturday, August 15, 2020 3:19 AM
  • does anybody know how to get rid of the gaps i have left between main tablix rows?
    • Marked as answer by db042190 Friday, August 21, 2020 4:03 PM
    Saturday, August 15, 2020 4:01 PM

All replies

  • this looks relevant but it isnt clear how i'd suppress the 3 column table in cells 2 thru n.  and it isnt clear if not having an aggregation like the sum shown there will be a problem(i only have one row per id).

    http://www.sqlcircuit.com/2012/03/ssrs-how-to-show-tablix-inside-tablix.html

    Thursday, August 13, 2020 11:12 PM
  • Hi, 

    Not exactly clear what you mean by suppress the 3 column table in cells 2 thru n?  Could you should us some picture for us the understand you request better?

    Is this inside table having static rows or many detail rows?

     You could make the first row/cell of the outside table as static. 

    First, we insert a row - outside group above the detail rows. Then in the new row, we insert a table.

     


     

    Or you could insert you table as subreport. 

    Regards,

    Joy


    ""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
    We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
    For more information, please refer to the sticky post.


    • Edited by Joy_Zhao Friday, August 14, 2020 3:21 AM
    • Proposed as answer by Joy_Zhao Friday, August 21, 2020 6:55 AM
    • Unproposed as answer by db042190 Friday, August 21, 2020 4:02 PM
    Friday, August 14, 2020 3:20 AM
  • number of rows in 3 col table is dynamic.  below is a figure. 

    i want to squeeze the 3 column table in between rows 1 and 2 of the main tablix ONCE. 

    all other rows of the main tablix would follow one rightafter the other with nothing squeezed between them.

    i dont really know what you accomplished with the static attribute you suggested. 

    so the question about suppressing can be described in the context of the link i showed earlier.  in that solution ssrs will want to squeeze the inner tablix after the comments on ALL rows. 

    Not only dont i want to do that but I dont even want the 3 column headers showing again.  and also in that solution the author introduced sum aggregates, perhaps(i'm not sure) to make the outer tablix consistent with grouping behavior.  but in my case there is no aggregation to be done on the main tablix's rows.

    the red arrow represents where i want the 3 column table inserted.  and it will only show once.   

    Friday, August 14, 2020 11:20 AM
  • could my comments column be a subreport in one scenario or comments in the other?  what i'm thinking about right now is artificially introducing a row with either a special id or flag that perhaps can be used by ssrs to know this comments cell is to render a tablix or tablix report in one scenario (special id) or just show the comments in the other scenario (all other ids)

    the bar code and id wouldnt show in this special row.  but honesty it would be nice if the real estate those columns occupy would be available to the 3 column inner tablix.

    • Edited by db042190 Friday, August 14, 2020 11:30 AM clarity
    Friday, August 14, 2020 11:26 AM
  • i looked at a tablix cell and on the surface it appears a cell cant serve as either a dataset column container or subreport.  nor can it serve as comments from the ds above a matrix in the same cell.
    • Edited by db042190 Friday, August 14, 2020 5:36 PM more
    Friday, August 14, 2020 5:34 PM
  • i followed the instructions at the link (insert row below in same group etc) after modifying the ds to satisfy both needs.  this of course introduced additional records (dupes for every occurrence of a row in the 3 col tablix) but no aggregation was necessary in the main tablix.

    in the 3 col tablix i put a filter based on a flag that gets set to 1 only if part isnt null.  i was hoping that would suppress it (3 col tablix) after rows 2 thru n in the main tablix.

    the only problem is that an empty 3 col tablix now shows under the rest of the rows in the main tablix.  i'm going to see if the visibility attribute on the 3 column guy can be set based on there being no data.

    here is what it looks like now...

      


    • Edited by db042190 Friday, August 14, 2020 11:24 PM forgot flag
    Friday, August 14, 2020 11:19 PM
  • i put this visibility expression in the 3 col tablix but still see the empty 3 col tablix headers

    =IIf(Count(Fields!somecol.Value, "myds")=0,True,False).

    apparently this count is overall, not just in the current cell.

    Saturday, August 15, 2020 12:28 AM
  • this was difficult and i'll need to live with slight gaps between grid lines.  those gaps are slightly larger when the report is saved to word.  the gaps are between rows in the main tablix only when there is no 3 col tablix following a main tablix row.

    by basically following the instructions at the link mentioned earlier i found that ssrs expressions are aware of the grouping columns in scope.

    i also learned that a column not in a tablix can be used in a group.

    so i added a flag (might have mentioned earlier) in my ds that is 0 if there is no detail and 1 if there is for this id. and added it to the group by for the main tablix.

    Then i put visibility expressions in BOTH the 3 col tablix and each of the remaining (after merge) cells left in the "inserted below within group" row of the main tablix. if you dont do both you get left with wider gaps or empty 3 col tablix's. 

    Before copy/pasting the 3 col tablix into the merged cell area, i made the height of the inserted row's remaining cells  the lowest allowable height in ssrs.

    Saving as PDF looks more like the original rendering than Word.   

    • Marked as answer by db042190 Friday, August 21, 2020 4:03 PM
    Saturday, August 15, 2020 3:19 AM
  • does anybody know how to get rid of the gaps i have left between main tablix rows?
    • Marked as answer by db042190 Friday, August 21, 2020 4:03 PM
    Saturday, August 15, 2020 4:01 PM
  • it looks like there is a row visibility setting on the inserted row in same group below.  i set it instead of the unmerged cells in that row and the gaps went away.
    Saturday, August 15, 2020 7:08 PM
  • Hi,

    Thanks for detail info. It seems you have multiple request or question?

    Would it be possible for you to ask each question in one thread ? Since this forum is closing up, you could post your question one by one in our new forum, we would be happy to assist you there ! 

    Microsoft SSRS Q&A forum 


    ""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
    We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
    For more information, please refer to the sticky post.

    Tuesday, August 18, 2020 6:48 AM
  • actually one question,  unfortunately had to try many things to get it to work.  each thing led to another question. 

    it would not make sense to separate this into different posts as there was one goal.   

    this is actually working now.  whats with the tags in the new forum. 

    they are required but there is no hint as to what the choices are except for a username.

    Tuesday, August 18, 2020 12:12 PM
  • this is actually working now. 

    So we guess this case here is resolved and other issue is summerized in you new case in https://docs.microsoft.com/en-us/answers/questions/72288/subreport-spans-multiple-pages-when-saved-to-pdf.html now?

    We would work on that one case instead of multiple pages which confuses a little bit.

    Thanks for understanding and support.



    ""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
    We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
    For more information, please refer to the sticky post.

    Friday, August 21, 2020 2:41 AM