Issue 102750 - DSUM, DGET and other D* database functions don't work with external references anymore.
Summary: DSUM, DGET and other D* database functions don't work with external reference...
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: OOo 3.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: kla
QA Contact: issues@sc
URL:
Keywords: regression
: 110972 (view as issue list)
Depends on:
Blocks:
 
Reported: 2009-06-13 20:13 UTC by krinn
Modified: 2013-08-07 15:14 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
external file that hold values to test (6.60 KB, text/plain)
2009-06-13 20:14 UTC, krinn
no flags Details
test file that use the other file to important values (7.38 KB, text/plain)
2009-06-13 20:15 UTC, krinn
no flags Details
test files with base import (9.48 KB, text/plain)
2009-06-29 15:54 UTC, krinn
no flags Details
Error in DGET when text is entered near the data range in the remote file (22.00 KB, application/x-compressed)
2010-12-02 18:06 UTC, elysch
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description krinn 2009-06-13 20:13:28 UTC
Upto (at least) v3.0 calc was doing fine, but with 3.0.1 and 3.1 calc is affect
(using gentoo binary).

When trying to BDSOMME('file:///external.ods'#$Feuille1.A1:Z40;"test";A1:A2)
calc now fail to find the base in external.ods and issue an error instead of
finding the values, so BDSOMME fail.

Simple to see, but hard (for me) to explain :/
I could send 2 tests files that show the problem.
Comment 1 krinn 2009-06-13 20:14:38 UTC
Created attachment 62972 [details]
external file that hold values to test
Comment 2 krinn 2009-06-13 20:15:10 UTC
Created attachment 62973 [details]
test file that use the other file to important values
Comment 3 wope 2009-06-13 21:26:06 UTC
Oliver, I'm not sure if the reference used within the formula + cell reference
is correct. Could you please check the integrity. I've been told by Joost to ask
you.
reassigned to you
Comment 4 wope 2009-06-13 21:26:49 UTC
.
Comment 5 jbf.faure 2009-06-14 07:36:40 UTC
Perhaps it is the same root cause as issue 101645 ?
Comment 6 krinn 2009-06-14 09:50:31 UTC
Yes it looks like the issue you mention, but at least, i'm sure of one thing:
the way i use is legit and there's no controversy if i need ("A1") or (A1) ref...

Because the way i create it, i simply hit function, then choose BDSOMME, then
when oocalc ask for ref i open the other file, and select my database, oocalc
put the ref (the file:///blahblah.ods...) itself.

Didn't really look at the doc to see if it's the way i should have done it, but
i suppose oocalc won't (shoudn't) allow me to do something bad itself. Some kind
of "hey don't do that with another file!" error message.

To be clear : it's a major issue for me, because i use an dbase.ods file that
hold datas that are use as database by 4 others .ods
It's an easy way to update the datas without having to change the 4 others .ods
files, once update i just have to spread the dbase.ods and all files are aware
of the changes.

i didn't tried it yet, but i guess that not only BDSOMME could be affect, and
the main reason is shared with the bug you mention about INDIRECT. Something
goes wrong with external files.
Comment 7 jbf.faure 2009-06-14 20:33:50 UTC
If this issue has really the same root cause as issue 101645, then it will fixed
for OOo 3.1.1 because issue 101645 is a release blocker.

Regards.
Comment 8 krinn 2009-06-15 00:40:39 UTC
And thank you !

Someone pointed me out in forum to that issue, so i wish to add it here because
i do think the root problem is also shared with that one (mark the 3 duplicates?)
Anyway that might help you to know it too (at least my issue share the 504error
with that one)
issue: 102388 http://fr.openoffice.org/issues/show_bug.cgi?id=102388
Comment 9 krinn 2009-06-15 00:46:33 UTC
i also need to say that i made a mistake, it work ok with 3.0.1 and 3.0 (i don't
know where i do a mistake when i test it with 3.0.1).
Comment 10 oc 2009-06-15 09:09:10 UTC
This is a duplicate to #i102388#

*** This issue has been marked as a duplicate of 102388 ***
Comment 11 oc 2009-06-15 09:22:36 UTC
closed bvecause duplicate
Comment 12 ooo 2009-06-26 14:10:26 UTC
Reopening because fix would be different from issue 102388 and too invasive for
OOo3.1.1
Comment 13 krinn 2009-06-27 00:35:41 UTC
does the 3.x means that probability of a fix even for 3.2 is low ? :(
Comment 14 ooo 2009-06-29 11:19:54 UTC
@krinn: it means that I don't know who would commit himself to fix it in which
version. So, if someone jumps in and says "yes, I'll do that for OOo3.2" then
we'll probably have a fix for OOo3.2; if not, I'm not sure I could do it in the
time frame for OOo3.2 because already too many things are piling up in front of me.
Comment 15 kyoshida 2009-06-29 15:00:55 UTC
let me grab this for the time being.  I guess no one else is wiling to work on this.
Comment 16 krinn 2009-06-29 15:27:44 UTC
Thank you for your effort kohei, i was thinking (except by lack of time as er)
more persons would like to work on that issue, am i really the only one to think
it's a serious flaw ?
Without querying a tutorial on how to do things, is there another way to achieve
my task without using an external file as i do ? (that could explain why no one
else seems to think it's a big issue)
Comment 17 kyoshida 2009-06-29 15:34:05 UTC
one thing you can try is to fetch the external values into cells first, then
reference those cells from DSUM etc.  That might work as a workaround until this
issue gets fixed.
Comment 18 krinn 2009-06-29 15:54:34 UTC
Created attachment 63270 [details]
test files with base import
Comment 19 kyoshida 2009-06-29 15:55:44 UTC
I feel I'm morally obligated to fix this for 3.2.
Comment 20 krinn 2009-06-29 16:00:56 UTC
it work, i have add dbasetestimport.ods where the datas are import in another sheet.

Also good, if you move the dbasetest.ods away it still refind values where you
update file location in links (as i work under linux and some computers are
using windows, location is always different)

bad thing: the imported values were 24 lines long in the test, i have import
upto 40 lines (as i don't know how long the real database is as size move up and
down depending on update). And the extra lines made the size from dbasetest.ods
jump from 7.4bytes to 9.5bytes. Not an issue with the test file, but proof size
will get real bigger in my real case.

Comment 21 kyoshida 2009-07-15 19:19:23 UTC
COUNTIF falls under the category of "not working with external references", too.
 A fix for that is forthcoming.
Comment 22 ooo 2009-07-15 22:41:20 UTC
@kohei: hold it ;-)  I already fixed SUMIF and COUNTIF for issue 102388 in CWSs
dr68ooo311 and calc51, both not integrated yet.
Comment 23 kyoshida 2009-07-15 23:09:03 UTC
*sigh* I wish I'd known that 3 days ago....
Comment 24 ooo 2009-07-17 12:05:40 UTC
Well, we're both on IRC almost each day, so.. talk to me ;-)
Comment 25 kyoshida 2009-09-09 17:14:54 UTC
Just FYI, fixing this will require a large amount of change in a lot of places.
 I'm working on this ATM in kohei03 cws, for 3.3.
Comment 26 kyoshida 2009-09-16 20:22:29 UTC
Ok.  I'm almost finished.  I modified and tested the following functions: DSUM,
DCOUNT, DCOUNTA, DGET, DMAX, DMIN, DAVERAGE, DPRODUCT, DSTDEV, DSTDEVP, DVAR and
DVARP, all of which rely on the same type of data structure / iterator pair
internally.  Let me do my last minute cleanup before calling it "done".
Comment 27 kyoshida 2009-09-16 21:33:37 UTC
Cleanup is done.  Now I'm officially finished with this.

Fixed in kohei03 cws.
Comment 28 krinn 2009-11-29 11:39:59 UTC
Still doesn't work with Office 3.1.1 OOO310m19 (build: 9420)

That version should have the bug fix ? Because it still doesn't work and you can
still use the 3 files i have upload at first to see that the fix doesn't work.

Now it's getting worst as gentoo push out previous openoffice versions i'm left
with that one that doesn't work
Comment 29 kyoshida 2009-11-29 15:01:00 UTC
It's fixed in 3.3.  Please don't re-open this unless it's broken in 3.3.
Comment 30 kyoshida 2009-12-19 01:55:07 UTC
re-assigning for qa verification.
Comment 31 kla 2010-02-05 14:53:43 UTC
Seen ok in cws kohei03 -> verified
Comment 32 wope 2010-05-01 20:41:06 UTC
ok in DEV300m77
Comment 33 wope 2010-05-01 23:38:45 UTC
*** Issue 110972 has been marked as a duplicate of this issue. ***
Comment 34 elysch 2010-12-02 01:39:39 UTC
Hello all.

I downloaded:
OOo_3.3.0rc7_20101126_Win_x86_install_en-US.exe

And DGET still doesn't work.

I downloaded the first two files, 

a) changed the value of the search criteria: I placed a 9 in A2

b) Added the next formula:

