Breaking News
Loading...
30/04/2013

Xoay text 270 độ trong SSRS

Một trong những tính năng mới của Reporting Services trong SQL Server 2008R2 là xoay text.

Như bài viết dưới đây tác giả hướng dẫn chúng ta cách xoay text 270 độ. Nếu ta muốn làm điều này ở các phiên bản Reporting Services trước đó thì chỉ có cách dùng image.


A new feature of Reporting Services 2008 R2 is the ability to 'easily' rotate text 270 degrees. This was very difficult to do in the past and required that you create images for your headers instead of using text. YUCK! Naturally, this is not a preferred work around. So in this blog post I will show how easy this is in the future version of SSRS.

Let's start with my boring report:
In this report you can see that the data for the Business Entity field takes up much left space left to right than it's header. For reports where we have all this whitespace, we often want to rotate the headers 270 degrees so that we can fit more data on the page. This report is simply an example, but as you can imagine, if you had a large number of these fields you would gain a lot of horizontal real estate by rotating the header text.

The first thing you will do is select the column or columns that you want to rotate in the header row. For this example, I selected the entire row.
Next, in the properties window under the Localization section, choose the dropdown for WritingMode and choose the new "Rotate270" option.

After you select "Rotate270", you will need to expand the header row height by dragging the bottom of the row down far enough for the text to not wrap.
Last step is to shrink the Business Entity column to save that precious real estate and run the report.

It should look something like this.

Tham khảo: http://www.bidn.com/blogs/bretupdegraff/bidn-blog/268/new-features-of-ssrs-2008-r2-%E2%80%93-part-4-rotating-text-270-degrees

0 comments:

Post a Comment

 
Toggle Footer