Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Peter,

I make a niumber of regular monthly contributions to various 
organisations.  Is there any way I can automatically enter them all
at the beginning of the financial year. Our financial year runs for
1st July to 30th June.

Two different ways:

1. You have two different forms, mainform and subform. In mainform the
first contribution must be marked. All fields of the mainform and the
subform are the same. But the automatic value for the primary-key and
the date for the contribution have to differ. So link the mainform to
the subform for all fields except the primarykey and the date. Now you
could set a new date for any new row in the subform. Works without
makros, but you have to do this 11 times for a whole year.

2. You have to read the content of the mainform by makro:

SUB PeriodicalContribution
DIM aYear()
oFormStart = thisComponent.Drawpage.Forms.getByName("mainform")
oFormZiel = thisComponent.Drawpage.Forms.getByName("subform")
st1 = oFormStart.getString(1)
st2 = oFormStart.getString(2)
...
aYear = array("08/17","09/17","10/17","11/17" ...)
FOR i = LBound(aYear()) TO UBound(aYear())
oFormZiel.moveToInsertRow()
oFormZiel.updateString(1,st1)
oFormZiel.updateString(2,st2)
...
oFormZiel.insertRow()
NEXT
END SUB

There must be an array for a loop. Could be you find a better way to
create it as created above (could read the year from the mainform and
create the parts of the array by this).

Regards

Robert
- -- 
Homepage: http://robert.familiegrosskopf.de
LibreOffice Community: http://robert.familiegrosskopf.de/map_3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJYY3/pAAoJELDKYwaoS9AIJ/oP/3H3l8J0Mg7rBMsVNscYS6hT
nUGK72N4ppDFZ93+b35aEf5i9fpxE4ebELkrrLHQKJIxNjd5GNJCEsBB+2eb9yi6
ELtFkZRKQPDX8I/sWMhpiK6wAcRm/xEgbTHoJ+VvLIDhcrj7FffykbfvymFkesI/
smeqqNrVDcT8RsUrfJV0GJfsUdgAkUwhjujhhUuA5PpYamxef7TuCXpBEWTWsW0a
7Ydhv5beaaE6nxGVcUyh3XvwR77uir4Y6eoM77oiOiZFk+kSnSQ9ZYbbGQq7bSlc
A9BTm9E5kOsOoPa2svRU5zdSaKC8P6TfondiXRQUHeVFEe6wgDg01yTPG9fBm/WR
Gws3/e9SGzGlUe4rjxZuiUA8O9mqHvBHcdRB8eOWyL2hI6RVVbO5YpnvnFapPfeM
hQw6map2LI5Pxx+DkVjoB0KjPrVMJU0Yt3UdeHWhQyk4pLg7Zuuu4RbaOyaft29M
ATeJlaF7zmGZ16ed3AJPYnoLtoYXu+CVCTC9+3HSUyJYejVXC++ByAWO1vJKrm3C
k/L3AkhNtmMyAEnHWOpBUan0fLyfH7Wja83Vau5pVMJ9d3zdzxDzokb5DPVPOsjl
sSdHGYZ/yNYZRELSZu42Kz4fvNPrXmrB8Z64/By7LD7XwLEhkfjSe7MDqDr+p3zc
dzQ6pjpYgoXXNFMSD3+p
=ybe5
-----END PGP SIGNATURE-----

-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.