Report Printing

Asked by Jennifer on 2011-03-07

Hi

I want to print "Invoice Totals" at end of my report, completely at the bottom of the page.
Even if I have my invoice of 2 pages I have to print the "Totals" at bottom

Is there something like "Report Footer" in OpenOffice.org?
Please advise

Jennifer

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
OpenBMS JSC
Solved:
2011-04-11
Last query:
2011-04-11
Last reply:
2011-03-18
Andrew Hutchings (linuxjedi) said : #1

Hi Jennifer,

Are you sure you have the correct Launchpad project? Drizzle is an SQL database. It sounds like you are using something with a graphic interface.

Jennifer (dazzlingirl-n) said : #2

Really sorry wrongly posted this question, it should have been in OpenERP addons

Jennifer (dazzlingirl-n) said : #3

I shall print the invoice on a Pre-Printed format whereby the Totals grid appear at the bottom.

filsys (office-filsystem) said : #4

try the attached rml instead the default rml
/account/report/account_print_invoice.rml
Thanks

Pe 08.03.2011 08:51, Jennifer a scris:
> Question #148150 on OpenERP Addons changed:
> https://answers.launchpad.net/openobject-addons/+question/148150
>
> Status: Needs information => Open
>
> Jennifer gave more information on the question:
> I shall print the invoice on a Pre-Printed format whereby the Totals
> grid appear at the bottom.
>

filsys (office-filsystem) said : #5

sorry, I've attached the file, but launchpad didn't show:

<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(210mm,305mm)" title="Test" author="Martin Simon"
allowSplitting="20">
<pageTemplate id="first">

<frame id="first" x1="0mm" y1="0mm" width="210mm" height="305mm"/>
<pageGraphics>
<setFont name="DejaVu Sans" size="10"/>
<drawString x="140mm" y="283mm"> [[ (o.partner_id and o.partner_id.name)
or '' ]] [[ (o.partner_id and o.partner_id.title and
o.partner_id.title.name) or '' ]]</drawString>
<drawString x="175mm" y="275mm">[[ (o.partner_id and o.partner_id.nrc)
or removeParentNode('para') ]]</drawString>
<drawString x="155mm" y="270mm">[[ (o.partner_id and o.partner_id.vat)
or removeParentNode('para') ]]</drawString>
<drawString x="165mm" y="265mm">[[ (o.address_invoice_id and
o.address_invoice_id.city) or '' ]]</drawString>
<drawString x="155mm" y="260mm">[[ (o.address_invoice_id and
o.address_invoice_id.state_id and o.address_invoice_id.state_id.name) or
removeParentNode('para') ]]</drawString>
<drawString x="155mm" y="255mm">[[ (o.partner_id.bank_ids[0].name) or
removeParentNode('para') ]]</drawString>
<drawString x="155mm" y="250mm">[[ (o.partner_id.bank_ids[0].acc_number)
or removeParentNode('para') ]]</drawString>

<drawString x="110mm" y="240mm">[[ formatLang(o.date_invoice,date=True)
]]</drawString>

<setFont name="DejaVu Sans" size="10"/>
<drawRightString x="165mm" y="48mm">[[ formatLang(o.amount_untaxed,
digits=get_digits(dp='Account')) ]]</drawRightString>
<drawRightString x="195mm" y="48mm">[[ formatLang(o.amount_tax,
digits=get_digits(dp='Account')) ]]</drawRightString>

<drawRightString x="195mm" y="12mm">[[ formatLang(o.amount_total,
digits=get_digits(dp='Account')) ]]</drawRightString>
</pageGraphics>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Partner_Address">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Invoice_General_Header">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>

</blockTableStyle>
<blockTableStyle id="Table_General_Detail_Content">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>

</blockTableStyle>
<blockTableStyle id="Table7">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/> </blockTableStyle>
<blockTableStyle id="Table8">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>

</blockTableStyle>
<blockTableStyle id="Table10">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>

</blockTableStyle>
<blockTableStyle id="Table9">
<blockAlignment value="LEFT"/>
<blockValign value="BOTTOM"/>

</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>

</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Helvetica" alignment="LEFT"
spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0"
spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0"
spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0"
spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"
spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0"
leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0"
leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0"
leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0" />
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0"
fontName="DejaVu Sans" fontSize="10.0" leading="10" alignment="LEFT"
spaceBefore="0.0" spaceAfter="0.0" />
<paraStyle name="terp_default_6" rightIndent="0.0" leftIndent="0.0"
fontName="Helvetica" fontSize="6.0" leading="10" alignment="LEFT"
spaceBefore="0.0" spaceAfter="0.0" />

