RDLC Report with Footer always on the button

gtrgtr Member Posts: 131
edited 2013-04-07 in NAV Three Tier
Hello,

Customer requires that on the order confirmation report VAT information & some other specific data are always on the bottom of the last page.
I already solved this kind of problem on the invoice (by printing a calculated number of blank lines).

But here are complications : on the lines of type = Item I have to print the product picture, and so the height of this line is much greater than the other lines. So my calculation as made on the invoice can't work.

I can't find a solution to solve this kind of problem.
If anybody has an idea how to get this work would be nice :)

Comments

  • clauslclausl Member Posts: 455
    Try to explore the report I have done here, where I have full control of last page for each customer.

    You can find it here among other demo reports:

    http://sdrv.ms/UWdRVL

    /Claus Lundstrøm
    Claus Lundstrøm | MVP | Senior Product Manager | Continia.com
    I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
    I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)
  • gtrgtr Member Posts: 131
    Hello,

    First of all Thanks for all this resources - very helpful !

    But concerning my problem, it seems to me that there is no solution in your report examples

    The "Footer on last page" examples do not have a table in the body, so you always know exactly how many body-information is on one page.
    But in the order confirmation report (R205) there is a variable number of lines printed in the body.
    And as I said, in my case there are 2 types of lines with different heights in the body

    I have seen your report 206 example too, but in this example you show how to do with no Code.GetData and not how to put the footer always on the bottom of the last page.

    So I appreciate really a lot (your examples will inspire my work on other reports) but in my case I can't see the solution.


    Lets get more in the details concerning the solution that I am looking for :

    I had the same problem in the invoice report, but I had not this complicated thing of lines of different heights : all printed invoice lines have the same height. In this case I found a solution, a little bit complicated but it seems to work - here is the methode I'm employing :

    In Report object design I define the following variables :
    NbLineMax : for the maximum number of printed lines on a page - except the last page - in my case = 42
    NbLineDer : for the maximum number of printed lines on the last page - in my case = 23
    NbLine : the number of printed lines in the invoice
    I added a new dataitem (on table Integer) after the Sales Invoice Lines - I calculate a setrange on number like this :
    IF ((NbLine - 1) MOD NbLineMax) > (NbLineDer - 1) THEN
    SETRANGE(Number,1, NbLineDer + NbLineMax - ((NbLine - 1) MOD NbLineMax) - 1)
    ELSE
    SETRANGE(Number,1, (NbLineDer - ((NbLine - 1) MOD NbLineMax) - 1));

    In Visual Studio Layout I added a table just after the Sales invoice lines to print blank lines.

    So this will work on documents where lines have always the same height but in my order confirmation report I cannot apply this solution.
    I thought about an other method :
    I tried without success to calculate and transfer information about :
    Number of printed lines of height 1 on last page
    Number of printed lines of height 2 on last page
    My problem is that I do not know about NewPage in Object Designer,
    and in Visual Studio where I know about NewPage, I can't see how to reinitialize my line counters to zero, when a NewPage begins.
    If you have any Idea to do this or if you have another Idea to get this footer on the bottom on the last page - this would be real nice !
Sign In or Register to comment.