Solved

.report file Document Footer Code snippet

  • 14 October 2021
  • 1 reply
  • 209 views

Userlevel 2
Badge +7

Hi all,

does anyone have a code snippit for adding document footer in .report file?

Report is QuotationLetterRep and in report file the rdf is generateted automatically. I do not want to make changes in rdf, all code should be set in .report file. I don’t know how to handle it.  

 

Br,

Jan

 

icon

Best answer by Jan Siekmann 18 October 2021, 16:59

View original

This topic has been closed for comments

1 reply

Userlevel 2
Badge +7

I have created a document footer entry in my report file as follows:

block DocumentFooter {
   bindings {
      parameter QuotationNo     Text;
      parameter QuotationRev    Number;
   }
   SQL-Statement
   SELECT NULL text1, NULL text2, NULL text3, NULL text4, NULL text5, NULL text6, NULL text7, NULL text8, NULL text9, NULL text10,
          NULL text11, NULL text12, NULL text13, NULL text14, NULL text15, NULL text16, NULL text17, NULL text18, NULL text19, NULL text20,
          NULL text21, NULL text22, NULL text23, NULL text24, NULL text25, NULL text26, NULL text27, NULL text28, NULL text29, NULL text30,
          NULL text31, NULL text32, NULL text33, NULL text34, NULL text35, NULL text36, NULL text37, NULL text38, NULL text39, NULL text40,
          NULL is_free_text
   FROM DUAL;
   PL/SQL-Block {
      DECLARE
         row_                           NUMBER;
         column_title_                  Footer_Connection_API.footer_arr;
         column_text_                   Footer_Connection_API.footer_arr;
         f_title_                       Footer_Connection_API.t_varchar2;     
         f_text_                        Footer_Connection_API.t_varchar2;  
         system_footer_field_attr_      VARCHAR2(2000);
         report_id_                     VARCHAR2(100) := 'QUOTATION_LETTER_REP';
         company_                       VARCHAR2(5)   := SITE_API.Get_Company(SERVICE_QUOTATION_API.Get_Contract(:QuotationNo, :QuotationRev));
         language_code_                 VARCHAR2(2)   := SERVICE_QUOTATION_API.Get_Language_Code(:QuotationNo, :QuotationRev);
         report_footer_connected_       VARCHAR2(5);
      
      BEGIN
      
         IF (Footer_Connection_API.Is_Report_Footer_Connected(company_, report_id_,'*')) THEN
           report_footer_connected_ := 'TRUE';
         ELSE
           report_footer_connected_ := 'FALSE';
         END IF;
      
      
         IF (report_footer_connected_ = 'TRUE') THEN
      
            Footer_Connection_API.Get_Footer_Details(row_,
                                                     column_title_,
                                                     column_text_,
                                                     company_,
                                                     report_id_,
                                                     '*',
                                                     language_code_);
      
            FOR i IN 0..row_ LOOP
                Xml_Record_Writer_SYS.Start_Element(xml$_,'DOCUMENT_FOOTER');
                f_title_  := column_title_(i);
                f_text_   := column_text_(i);
                FOR n IN f_title_.FIRST..f_text_.LAST LOOP
                   Xml_Record_Writer_SYS.Add_Element(xml$_,f_title_(n),f_text_(n));
                END LOOP;
                Xml_Record_Writer_SYS.End_Element(xml$_,'DOCUMENT_FOOTER');
            END LOOP;
         END IF;
      END;
   }
   attributes {
      attribute Text1                       Text(200);
      attribute Text2                       Text(200);
      attribute Text3                       Text(200);
      attribute Text4                       Text(200);
      attribute Text5                       Text(200);
      attribute Text6                       Text(200);
      attribute Text7                       Text(200);
      attribute Text8                       Text(200);
      attribute Text9                       Text(200);
      attribute Text10                      Text(200);
      attribute Text11                      Text(200);
      attribute Text12                      Text(200);
      attribute Text13                      Text(200);
      attribute Text14                      Text(200);
      attribute Text15                      Text(200);
      attribute Text16                      Text(200);
      attribute Text17                      Text(200);
      attribute Text18                      Text(200);
      attribute Text19                      Text(200);
      attribute Text20                      Text(200);
      attribute Text21                      Text(200);
      attribute Text22                      Text(200);
      attribute Text23                      Text(200);
      attribute Text24                      Text(200);
      attribute Text25                      Text(200);
      attribute Text26                      Text(200);
      attribute Text27                      Text(200);
      attribute Text28                      Text(200);
      attribute Text29                      Text(200);
      attribute Text30                      Text(200);
      attribute Text31                      Text(200);
      attribute Text32                      Text(200);
      attribute Text33                      Text(200);
      attribute Text34                      Text(200);
      attribute Text35                      Text(200);
      attribute Text36                      Text(200);
      attribute Text37                      Text(200);
      attribute Text38                      Text(200);
      attribute Text39                      Text(200);
      attribute Text40                      Text(200);
      attribute IsFreeText                  Text(5);
   }
   entities {
   }
}