View Single Post
 
Old 06-23-2012, 09:57 AM
SQLUSA SQLUSA is offline Windows 7 64bit Office 2007
Competent Performer
 
Join Date: Jun 2012
Location: NYC
Posts: 136
SQLUSA is on a distinguished road
Default Keep Paragraph Lines Together Issue

I need to keep the following lines together (no pagebreak in the middle):

SELECT [Year]=YEAR(OrderDate), OrderCount=COUNT(*)
FROM AdventureWorks.Sales.SalesOrderHeader
GROUP BY YEAR(OrderDate)
ORDER BY [Year]

Year OrderCount
2001 1379
2002 3692
2003 12443
2004 13951
I selected the above text (highlight it), right click, Paragraph, Line & Pagebreaks, Keep lines together (checkmark).

Despite that it page breaks in the middle.
Reply With Quote