=DGET('file:///C:/temp/basetest.ods'#$Feuille1.F2:G25;'Test';A1:A2)

I get:
Err:504

Instead of a 45

The DSUM formula works fine as long as I could see.

Ely.
Comment 35 ooo 2010-12-02 09:51:03 UTC
@elysch:
1. For text values you need to use double quotes instead of single quotes
   => "Test" instead of 'Test'.
2. Then the expression returns Err502 because there is more than one entry
   with Month==2. DGET needs unique entries.
Comment 36 elysch 2010-12-02 18:06:09 UTC
Created attachment 75224 [details]
Error in DGET when text is entered near the data range in the remote file
Comment 37 elysch 2010-12-02 18:06:26 UTC
@er

> 1. For text values you need to use double quotes instead of single quotes
>    => "Test" instead of 'Test'.

YEESSSSS... That did the trick in that example.

> 2. Then the expression returns Err502 because there is more than one entry
>    with Month==2. DGET needs unique entries.

Yes, that's why I changed the value to 9.


There is still a problem though. I've been trying to find out the reason for a
few hours by now, without luck.

I have some calc files since before v3.0.1. This particular file still has a
problem with dget formula, and I can't figure it out why.

I'm attaching tree files: DATA-TEST.ods, DATA2-TEST.ods and TEST.ods (in a zip)

The only difference between the first two is cell A3. It has some random text in
DATA2-TEST.ods

If you see the formulas in TEST.ods the formula with reference to DATA2-TEST.ods
returns "Err:504" (Cell C10).

If you simply delete that random text, save the file and reload the TEST.ods
file, the error goes away.

In the other hand, if you add any text anywhere in the range A3:A13 in any one
of the two "DATA" files, then save it and reload the TEST.ods file, the error
appears.

Any ideas about what is going on?

Ely.
Comment 38 elysch 2010-12-02 18:16:33 UTC
wierd... I added text in A30 cell of DATA2-TEST.ods file and removed any other
text in that column. 

DGET Formula still shows "Err:504" in TEST.ods.
Comment 39 elysch 2010-12-02 18:36:00 UTC
I've found a new thing.

The error I mentioned before appears also with the first two attachments of this
issue, using the DSUM formula.

To reproduce, add any random text in any one cell to the left of the remote
(basetest.ods) "database" area, after the titles row (from row 3 on). The DSUM
formula returns "Err:504" too, when you reload bdsommetest.ods.

I even added the random text in A1048576  (The las row) and got the same error

Comment 40 ooo 2010-12-03 11:31:49 UTC
@elysch: please submit a new issue for that problem.