SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Report with header and detail data on differing lines


Report with header and detail data on differing lines

Author
Message
Robin_D
Robin_D
Grasshopper
Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)

Group: General Forum Members
Points: 18 Visits: 83
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
Jack Corbett
  Jack Corbett
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18278 Visits: 14889
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
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search