This methode allows to execute several SQL Objects and convert the query using FOP to generate the output in PDF, PCL, PS, XML.


    > *
        <vars> ?
            <var name='name'> +
                <varvalue /> !
    <fop.array> *
        <arr /> +


required attribute 'code' not defined

The name of the SQL Object has not been specified.

required attribute 'cond' not defined

The condition of the SQL Object has not been specified.

insuficient query parameters (vars required ?)

The query of the SQL Object cannot be performed, for lack of consition (mandatory input fields) or input variables.

database required

The name of the database has not been informed.

user must be set for operations

The username has not been specified.


Each one of the tags <fop.form> must return the xml resulting of the execution of the form, Cada uno de los tags<fop.form> debe retornar el xml resultado de la ejecución del form, so you should indicate xml-string type.


A simultaneous printing of an invoice and its corresponding delivery note are generated. The result is not stored in a file, but it is returned. For example, this can be used from a SQL object or from another XSQL-Script which collects the result.

<xsql-script name='fop_form'>
        <set name='m_file'>
            <string>c:<file.separator />jas<file.separator />pepe.pdf</string>
        <set name='p_docser'>FC-000026</set>
        <!-- =========================================================================== -->
        <!--                                                                             -->
        <!--     Selection condition of the delivery notes associated to the invoice     -->
        <!--                                                                             -->
        <!-- =========================================================================== -->
        <set name='m_sqlcond'><string>
           gcomalbh.cabid IN (SELECT cabid
                                FROM gcomalbl
                               WHERE linid IN (SELECT linori
                                                 FROM gcomfacl, gcomfach, gcomfacd
                                                WHERE gcomfacl.cabid  = gcomfach.cabid  AND
                                                       gcomfach.docser = '</string><p_docser /><string>' AND
                                                       gcomfach.tipdoc = gcomfacd.codigo AND
                                                       gcomfacd.tabori = 'TC'            AND
                                                       gcomfacl.linori IS NOT NULL))</string>
        <!-- ======================================================================== -->
        <!--  Create and link the PDFs                                                -->
        <!-- ======================================================================== -->
            <file name='#m_file' type='absolute' />
            < type='pdf'>
               <fop.form code='gcomalbh_print' cond='#m_sqlcond' />
               <fop.form code='gcomfach_print' cond="docser='#p_docser'" />

An array is used to pass as argument the '''FP''' documents in '''string''' format. This mode is useful for productions in which the number of documents to group is unknown.

<xsql-script name='fop_form'>
       <array name='arr' />
           <select prefix='cvenfach_'>
               <columns>facidx </columns>
               <from table='cvenfach' />
                   fecfac > <mdy d='01' m='01' y='2010' />
                <println>Genreating FOP document for cvenfach: <cvenfach_facidx /></println>
                <array.add name='arr'>
                    <fop.form   code='cvenfach' 

       < file='/tmp/cvenfach.pdf' type='pdf'>
       <return name='facturas.pdf' type='application/pdf'><file name='/tmp/cvenfach.pdf' /></return>