[Solved] Print a total field in a preprinted form

Getting your data onto paper - or the web - Discussing the reports features of Base
Post Reply
Ranger
Posts: 4
Joined: Sun Mar 06, 2016 7:13 pm

[Solved] Print a total field in a preprinted form

Post by Ranger »

Hello to all.
It is the first time I'm writing in this forum and I would like to apologize for my english.
I have a problem with oracle report builder.
I need to print a field in a preprinted form in an exactly position of the form, even if the number of detail lines is different from time to time.
Pratically I have a document in wich there is a "Detail" section containing a certain number of lines varying each time, but the field containg a summarized amount must be printed in a specific part of the form. The problem is that, depending on the number of the detail lines the is printed in different places.
My question is: there is a way to solve this problem? I have tried to put the field in many sections of the report (Group Footer, Report footer, page footer), but without any result. I think that there shoud be a solution because there are a lot of this kind of problems (invoices forms, purchase forms, sales forms have a section of lines detail that vary and a section with totals that appear always in the same position).
Is there somebody who can help me?
Bye
Last edited by Ranger on Tue Mar 08, 2016 11:29 am, edited 2 times in total.
openoffice:4.1.1
Windows 8.1
lalithr312
Posts: 56
Joined: Mon Jun 22, 2015 12:07 am

Re: Print a total field in a preprinted form

Post by lalithr312 »

Ranger wrote:Hello to all.
It is the first time I'm writing in this forum and I would like to apologize for my english.
I have a problem with oracle report builder.
If your problem's with Oracle Report Builder, wouldn't this question be more suited for an Oracle support forum?
OpenOffice 4.1.1 on Windows 10
Ranger
Posts: 4
Joined: Sun Mar 06, 2016 7:13 pm

Re: Print a total field in a preprinted form

Post by Ranger »

Thanks a lot for your answer.
I will do as you suggest.I wrote to this forum because, as oracle report builder is linked with AOO,I thought that there were somebody who could help me.
Bye
openoffice:4.1.1
Windows 8.1
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Print a total field in a preprinted form

Post by Nocton »

You say that you have a "field containing a summarized amount ". I am not sure what you mean by 'summarized', but if it was one of the in-bulit functions, e.g. if the summarized amount was a Sum of Field1, then it would be created using a function AccumulationField1. Look in the Functions list for the Detail or other section of the report. Now you can make a text box, place it where you want it, and set the Data Field to AccumulationField1. Alternatively if you have created your own function to produce the summary then you can reference that in a text box.

By the way your English is OK and I think you are posting in the right forum.

Regards

Nocton
OpenOffice 4.1.12 on Windows 10
Ranger
Posts: 4
Joined: Sun Mar 06, 2016 7:13 pm

Re: Print a total field in a preprinted form

Post by Ranger »

Thanks for your answer.
I did exactly what you said.
I used a standard function to create an accumulate field; then I created a text field and I put it in the Group footer, but it does not work.
It moves the position of this accumulated field depending on the number of the detail lines belonging to the document to be printed.
This behaviour, im my opinion, is corrected in a normal report because the total should be printed near the detail lines and the report must be as compact as possible, but in a preprinted form it must be printed always in the same position (normally near a fixed text printed in tyhe form containig e.g. "Total"). To solve this problem, in my opinion, there would be a parameter to choose if the field must be printed in the same position or not.
I try to find it, but I did not find it.
Bye
openoffice:4.1.1
Windows 8.1
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Print a total field in a preprinted form

Post by Nocton »

I think that you cannot use a Report Writer, because the detail line automatically expands according to the number of records in the group - as you have found. So your sum field can only be in the header or footer. I suggest that you use a Calc spreadsheet to fix where you want the output data. Make a query to put your required data on one sheet (QueryData) - just paste the query to the sheet -and then make your document in another sheet (OutputSheet). The cells in OutputSheet can lookup, sum or point to the data in QueryData. Calc will give give you more flexibility for what you require.

Regards

Nocton
OpenOffice 4.1.12 on Windows 10
Ranger
Posts: 4
Joined: Sun Mar 06, 2016 7:13 pm

Re: Print a total field in a preprinted form

Post by Ranger »

Hallo Nocton,
Thanks for your suggestion.
I will try to do it.
I will close this thead.
Thanks again
Regards
openoffice:4.1.1
Windows 8.1
longi
Posts: 110
Joined: Mon Jul 15, 2013 5:04 pm

Re: [Solved] Print a total field in a preprinted form

Post by longi »

Hi!
I have to apologize because I was offline for a while. Also I have to apologize for answering solved things. However i'd like to show one other possible solution.
I drew a numericfield which has a permanent position and it collects the sum of the totals which are in the main table.
I made two macros: the first one to open a report made withour ORB and the other with ORB.
Both of them has been proved with Libreoffice and with Openoffice. There are little differences, but they work OK.

Best regards!
Attachments
CAMPOFIJO.7z
(30.2 KiB) Downloaded 425 times
OpenOffice 4.1.5 on Windows 10
LibreOffice 5.1 on Windows 7
LibreOffice 6.0.1 on Windows10
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: [Solved] Print a total field in a preprinted form

Post by Nocton »

Well done!
Simpler in a spreadsheet, I think, but you have clearly understood OO macros.
OpenOffice 4.1.12 on Windows 10
Post Reply