question

mnm avatar image
mnm asked

How to list tables with the control breaks

SELECT t.name AS table_name, c.name AS column_name FROM sys.tables AS t INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID ORDER BY table_name; How can I BREAK the report to list table name only once. How do I put in the control break any time table name changes in my report.
table
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@SQLShark avatar image @SQLShark commented ·
I am confused?!? Do you want to list all the tables which have a column called 'control break'? If so add a WHERE clause to say C.Name = 'control break'. Hopefully this is what you mean.....
0 Likes 0 ·
Venkataraman avatar image Venkataraman commented ·
Can you please clarify, what you mean by Ctrl + Break.
0 Likes 0 ·

1 Answer

·
Sule avatar image
Sule answered
I think he(she) wants group by column_name with parent group table_name. On report, every table name will be shown only once, and for every table_name there will be all columns in lower level of hierarchy. In tablix, add column_name as lower level, and after that add parent group with header for table_name. In properties of group table_name, add page break after each value in group. This is all steps for report designer (data studio or report builder).
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mnm avatar image mnm commented ·
Iwant to print report as table name only once and all the column names. I want control break at the table level.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.