<paraStyle name="Footer" fontName="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0"
leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%"
leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0"
spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold"
fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0"
spaceAfter="6.0"/>
<paraStyle name="terp_default_Bold_8" rightIndent="0.0" leftIndent="0.0"
fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"
spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General_Centre"
fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"
spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0"
spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre"
fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER"
spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold"
fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0"
spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" rightIndent="0.0"
leftIndent="0.0" fontName="DejaVu Sans" fontSize="10.0" leading="10"
alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" rightIndent="0.0"
leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10"
alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold"
fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0"
spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold"
fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0"
spaceAfter="6.0"/>
<paraStyle name="terp_default_address" rightIndent="0.0"
leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13"
alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0"
fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"
spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" rightIndent="0.0"
leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11"
alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" rightIndent="0.0"
leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11"
alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" rightIndent="0.0"
leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11"
alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0"
leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11"
alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0"
fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT"
spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_White_2" rightIndent="0.0"
leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3"
alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0"
fontName="Helvetica-Oblique" fontSize="8.0" leading="10"
alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Table" fontName="Helvetica" fontSize="10.0"
leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0"
fontName="Helvetica"/>
<paraStyle name="Preformatted Text" fontName="Helvetica" fontSize="10.0"
leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Frame contents" fontName="Helvetica" spaceBefore="0.0"
spaceAfter="6.0"/>
<images/>
</stylesheet>
<story>
<para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
<para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>

<blockTable colWidths="1.0,1.0" style="Table_Partner_Address">
<tr>
<td>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_8"><font color="white">.</font></para>
<para style="terp_default_8"><font color="white">.</font></para>
<para style="terp_default_8"><font color="white">.</font></para>
<para style="terp_default_8"><font color="white">.</font></para>
<para style="terp_default_8"><font color="white">.</font></para>
<para style="terp_default_8"><font color="white">.</font></para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_8"><font color="white">.</font></para>
<para style="terp_default_8"><font color="white">.</font></para>
<para style="terp_default_8"><font color="white">.</font></para>
</td>
</tr>
</blockTable>

<para style="terp_header"><font color="white">.</font></para>

<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="1.0,1.0,1.0" style="Table_Invoice_General_Header">
<tr>
<td>
<para style="terp_tblheader_General_Centre"><font
color="white">.</font></para>
</td>
<td>
<para style="terp_tblheader_General_Centre"><font
color="white">.</font></para>
</td>
<td>
<para style="terp_tblheader_General_Centre"><font
color="white">.</font></para>
</td>
</tr>
</blockTable>
<blockTable colWidths="177.0,177.0,177.0"
style="Table_General_Detail_Content">
<tr>
<td>
<para style="terp_default_Centre_9"><font color="white">.</font></para>
</td>
<td>
<para style="terp_default_Centre_9"><font color="white">.</font></para>
</td>
<td>
<para style="terp_default_Centre_9"><font color="white">.</font></para>
</td>
</tr>
</blockTable>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="202.0,87.0,71.0,57.0,43.0,71.0" style="Table7">
<tr>
<td>
<para style="terp_tblheader_Details"><font
color="white">Description</font></para>
<para style="terp_default_8"><font color="white">Description</font></para>
<para style="terp_default_8"><font color="white">Description</font></para>

</td>
<td>
<para style="terp_tblheader_Details_Centre"><font
color="white">Taxes</font></para>
</td>
<td>
<para style="terp_tblheader_Details_Centre"><font
color="white">Quantity</font></para>
</td>
<td>
<para style="terp_tblheader_Details_Right"><font color="white">Unit
Price </font></para>
</td>
<td>
<para style="terp_tblheader_Details_Right"><font
color="white">Disc.(%)</font></para>
</td>
<td>
<para style="terp_tblheader_Details_Right"><font
color="white">Price</font></para>
</td>
</tr>
</blockTable>
<section>
<para style="terp_default_2">[[repeatIn(o.invoice_line,'l')]]</para>
<blockTable
colWidths="7.0mm,65.0mm,10.0mm,11.0mm,22.0mm,28.0mm,28.0mm,28.0mm,7.0mm"
style="Table8">
<tr>
<td>
<para style="terp_default_8"><seq id="L1"/></para>
</td>
<td>
<para style="terp_default_8">[[ l.product_id.name ]]</para>
<para style="terp_default_8">[[ (l.prodlot_id.name) and 'L:']] </para>

</td>
<td>
<para style="terp_default_8"></para>
</td>
<td>
<para style="terp_default_Right_8"> [[ (l.uos_id and l.uos_id.name) or
'' ]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ formatLang(l.quantity)]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[
formatLang(l.price_unit_discount_line, digits=get_digits(dp='Account'))
]]</para>
</td>
<td>
<para style="terp_default_Right_8">[[ formatLang(l.price_subtotal,
digits=get_digits(dp='Account')) ]]</para>
</td>

