Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One of the things I want in my reports is to have nice headers for my reports. I like to have a logo and the user's report parameters along with other data to show to give more information for the business needs the report needs to clarify. One of the things that Microsoft SQL Server 2005 Reporting Services cannot do natively is show data from a Dataset in the header. This post will explain how to work around this and how easy it is.</p> <p>Create the Report Server Project in the Business Intelligence Projects section and call it AdventureWorksLTReports. I use the AdventureWorksLT sample database from CodePlex.</p> <p><a href="http://www.cloudsocket.com/images/image-thumb.png">alt text http://www.cloudsocket.com/images/image-thumb.png</a></p> <p>Next show the Page Header by right clicking in the Report area with the designer.</p> <p><a href="http://www.cloudsocket.com/images/image-thumb1.png">alt text http://www.cloudsocket.com/images/image-thumb1.png</a></p> <p>The Page Header will appear. If you want to show the Page Footer this can be accessed from the same menu as the Page Header.</p> <p><a href="http://www.cloudsocket.com/images/image-thumb2.png">alt text http://www.cloudsocket.com/images/image-thumb2.png</a></p> <p>I created a stored procedure that returns data for the Sales Order to be presented in the Page Header. I will show the following information about the Sales Order in the Page Header:</p> <ul> <li>Order Date</li> <li>Sales Order Number</li> <li>Company</li> <li>Sales Person</li> <li>Total Due</li> </ul> <p>I create a TextBox for each of my data fields in the Page Header along with a TextBox for the corresponding label. Do not change the Expression in the TextBoxes that you want the Sales Order data in.</p> <p><a href="http://www.cloudsocket.com/images/image-thumb3.png">alt text http://www.cloudsocket.com/images/image-thumb3.png</a></p> <p>In the Report Body, place a TextBox for each data field needed in the Page Header. In the Visibility for each TextBox, select True for Hidden. This will be the placeholder for the data needed in the Page Header.</p> <p><a href="http://www.cloudsocket.com/images/image-thumb4.png">alt text http://www.cloudsocket.com/images/image-thumb4.png</a></p> <p>Your report should look similar to the screenshot shown below.</p> <p><a href="http://www.cloudsocket.com/images/image-thumb5.png">alt text http://www.cloudsocket.com/images/image-thumb5.png</a></p> <p>The last step and most important is to reference the Hidden TextBox in the TextBoxes located in the Page Header. We use the the following Expression to reference the needed TextBoxes:</p> <p>=ReportItems!.Value</p> <p>Your report should now look similar to the following:</p> <p><a href="http://www.cloudsocket.com/images/image-thumb6.png">alt text http://www.cloudsocket.com/images/image-thumb6.png</a></p> <p>Your Report preview should now have the Sales Order Header data in the Report Header.</p> <p><a href="http://www.cloudsocket.com/images/image-thumb7.png">alt text http://www.cloudsocket.com/images/image-thumb7.png</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload