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

Report with header and detail data on differing lines Expand / Collapse
Author
Message
Posted Wednesday, July 16, 2014 8:01 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, July 16, 2014 10:34 AM
Points: 13, Visits: 67
Hi.

Apologies if this is so basic, but having scoured the net, I've been unable to find out how to do this, possibly because I need a particular search term to find the results.

For an audit action report I need to put a product header on one line with all the detail occurrences underneath. Drill through will not work, as this needs to be actually printed for someone to action daily.

What I need to do is in shown below:

Item 1 Product Hierarchy, Full product description
variant 1, Description, Old value, New Value, Stock level, action required.
variant 2, Description, Old value, New Value, Stock level, action required.
variant 3, Description, Old value, New Value, Stock level, action required.
variant 4, Description, Old value, New Value, Stock level, action required.

Item 2 Product Hierarchy, Full product description
variant 1, Description, Old value, New Value, Stock level, action required.
variant 2, Description, Old value, New Value, Stock level, action required.

Item 3 Product Hierarchy, Full product description
variant 1, Description, Old value, New Value, Stock level, action required.
variant 2, Description, Old value, New Value, Stock level, action required.
variant 3, Description, Old value, New Value, Stock level, action required.

Note that the number of variants can be anything from 1 up.

Putting all the detail on every line makes it too wide to print as well as making it less readable.

Once a page is full, ideally I would not want to start a new product listing unless it can all go on the same page.

All help and advice gratefully received.

Thanks Robin
Post #1593074
Posted Wednesday, July 16, 2014 10:33 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 1:22 PM
Points: 11,148, Visits: 12,889
You need to work with a rows groups, http://msdn.microsoft.com/en-us/library/dd255263(v=sql.110).aspx.

Your "header" group would group on product (and any other fields you would include on the header) and in the group properties you can check keep together and, if desired, have each group start on a new page.




Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #1593177
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse