Seems you cannot have multiple PlaceInBottoms. Found workaro

Miklos_HollenderMiklos_Hollender Member Posts: 1,598
...workaround :)

Let's see if anyone has a better workaround here and if not we can move it to Tips and Tricks.

(Yeah, I know we are not supposed to make Classic reports anymore, but as long as they use it sometimes we still need to modify an invoice.)

At any rate: my job was to print the bank details in invoice footer (PlaceInBottom) except when the invoice is factored, in that case print the factoring text.

I used the usual two sections, CurrReport.SHOWOUTPUT approach, and it turned out it does not work because Navision reserves space in the bottom for both so one of them won't be printed to the bottom, but upper, and the other of them is often printed onto a next page.

(It is OK to have multiple footers with conditional output, just not PlaceInBottoms!)

The workaround was to set up various Standard Texts / Extended Texts, and have a function in some general setup table that taxes a Standard Text Code as a parameter plus a Text50 Array of 100 elements as a VAR, and assigns the first 100 records into the variable (... FINDSET THEN REPEAT i := i +1; TextArray := ExtendedTextLine.Text; UNTIL (ExtendedTextLine.NEXT = 0) or (i >= 100); ), and then basically put TextArray[1], TextArray[2], etc. as many as needed in textboxes in the footer.

That way I only need one PlaceInBottom footer.

It is not ideal because there are less formatting options. But nothing else seemed to work.

I wonder how this will look in RDLC reports :)

Comments

  • FlowerBizFlowerBiz Member Posts: 34
    To solve the problem of conditional report fields, the solution that I use involves creating global variables in the report to suit my purpose, placing these variables in the report sections, and then assigning these variables the appropriate values in the OnAfterGetRecord section of the report. I set them blank when not needed. I think it is possible, though I have not tried it, to overlay more than one field on top of another in the case of differing field sizes and formats. Then, only the non-blank of the two will print. I use text fields for numeric values, formatted appropriately, so that when I don't want them to print, I simply set the assignment to blank (null). This allows me to print zeroes when I want or blanks when I don't want to see zeroes for zero values

    From what I gather, you may be doing this already but with the added effort of storing the values in the table first. If you can create the values on the fly (like totals), then my suggestion is to refrain from storing any temporary information in the table(s) since it's more difficult to maintain, causes more data to transfer on every SELECT * statement, and increases the size of your database unnecessarily. Of course, this is just my two cents.
Sign In or Register to comment.