locked
Force dynamic content in to a single (or fixed no of) page RRS feed

  • Question

  • Hello,

    I have a simple report showing some data with respect to each day of a selected year (year is the parameter for the report).

    Data should be shown in a way which, data of each month should be presented in a single table and 4 such table (or 4 months) should fit in to a single A4 paper when exported and printed.

    Basically the layout is static something similar to below:


    In a single table (for each month) first two columns are the date (1, 2, .. 30 or 31) and the second column is the week day.

    Rest of the 4 columns are some numbers obtained by evaluating an expression. Data source is a stored procedure with all these column data.

    My question is how to design the layout in a way which 4 tables are grouped in to a single page. So the whole report will be just 3 pages?

    What I have done so far is added a table with 12 cells (2 columns X 6 rows) and repeated the following table with a filter in each to show only data from a particular month.


    then I set the 'Keep Together' property to TRUE in each inner table. 

    This partially works. when I export to PDF it comes as I want but with a blank page after each page with data. So my report has 6 pages (3 with data, 3 blank).

    When I export to Word or Excel it is a completely different story and tables are scattered over multiple pages with different row heights in tables.

    Please help on this.

    Thanks a lot.


    • Edited by A_Renz Friday, December 14, 2018 3:04 PM
    Saturday, December 8, 2018 6:51 AM

All replies

  • Would you be able to show your desired format in a screenshot. That should make it clear for us on what you're looking at

    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    Saturday, December 8, 2018 7:23 AM
  • Hi A_Renz,

    When you export to PDF and get blank page, you need to makes sure your report page size meet below condition:(Body Width + Left margin + Right margin) <= (Page width). In addition, you said it will split into multiple page in Excel and Word, if possible, could you please inform me more detailed information(such as your Excel,Word output, your design )  ? Then I will help you more correctly.

    Please do mask sensitive data before uploading.

    Thanks for your understanding and support.
    Best Regards,
    Zoe Zhi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, December 10, 2018 7:40 AM
  • Hi Visakh,

    I have added the screenshots to the original post.

    Thanks

    Friday, December 14, 2018 3:05 PM
  • Hi Zoe Zhi,

    I have uploaded the expected output as well as the design to the original post.

    Can you please check again?

    Thanks.

    Friday, December 14, 2018 3:08 PM
  • Hi A_Renz,

    I want to know whether all your data are in the same dataset. If so, you could follow below steps:

    My dataset structure is like below(group by month)

     Then insert a List, add three  tables(I show three months in a page, for your requirement, you need to add four tables) in List, then choose List, right Details in Row Group to configure properties like below(and you also could set Page Breaks )

    =switch(Fields!month.Value="jan" or Fields!month.Value="feb" or Fields!month.Value="mar",1,
    Fields!month.Value="apr" or Fields!month.Value="may" or Fields!month.Value="jun",2)

    Then set filter on each table like below

    You need to change expression for each table like below

    =iif(Fields!month.Value="jan" or Fields!month.Value="apr", true, false)
    
    =iif(Fields!month.Value="feb" or Fields!month.Value="may", true, false)
    
    =iif(Fields!month.Value="mar" or Fields!month.Value="jun", true, false)

    Then you will get the result like below

    And for PDF and print format, please makes sure your report page size meet below condition:(Body Width + Left margin + Right margin) <= (Page width). And you could preview this in Print Layout model in SSDT or Report Builder to see its actual layout

    Best Regards,
    Zoe Zhi

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, December 17, 2018 8:24 AM