I must print a report on a form. The printing paper already has specific boxes printed at the bottom of the page.
These boxes must contain information about VAT of the items. There could be various VAT codes. Then they must contain the total of VAT amount and some other information.
For example I’m using “206 - Sales Invoice” and the VAT table with these information, is already in the body of the report. I need to put it in the footer of the report because the position must be fixed and not to depend on the lenght of the body.
I tried to move (in the “Sections” window of the classic client) all the fields in the footer part… but when I open the “Layout” these fields disappear.
I know that I cannot use tables in the footer sections, nor single fields, but for single fields the solution is to get them by code, using a combination of “SetCode” and “GetCode”… and it works… but not for a Table (with its lines and totals)
Is there a solution?
(excuse my not so good english and my difficulty to explain myself properly and with full details)
When you design a report, you design the actual layout through the section-designer.
There are different types of sections, to be used for different purposes.
One of the section-types is a footer. And this is the one you want to use for your purpose.
The footer-section is printed after nav has looped through all records in that particullar dataitem, wich makes ideal (and also intended originally) to printing totals.
Once again i must advertise for the Application Designers Guide…
It can be found on the product-CD in the Doc-folder, and is called w1w1adg.pdf.
Appendix B of this manual contains flowcharts for a report, and might give you an idea on where to do certain types of tasks.
I’ll try to explain it in the best way…
My only need is to put some information at the bottom of the page. If I could do this using the body section… everything would be easy… but the body section has dynamic dimensions…
I’ve gone in the “section designer” and tried to put the fields in the footer section of the page, called “PageLoop, Footer”. But I need to put not only the totals into it, but also the records.
I thought that moving these things from the body was enough for having these visible in the layout… but it was not…
I’m reading the Application Designers Guide… but nothing useful to me… until now…
I should leave the fields and totals in the body… and then create some variables… and then?
Well, if you insert a new integer-dataitem, just after the dataitem that contains the data you want printed.
Indent it under the original dataitem, and set the properties so that integer is limited to 1.
Then insert a footer-section of the new integer-dataitem, and set the properties on that to PlaceInButtom = Yes.
Ok, this works in the classic client, Sections window. But that not guarantee that it works in the same way also in the layout designer.
The way that nav classic uses to build totals is not the same used by the new report designer (similar to reporting services). The report designer simply use a box with the “Sum(Fields!VATAmount…” for the total of all the lines having the “Fields!VATAmount” field.
My problem is getting this total and all the single fields in the footer section of the page in report designer of RTC.
my assumption was, that you want to print the totals of the different VAT Codes, and that in the Form, there is a specific number of these Codes with a corresponding field (maybee even specified field location) for the different Codes. So you know at design time, which and how many Totals you have to maintain and print.
In this scenario, you can sum the values for the different VAT Codes in Variables, and then print the value of these Variables in the Footer Section at the specific location you need.
However, I have no idea (yet) if this will work in the new report designer.
Before trying to put the totals for the vat codes in variables, I tried a simple step: I tried to get just a simple field. And I failed…
There is the table “112 - Sales Invoice Header” that contains the field “Amount Including VAT”. So I created a variable “AmountInclVAT” (of “Record” DataType) pointing to the “Sales Invoice Header” table.
Then I created a textbox in the PageLoop Footer that used AmountInclVAT.“Amount Including VAT” as SourceExpr.
I run the report in classic designer but the field return the value 0,00 instead of the right value.