Issue 119972

Summary: [From Symphony]Formula GETPIVOTDATA returns #REF! value
Product: Calc Reporter: Yan Ji <yanji.yj>
Component: open-importAssignee: AOO issues mailing list <issues>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: binbjguo, jingbaibetsy, leiw, liushenf, yunquanp
Version: 3.4.0   
Target Milestone: 4.0.0   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 120823    
Attachments:
Description Flags
sample
none
Fix patch for Bug 119972 yunquanp: review?

Description Yan Ji 2012-06-13 01:59:23 UTC
Created attachment 78270 [details]
sample

Build: AOO3.4

Load sample file, check result in cell A10.

Defect: formula GETPIVOTDATA returns #REF!
Comment 1 pengyunquan 2012-06-13 03:58:23 UTC
The Root Cause is that within MS Excel, the user-defined field name( called "Layout Name" in AOO ) can be used in the Formula "GETPIVOTDATA", and MS Excel will check original field name & Layout Name. But in AOO, just orginal field name & an automatically generated data field name are checked. When outputting Pivot Table, the data field name is outputted as automatically generated data field name if the Layout name is invalid, while the data field name will be outputted as the Layout name if the Layout name is valid. For the users, they just see the outputted name, and the formula "GETPIVOTDATA" should check the outputted name. As a result, the formula "GETPIVOTDATA" should check the Layout name if the Layout name is invalid, and check the automatically generated data field name if the Layout name is invalid.
Comment 2 pengyunquan 2012-06-13 04:08:09 UTC
Created attachment 78275 [details]
Fix patch for Bug 119972

The Root Cause is that within MS Excel, the user-defined field name( called "Layout Name" in AOO ) can be used in the Formula "GETPIVOTDATA", and MS Excel will check original field name & Layout Name. But in AOO, just orginal field name & an automatically generated data field name are checked. When outputting Pivot Table, the data field name is outputted as automatically generated data field name if the Layout name is invalid, while the data field name will be outputted as the Layout name if the Layout name is valid. For the users, they just see the outputted name, and the formula "GETPIVOTDATA" should check the outputted name. As a result, the formula "GETPIVOTDATA" should check the Layout name if the Layout name is valid, and check the automatically generated data field name if the Layout name is invalid.
Comment 3 Wang Lei 2012-06-14 06:40:22 UTC
Reviewed.  Patch looks good.
Thanks for the good work.
Applied on SVN revision 1350102
Comment 4 Wang Lei 2012-06-21 02:35:02 UTC
Fixed in revision 1350102
Comment 5 binguo 2012-08-20 09:42:31 UTC
Verified on latest AOO Trunk 0817 build on Window OS/Linux OS/Linux 64bit OS, this bug is fixed. rusults in Cell A10 is correct.
Comment 6 Shenfeng Liu 2012-10-18 07:58:53 UTC
Update Target Milestone to AOO 3.5.0.