pdf makes top margin on first page slightly larger and adds blank page at end

asked 2020-08-27T19:48:05.027+00:00
db042190 1,416 Reputation points

hi we run 2016 enterprise and develop using vs 2017.

my subreport has been changed to have a .04 cm top and bottom border so a rectangle at the top can always have a predictable bottom border location for tear off purposes.

when i print stand alone from the subreport and save to pdf, the top border is fine but an extra page always prints at the end .

when i print from the master report (it iterates over the sub) the first page's top border is about 5/16" and unacceptable per the specs. every page after that prints the correct size top border. here too a blank page prints at the end of the report which is hundreds of pages long.

does anybody know how to deal with either of these issues?

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,097 questions
No comments
{count} votes

4 answers

Sort by: Most helpful
  1. answered 2020-08-27T20:09:22.813+00:00
    db042190 1,416 Reputation points

    eventhough the header row in the master's tablix was always set to hide, i changed its height to zero anyway but that didnt seem to make a difference.

    as i take a closer look, i think this is a problem even before i save to pdf. i mean the larger top margin on page 1. the blank ending page seems to be a pdf problem as it only shows after i save to pdf.

    No comments

  2. answered 2020-08-27T20:32:34.717+00:00
    db042190 1,416 Reputation points

    the first part was easy. i noticed the tablix that was iterating thru the subreport had a gap between it and the top of the body. i moved it up and all was good with the large top margin on pg 1. does anybody know how to get rid of the blank page at the end? that seemingly comes from pdf?

    No comments

  3. answered 2020-08-27T20:42:12.527+00:00
    db042190 1,416 Reputation points

    and maybe the 2nd part too. why pdf had an issue with it i dont know. but all the whitespace in the body after the tablix caught my eye. i shortened it to butt up right against the bottom of the tablix , ran, saved to pdf and blank page seems to be gone. that doesnt make any sense. pdf is a 3rd party product.

    No comments

  4. answered 2020-08-28T02:11:25.873+00:00
    Joyzhao-MSFT 15,361 Reputation points Microsoft Employee

    Try the following steps:

    1. Shrink the Body of your report to remove the blank space. That means move the bottom border up as much as possible and move the right border to the left as much as possible, to remove the unneeded blank space.
    2. Check your report Body size (Height & Width), the Header and Footer sizes (Height & Width), and the Margins of the report. Determine if when combined they are larger than the report’s Page size (Width & Height). If they are larger, then adjust your sizes to fit within your page size, or adjust your page size to be able to fit all the report sizes combined.
    3. Check if there are any images in the report with their Sizing property set to “Autosize”. This could cause images to be bigger than anticipated at design time and cause the image itself or other report items to be pushed off the page.
    4. If the above doesn’t work or is not applicable, check if you are dynamically adding columns to your report. If you are then you need to determine if the new columns are causing your report width to go beyond the page size width, and make adjustments accordingly.
    5. Put the break location as "Start" instead of "End"

    Hope this helps!
    If you have any question, please feel free to let me know.
    If your problem has been solved, please mark "accepted answer" on my reply, thank you for your understanding.

    No comments