Page 1 of 1

[Solved] Print a total field in a preprinted form

Posted: Sun Mar 06, 2016 7:53 pm
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

Re: Print a total field in a preprinted form

Posted: Sun Mar 06, 2016 9:16 pm
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?

Re: Print a total field in a preprinted form

Posted: Mon Mar 07, 2016 12:28 pm
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

Re: Print a total field in a preprinted form

Posted: Mon Mar 07, 2016 5:42 pm
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

Re: Print a total field in a preprinted form

Posted: Mon Mar 07, 2016 7:55 pm
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

Re: Print a total field in a preprinted form

Posted: Mon Mar 07, 2016 8:48 pm
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

Re: Print a total field in a preprinted form

Posted: Tue Mar 08, 2016 11:26 am
by Ranger
Hallo Nocton,
Thanks for your suggestion.
I will try to do it.
I will close this thead.
Thanks again
Regards

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

Posted: Mon Mar 28, 2016 6:52 pm
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!

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

Posted: Tue Mar 29, 2016 5:26 pm
by Nocton
Well done!
Simpler in a spreadsheet, I think, but you have clearly understood OO macros.