Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Inserting Text Rows Within Tablix tables - Can It Be Done? Expand / Collapse
Author
Message
Posted Friday, June 13, 2014 11:08 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, October 10, 2014 2:36 PM
Points: 49, Visits: 246
I have a Tablix table of fixed columns that is pulling from a stored procedure. I have added a text field (varchar) as the last column of the stored proc. If this text column is not null, I want to insert a row after the Tablix has written out the row the text column resides in.

Here is an example:

The row that starts with "PFT" is the row that I want to add after the row dated 5/2/2003, as it pertains to that row. Is this even possible?
Post #1580656
Posted Sunday, June 15, 2014 9:45 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, December 4, 2014 7:54 PM
Points: 3,087, Visits: 2,686
fstop (6/13/2014)
I have a Tablix table of fixed columns that is pulling from a stored procedure. I have added a text field (varchar) as the last column of the stored proc. If this text column is not null, I want to insert a row after the Tablix has written out the row the text column resides in.

Here is an example:

The row that starts with "PFT" is the row that I want to add after the row dated 5/2/2003, as it pertains to that row. Is this even possible?


For this, you will need 2 detail rows. For the second row (the row that will contain the "PFT" string), you need to do the following:
- merge all of the cells so that they whole row is a single cell
- make the visibility of the row conditional depending on whether you have a value to show, or not.




Post #1580984
Posted Monday, June 16, 2014 9:05 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, October 10, 2014 2:36 PM
Points: 49, Visits: 246
Thanks for your suggestion. As a newbie, can you offer some detail in how to to pull and incorporate 2 detail rows in a Tablix? It seems to me that in order to merge all the columns into one field in the query, I would have to work out all the spacing in the query (which wouldn't allow for fields wrapping data in a cell, such as in the Notes column). Then I would create a one column Tablix? Would I then not be able to have column headers and cell borders? I assume I would set the Visibility based on an expression of whether the row started with PFT or not? Am I following you correctly? If not, can you elaborate? Thanks

Post #1581195
Posted Monday, June 23, 2014 5:54 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, December 4, 2014 7:54 PM
Points: 3,087, Visits: 2,686
fstop (6/16/2014)
Thanks for your suggestion. As a newbie, can you offer some detail in how to to pull and incorporate 2 detail rows in a Tablix? It seems to me that in order to merge all the columns into one field in the query, I would have to work out all the spacing in the query (which wouldn't allow for fields wrapping data in a cell, such as in the Notes column). Then I would create a one column Tablix? Would I then not be able to have column headers and cell borders? I assume I would set the Visibility based on an expression of whether the row started with PFT or not? Am I following you correctly? If not, can you elaborate? Thanks



In you tablix, the detail row will actually be 2 rows. You can do this by
- select any cell in the detail row. Just to the left of the first cell on that row, you should see an extra "field" that looks a bit like an equals sign
- right click on the that "equals" sign and then select "Insert Row" and then "Insert Group - Below"
- you should now see an additional row appear
- select every cell on the new row
- right click on the select cells and select "Merge Cells"
- you should now have a row which has a single cell in it.
- on the single cell row, set the expression for the row to be the value you want (e.g. the field contain the "PFT..." value
- select the single cell row, and in the "equals" at the left hand end of the row, select "Row Visibility..."
- in the dialog that pops up, add an expression that evaluates to True or False to "Show or hide based on an expression" field





Post #1585070
Posted Tuesday, June 24, 2014 10:13 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, October 10, 2014 2:36 PM
Points: 49, Visits: 246
Thank you very much for taking the time to provide step-by-step instructions. They worked beautifully!
Post #1585583
Posted Wednesday, June 25, 2014 6:26 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, December 4, 2014 7:54 PM
Points: 3,087, Visits: 2,686
Great - glad to help


Post #1585856
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse