Focal Point
[SOLVED] PARTIAL AGGREGATION

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/165104933

January 12, 2010, 06:29 AM
umun
[SOLVED] PARTIAL AGGREGATION
Hi Guys,
I have been having the following error and can't figured out what the cause is.

"
(FOC11207) ERROR IN THE QUERY:
(FOC11306) REQUESTS CAUSING PARTIAL AGGREGATION ARE NOT ALLOWED
"

The sample code is as below. The code works fine if ACROSS fielld MNTH is changed to a BY field. It also works if "Page
Please, can you help.

-SET &NO_OF_MONTHS = -6;
-SET &TODAY_DT = EDIT(&DMYY,'99999999');
-SET &CURRENT_DT=&DATEYY | &DATEM;
-SET &INITIAL_DT=AYM(&CURRENT_DT, &NO_OF_MONTHS,'I6YYM');
-SET &FIRST_DT=EDIT(&INITIAL_DT,'$$$$99') | EDIT(&INITIAL_DT,'9999');

TABLE FILE VOL_REPT
SUM
ATC/D19.2-C AS ''
BY COUNTRY
BY NEW_PRODUCTS AS 'NEW
BY TYPE1
ACROSS MNTH AS ''
ON COUNTRY SUBTOTAL AS 'TOTAL'
HEADING
"VOLUME REPORT"
FOOTING
"Report Filtered by:<+0>ATC"
"Report Produced in:<+0>Euros"
"PageWHERE ( CONVT_TO_CRRNCY EQ 'EUROS' ) AND ( MNTH GE '&FIRST_DT' );

In addition to the above, is it possible to have records for a particular country printed on the next page if it can not be contained in one page? for example:
US = 10 records
CA = 5 records
UK = 7 records

Assuming a page can only contain 20 records, I want to be able to print records for US and CA on one page and then all 7 UK records be printed on the next page instead of printing 5 UK records in page 1 and then the remaining 2 records in the next page.

Thank you.

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
January 12, 2010, 08:58 AM
Microfich
Emeke,

I have not been able to reproduce your error using CAR or GGSALES. What is the format of VOL_REPT?

The error text is:
(FOC11306) REQUESTS CAUSING PARTIAL AGGREGATION ARE NOT ALLOWED
Partial Aggregation is caused by presence of "IN GROUPS OF", multiple
erb/key sets as well as active non-Parent/Child hierarchies that do not have
ssociated sort keys or filter tests resulting in unique member selection.

Re: countries on separate pages, use: ON COUNTRY NOSPLIT. If you want to have US and Canada on the same page, create a DEFINE field representing US+CA and use it as a BY field before COUNTRY

e.g. something like:

DEFINE FILE VOL_REPT
CTRY2/I1 = IF COUNTRY EQ 'US' OR 'CA' THEN 1 ELSE 2;
END

TABLE FILE VOL_REPT
...
BY CTRY2 NOPRINT NOSPLIT
BY COUNTRY
BY.....
END



WebFOCUS 8105
Windows;
DB2, UDB, SQL Server, Oracle
FOCUS-WebFOCUS since 1981
January 12, 2010, 10:37 AM
umun
Thank you for your response. VOL_REPT is a FOCUS masterfile built from MS Analysis services Cube.

Thank you.


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
January 12, 2010, 10:55 AM
TexasStingray
I do not know if this is a post error or if you code actually looks like this but the AS 'New is missing a closing quote '.




Scott

its a post error. The code actually has the quotation complete. Thank you.


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
If this is an issue with the SQL generated, extract the data first into a HOLD file then produce the report, see if the error persists.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

The code looks simple to start using hold file. Can anyone point out what could be wrong with the code.

Thank you.


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
There is nothing wrong with the code except that it does not take into account special rules that apply
when processing against OLAP cubes.

The error as microfich pointed out is self explanitory, and the solution is to create a hold file and
generate the output against that.
Using HOLD file, I was able to resolve the problem. But I wonder how ordinary page number and across field should be causing problems

Thank you all.


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
quote:
across field should be causing problems

Across because it can generate null cells in the Matrix.

TABPAGENO is a real odd ball, I doubt that you have a column named that in your master,
which is the only logical reason I can think of.

Try using the client traces to see exactly what SQL is being generated for the request.
quote:
Originally posted by JG:
quote:
across field should be causing problems

Across because it can generate null cells in the Matrix.

TABPAGENO is a real odd ball, I doubt that you have a column named that in your master,
which is the only logical reason I can think of.

Try using the client traces to see exactly what SQL is being generated for the request.



TABPAGENO and TABLASTPAGE are FOCUS reserved variables for page number. I guess you don't need to have it in a master file for it to work.


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
You should avoid using ANY WebFOCUS reserved word as a column name in your masters