Re: subform (again)

Franco Fornari <[email protected]>
Newsgroups gmane.comp.openoffice.dba.user
Message-ID <[email protected]>
Hi Frank,

well, now I found the conditions when the subform cannot work:

   1. the selected record in main form has to have no records in subform
   2. in order to see the error, you have to select a (whatever) record
      in main form by the navigation bar or just entered a new one
   3. the selected record in main form HAVE NOT to be the very first one
      appearing when opening the form, because in this case all work

As you can see in my db sample, the first difference you can observe 
between records in main form that have or have not entries in subform, 
is when you set the focus inside a subform field. If there are previous 
records (at least one), all default values turn immediately visible and 
you can both modify them and fill in the remaining empty fields. All 
works as expected and a new record is added.
But, if the record in main form has no previous entries, when you set 
focus inside a subform field, it happen that:

   1. no default values turn visible
   2. if you try to manually fill in a field settled with a default
      value, your typing disappear when the field looses focus
   3. a numeric (or currency) field without default value is
      automatically filled in with 0 when receiving focus

At the end of the story, you cannot add a first new record, getting an 
error that warns you that one (or more) field(s) have to be filled in. 
It seems that it happens because the presence of default values, no 
matter if there are calculated fields or not.

In my db sample I built two forms. They are identical, but that one with 
default values works only if there are previous entries in subform, 
whilst the second one works fine under any conditions.

Hope I made me clear, thanks in advance
Franco

Frank Schoenheit, Sun Microsystems Germany ha scritto:
> Hi Franco,
>
>   
>> As for the subform grid, with this set up it works. "Num Doc" field is 
>> an Auto-Increment one and it works fine. There are several records 
>> already registered for many people, but others haven't any.
>> Fill up "Tipo Doc" with "PAE" or "PAI", "Data Reg" with a date, 
>> "Parcella" with an amount.  Now, if you try to insert an integer (0 to 
>> 20, i.e.) into "AliqIVA" you will be able to add a new record, but if 
>> you set that field from 0 to 20 as default, you'll get an error.
>>     
>
> Strange enough, I cannot reproduce this. I opened the form in edit mode,
> entered a default value for the "AliqIVA" column (0 or 20 or 13 or ...),
> left design mode, moved the main form to a record where the sub form
> contained no entries, and added a new sub form entry as you described.
> No matter whether I left the default value alone, or overwrote it - it
> worked like a charm.
>
>   
>> Moreover, if you try to add a calculated field as column in the subform 
>> grid, i.e. "Parcella" * "AliqIVA" / 100, you'll get another error.
>>     
>
> Now known as http://www.openoffice.org/issues/show_bug.cgi?id=104686.
> workaround: Set the "Input Required" property for this column to "No".
>
>   
>>    1. In a report, I need to group data by quarter (date), but it
>>       doesn't work.
>>     
>
> http://www.openoffice.org/issues/show_bug.cgi?id=104712
>
>   
>>    2. Drag and drop fields between report sections is really a pain.
>>       Fields disappear or seem to go random. Mouse position is
>>       absolutely not reliable. Same thing if you try to resize a field
>>       or a fixed line.
>>     
>
> Hmm, cannot reproduce. That's a difficult one, it might depend on screen
> resolution and the like, which might are likely to be different on our
> machines :(
>
>   
>>    3. Labels have vertical alignement, too, but it really doesn't work.
>>       If you set it to "center", i.e., when reopening report, vertical
>>       alignement is settled to "standard" again.
>>     
>
> Sounds like issue 99058. At least, I just tried in CWS dba32f, and there
> the "middle" setting for the vertical alignment is persistent.
>
> Ciao
> Frank
>
>   
> ------------------------------------------------------------------------
>
>
> Nessun virus nel messaggio in arrivo.
> Controllato da AVG - www.avg.com 
> Versione: 8.5.409 / Database dei virus: 270.13.75/2340 -  Data di rilascio: 09/01/09 20:03:00
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
db_ sample_Franco.odb (application/vnd.sun.xml.base, 104.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.