Few Questions on Report

  • I have a few questions regarding reports that I haven't found answers after a little searching.

    Thanks for any help!

    1. I need to create a few reports with some repeating pages. For example, in one of them I need to have a cover page, then couple content pages, then a summary page. I need to double print the content pages. There must be a better way to achive this than manually copy-and-paste to duplicate those pages in the report design, is there?

    2. Is there a way to embed a PDF file into the report somehow? Say, at the end of each report, I need to include a few pages of static information. Can I somehow have the report server to pull out a PDF file instead of putting those text into the report design?

    3. Can I include other reports in a report?

    4. Is there a way to control printing of the reports after I exported them into PDF for printing?

    Say, I want page 3 and 4 print on both side of the paper. I don't think this is possible, but asking to make sure.

    5. Can I control the size of the parameter input area of the report at the top portion of the report server? I need to disply 8 input boxes. Users need to scroll down in the parameter area to see the last 2.

    Thanks!

  • This was removed by the editor as SPAM

  • 3. Can I include other reports in a report?

    This can be achieve using sub-reports.

  • 1. I need to create a few reports with some repeating pages. For example, in one of them I need to have a cover page, then couple content pages, then a summary page. I need to double print the content pages...

    This is usually handled by Data Regions. There are four types of regions (Table, List, Matrix and Chart). Often what your trying to accomplish is best done by using multiple regions in the report. The List region being not restriced to static columns is very useful for this purpose. In addition to the List region, the Rectangle report item can be used as a container for report items. You can control Grouping and paging with both the data regions and the rectangle report item. Need duplicate information? Place the content into one rectangle and copy the rectangle to create an additional design time copy that when run achieves the effect you're after.

    2. Is there a way to embed a PDF file into the report somehow? Say, at the end of each report, I need to include a few pages of static information. Can I somehow have the report server to pull out a PDF file instead of putting those text into the report design?

    Yes and No. RS has 5 report items used to display data and graphical elements (Textbox, Image, Subreport, Line and Rectangle). The Image report item will display binary images in the following formats JPG, BMP, GIF, and PNG by setting the Source property. NOTE that PDF is not a binary format and therefore is not a supported image format. You could, however, convert the PDF to one of the supported formats. Images can have the source set as Embedded, URL, External or Database. External or URL would support what you are trying to accomplish. The external refers to an image file located in the same RS project while URL refers to an image at, you guessed it, a URL (file folder) location. When the image is updated all reports that use the image would be updated.

    3. Can I include other reports in a report?

    Yes, but it is often more efficient to use data regions rather than a subreport. Each data region represents a specific dataset of information. If you use multiple data regions they can be synchronized to achieve the same effect as a subreport. The real benefit to this approach is the performance.

    4. Is there a way to control printing of the reports after I exported them into PDF for printing?

    RS is done with its work after the rendering engine has competed it's tasks. In this case the PDF rendering extension creates a PDF view of the report, so if you're needing a different page configuration post rendering then only Adobe Acrobat (not Reader) can be used to alter the page content of the rendered PDF.

    5. Can I control the size of the parameter input area of the report at the top portion of the report server? I need to disply 8 input boxes. Users need to scroll down in the parameter area to see the last 2.

    Not familiar with how to modify this section other than to write your own Win/Web application for viewing the reports.

  • Very helpful info. Thank you Aiwa and Joe Salvatore.

  • Joe,

    I've posted already here: http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=150&messageid=394442

    but.. can you explain how one "syncronizes data regions" as a replacement for subreports ?  How do I tell the Child region which row I'm on in the Parent region ??

    Thanks - B

  • The key is that you need to associate a data region with a dataset.

    When you associate multiple regions with the same dataset, the navigation is automatic.

    Only when the two regions are getting data from a different datasets do you need to take an extra step to sychronize both regions (e.g. passing a value from one region to the other region's dataset query)

    In your example of two separate parent and child datasets, you have several design options (listed in my preference):

    1. Flatten the two datasets into one denormalized dataset (btw this is also Jason Carlson's and Brian Welker's preference)

    2. Associate each dataset to separate regions and use a "key" value from the parent dataset within the child datasets query to synchronize the values displayed in the region bound to the child dataset.

    3. Create a subreport and pass parameter from main report to subreport (not the best but very Crystal Reports style)

     

    Associating the data region to a dataset is done in one of two ways:

    1. By using properties

     In Layout view, right-click the data region and then click Properties.

     On the General tab, for Dataset name, select a dataset.

    2. By using fields

     In Layout view, click the data region to select it.

     In the Fields window, select a dataset from the list at the top of the window, and then drag a field to the data region.

    The following points regarding subreport usage were emphasized by Brian Welker and Chris Hayes in their "Report Design: Best Practices and Guidelines" document.

    (http://www.microsoft.com/technet/prodtechnol/sql/2005/rsdesign.mspx)

    Subreports

    A subreport is a report item that points to another report. Any report can be used as a subreport, and you can set up the parent report to pass parameters to the subreport.

    You should take care when using subreports for the following reasons:

    Subreports do not share data with the parent report.

    The Report Server processes each instance of a subreport as a separate report and this can affect performance. 

    The headers and footers for the subreport are ignored.

    Subreports are useful in the following situations:

    When you need to nest groups of data from different data sources within a single data region.

    When the report has multiple one-to-many relationship sections.

    When you need to reuse a subreport in multiple parent reports.

    When you want to display a standard, stand-alone report within another report.

    Data regions, such as tables, matrices, lists, and charts, provide much the same functionality as subreports. However, they often provide better performance, particularly if the reports share data. Data regions also work better than subreports in side-by-side layouts.

  • Alex,

    In response to:

    "2. Is there a way to embed a PDF file into the report somehow? Say, at the end of each report, I need to include a few pages of static information. Can I somehow have the report server to pull out a PDF file instead of putting those text into the report design?"

    One possibility is to create a URL link to the PDF file within the SSRS report.  Place the PDF file on your Intranet site, and, within a textbox on the report, create a literal string reference (assuming the string will be static, not dynamic) to the file -- something like

    ="Click here to see the PDF file!"

    Then set the textbox's "action" property radio button to "Jump to URL" and enter the file's URL -- such as

    ="http://yourServerName/yourPdfFileName.pdf

    You possibly could get fancier, and dynamically create the URL, derived from a value in a dataset or parameter, for example -- assuming there is some relationship between the PDF file name and the value in the dataset or parameter -- something like:

    ="http://yourServerName/" & Fields!someField.Value & ".pdf"

    We do this at my shop, and it works quite nicely.

    Cheers,

    Craig

     

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply