4

I am using a tablix in my .rdlc report. There is a textbox with text "Signature". I want to place this textbox at the bottom side (just before the page footer) on the last page of the report.

I have googled for this solution. but no satisfactory result found.

My enviroment is VS2010,framework 4.0.

Any suggesstion?

rene
  • 41,474
  • 78
  • 114
  • 152
s.k.paul
  • 7,099
  • 28
  • 93
  • 168

2 Answers2

1

There is no easy way to have something align to the bottom of an RDLC report page. However, there is a nice workaround that makes it possible to replicate it, it's quite complicated though. Follow these steps:

  1. Create a method that generates empty line feeds ("CarriageReturn LineFeed"):

    public string GenerateCrLf(int Count)
    {
        string Value = "";
        for (int i = 0; i <= Count; i ++) {
            Value = Value + " " + Environment.NewLine;
         }
        return Value;
    }
    
  2. Add a new row at the end of your Tablix with a TextBox containing the following expression: =Code.GenerateCrLf(x- cint(CountRows("Table1"))) replacing x by a number that represents the number of lines. The value of this number is obtained by trial and error, if the size of the table changes often, you can write another function that calculates this number based on number of rows your tablix has and the number of rows that can be displayed inside on a single page. Again, you'll have to do this with a lot of trial and error to find the magic number but it cna be made dynamically this way.

  3. Add the TextBox (or table/signature/...) below the Tablix and it will automatically be displayed below.


This answer was taken from this tutorial and demonstration. All credit goes to the writer, Steven Renders.

durron597
  • 31,968
  • 17
  • 99
  • 158
Oceans
  • 3,445
  • 2
  • 17
  • 38
0

Add the textbox in the page footer section. Then set the visibility of the textobox to show the textbox only if the current pageNumber is the same as the total page number. (Hidden if Globals!PageNumber <> Globals!TotalPages)

So you will have your textbox only at the last page of the report.

Marco P.
  • 26
  • 2