Timofey Bugaevsky,
and could I align footer to the bottom of the page?
I have found this code for M15 generation.
| Code |
|---|
TemplateAreaFooter.Parameters.HeadNameAndSurname = Heads.HeadNameAndSurname;
TemplateAreaFooter.Parameters.NameAndSurnameOfChiefAccountant = Heads.ChiefAccountantNameAndSurname;
TemplateAreaFooter.Parameters.HeadPost = Heads.HeadPosition;
TemplateAreaFooter.Parameters.WarehouseManNameAndSurname = Heads.WarehouseManNameAndSurname;
TemplateAreaFooter.Parameters.WarehousemanPosition = Heads.WarehouseMan_Position;
TemplateAreaFooter.Parameters.NumberOfRecordOrdinalNumbersInWords = NumberInWords(RowsCount, ,
",,,,,,,,0");
TemplateAreaFooter.Parameters.AmountInWords = SmallBusinessServer.GenerateAmountInWords(
TotalTotalWithVAT, CurrentDocument.DocumentCurrency);
TemplateAreaFooter.Parameters.Total_VAT = TotalTotalWithVAT - TotalSumWithoutVAT;
SpreadsheetDocument.Put(TemplateAreaFooter); |
The same for TORG12
| Code |
|---|
TemplateAreaFooter.Parameters.DocumentDateDay = """" + Left(FullDocumentDate, FirstSeparator - 1)
+ """";
TemplateAreaFooter.Parameters.DocumentDateMonth = Mid(FullDocumentDate, FirstSeparator + 1,
SecondSeparator - FirstSeparator - 1);
TemplateAreaFooter.Parameters.DocumentDateYear = Right(FullDocumentDate,
StringLength - SecondSeparator);
SpreadsheetDocument.Put(TemplateAreaFooter); |
There is nothing that could help me to put footer exactly where I want.
I also looked up for some functions which may help. Document have header and footer which could contain this information:
| Quote |
|---|
This may be used to access the spreadsheet's header and footer. header and footer is special text that is placed at the top or bottom of each page when a document is printed. The following control structures can be used in the header and footer text: [&PageNumber]- a page number will be printed on this part of the page; [&PagesTotal] - total number of pages will be printed on this part of the page; [&Date]- the current date will be printed on this part of the page; [&Time]- the current time will be printed on this part of the page, |
Correct me if I wrong but I can not define custom template for Document footer.
I really need that some fields are exactly in the defined space. Here, there are a lot of document templates which should be filled by printing. So I have some area in the middle of document which is a space for goods. No matter how much goods I have the footer should always be at the same position, at the bottom of the page.
I tried this technique, but it seems not work in 8.3
| Code |
|---|
TempSD = New SpreadsheetDocument;
Area.Parameters.BaseImponible = "100";
Region = TempSD.Put(Area);
Nota = TempSD.Drawings.Add(SpreadsheetDocumentDrawingType.Text);
Nota.Place(Region);
Message(Nota.Height);
Return Nota.Height;
|