<td>

<para style="terp_default_Right_8">[[ formatLang(l.price_subtotal *
l.invoice_line_tax_id.amount[0] )]]</para>
</td>
<td>

<para
style="terp_default_8">[[formatLang(l.invoice_line_tax_id.amount[0]*100,
digits=0)]]%</para>
</td>
</tr>
</blockTable>

</section>

<para style="Text body">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_2">[[repeatIn(o.tax_line,'t')]]</para>
</section>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="terp_default_9">[[ (o.comment and format(o.comment )) or
removeParentNode('para') ]]</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_9">[[ (o.payment_term and o.payment_term.note
and format(o.payment_term and o.payment_term.note)) or
removeParentNode('para') ]]</para>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="120.0,410.0" style="Table1">
<tr>
<td>
<para style="terp_default_Bold_9">Fiscal Position Remark : </para>
</td>
<td>
<para style="terp_default_9">[[ (o.fiscal_position and
o.fiscal_position.note and format(o.fiscal_position.note)) or
removeParentNode('blockTable') ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_2">
<font color="white"> </font>
</para>
<para>
<seqReset id="L1"/>
</para>
</story>
</document>

Pe 08.03.2011 09:09, filsys a scris:
> Question #148150 on OpenERP Addons changed:
> https://answers.launchpad.net/openobject-addons/+question/148150
>
> Status: Open => Answered
>
> filsys proposed the following answer:
> try the attached rml instead the default rml
> /account/report/account_print_invoice.rml
> Thanks
>
> Pe 08.03.2011 08:51, Jennifer a scris:
>> Question #148150 on OpenERP Addons changed:
>> https://answers.launchpad.net/openobject-addons/+question/148150
>>
>> Status: Needs information => Open
>>
>> Jennifer gave more information on the question:
>> I shall print the invoice on a Pre-Printed format whereby the Totals
>> grid appear at the bottom.
>>

Jennifer (dazzlingirl-n) said : #6

Dear Filsys

Thanks a lot for your support. However I am modifying in openoffice.org writer i.e the sxw file....please advise

filsys (office-filsystem) said : #7

If I am not mistaken, openoffice report designer is a tool that convert sxw to rml, but partial. Also, reportlab implementation in openerp is not complet. Header and footer from sxw is never converted in rml. If you want to supply header and footer to report, you have two options:
1. use global header and footer from company configuration or,
2. adapt your rml by write header and footer fields in absolute coordination, as I you show in rml attached previously.
Or, the third way, use frames in rml.
Thanks

Jennifer (dazzlingirl-n) said : #8

Dear filsys

Thanks again for your support, it's really encouraging. however, my invoice report is in landscape format and I need to print the client name, contact and addresses on page header and the totals in the footer.

Sorry to bother you, would appreciate if you could help or refer someone else to help regarding the openoffice.org writer.

Many thanks

Davide Corio (enlightx) said : #9

Hello Jennifer

i would really suggest you to have a look at aeroo or jasper_report addons.

they are not official and supported by openerp sa, but much more easy to understand and use than the standard report engine

Jennifer (dazzlingirl-n) said : #10

Hello Davide

Thank you for your support. I shall try the jasper_report addons and inform you

Many Thanks
Jennifer

Jennifer (dazzlingirl-n) said : #11

Hello Davide

I have downloaded the jasperreports-4.0.1 but I don't know how to use it, as it's only a folder containing files there is no installation as such.

Please advise

Jennifer

Davide Corio (enlightx) said : #12

Hello Jennifer,
you just need to download the jasper_report addon from here:

https://launchpad.net/openobject-client-kde

then have a look at here:

http://tinyurl.com/6ahmsdc

you can also buy a manual from this website:

http://tinyurl.com/4ajyg9h

Jennifer (dazzlingirl-n) said : #13

Dear Davide

I have gone through the links but the manual is on sale anyway, does aeroo also works same, can you please highlight me a bit.

Thanks a lot for your support.

Jennifer

Jennifer (dazzlingirl-n) said : #14

Hi ALL

I have downloaded the Jasper_report.zip file but when I try to unzip the file it gives a warning message: Unexpected end of archive. Any guess where I am wrong

Kind regards

Jennifer

Best OpenBMS JSC (openbmsjsc) said : #15

It looks like that the archive is not downloaded completely. Try to download
again, and compare the size, or better yet, use MD5/SHA1 checksum

Hope this help.

Jennifer (dazzlingirl-n) said : #16

Thanks Phong Nguyen-Thanh, that solved my question.