Ask Your Question
0

Template and Default Directory

asked 2020-04-26 01:59:54 +0100

Ardee gravatar image

updated 2020-04-26 23:10:25 +0100

My environment: Windows 10, LibreOffice Version: 6.4.2.2 (x64) HSQLDB Version 2.3.2 Split Database

Using a split database my objective is a private individual "mydata" directory containing database templates images and documents that can be moved around copied renamed and stored exchanged on a usb or pc.

EDITED:

I have problems establishing file and directory relationships

The ChDir function does not seem to work. Any explanation or alternative? I seek to preset to the relevant directory for instance for a user fetching an image on an ImageControl.

I also have a problem locating templates. I could only store templatess I made in the preset categories (I chose "my templates") which are stored in the windows pc user files, there is no alternative. I tried to copy, and use the "export template" on the "manage templates" menu , but the templates don't work anywhere else, they only work if I choose those in the pc windows user files presented. When I say templates-dont-work I mean no data is picked up from the database fields.

I did note that I can change templates paths used by LO in Tools Options Paths, I didn't try changing this because it does not solve my problem. Both Template and Database need to be in a same directory in order to find each other. There are more than one database on a same pc.

I'm newbie to writer so maybe I simply don't see or understand the obvious.

Thank you for any help.

edit retag flag offensive close merge delete

Comments

hi Ardee, not sure if this is what you are trying to do but might give you an alternative using LO Base.

double right mouse click on your "Image Button" in Design Mode which will bring up the "Properties: Image Button" then click on the "General" tab and scroll down to "Action" dropdown list, choose "Open document/web page".

next move down to the "URL" & to the right of the dropdown list, single click on the 3 ellipses "..." from here you can select a directory for the location of the images.

uglybug gravatar imageuglybug ( 2020-04-26 07:13:41 +0100 )edit

Hi there @uglybug thank you for your suggestion, yes that works and I can set the url via a macro so that it works for different databases. I'm still stuck on the ImageControl, one adds a photoID another a logo, the user has no idea where these images are located, so need to find a way to set the location.

Ardee gravatar imageArdee ( 2020-04-26 11:26:00 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2020-04-26 17:44:11 +0100

uglybug gravatar image

updated 2020-04-27 16:37:59 +0100

hi Ardee,

i think this is what you are trying to do:

  • in form "Design Mode" double click on your "Image Control".
  • click on the "Data" tab.
  • in the "Data field" dropdown box select the field where the images are stored in your database.

in my pictures database i have the photograph images stored in the database field called PICS.

update:

in your last comment you said:
"I want to preset the directory that opens when they want to insert an image (for instance a photoid).."

Ardee, that is what the above instructions will do for you. this is the instruction line that will "preset the directory" :

in the "Data field" -dropdown box select the field where the images are stored in your database. you can just left double mouse click inside of the current image or for testing you do the same thing on the "Image Control"

you can also single right mouse to 'Insert Image from...' OR 'Remove Image' on either the "Image Control" OR the current image.

i believe in your situation this is completely unnecessary step. "I expected to do the preset with the ChDir function in a macro, but ChDir does not work."

i am not familiar enough with WRITER to help you with you template problem. Because this is a separate issue and another question, you should submit as such. using the TAG feature on this forum for WRITER & TEMPLATE may provide you with a faster response. There is a website - google 'the frugal computer guy" that has video on OL Base & Writer.

try to stay on his site to see the videos sequentially ( ie 103,104....109) because if you get launched into 'you tube' on my system, the next video can be from a totally different source, very frustrating. hope this helps.

please up vote if this helps

edit flag offensive delete link more

Comments

Thanks @uglybug, the imagecontrol I'm talking about is on a database form, to update images in the database. Thank you for your thoughts.

Ardee gravatar imageArdee ( 2020-04-26 18:20:11 +0100 )edit

hi Ardee, i tried to replicate what you have described and i have a image control on the form.

so you trying to use the 'form' as a vehicle to update images in your database; is that correct ?

uglybug gravatar imageuglybug ( 2020-04-26 18:42:22 +0100 )edit

Sorry @uglybug, I seem to have a problem being clear about the issue, I edited to summarise hopefully more concisely what problem I'm trying to overcome. . My problem with ImageControl is on a BASE database form, my users have no idea where images are stored, so I want to preset the directory that opens when they want to insert an image (for instance a photoid).. I expected to do the preset with the ChDir function in a macro, but ChDir does not work.

My problem in WRITER concerns a similar issue, I can't preset where templates are stored, I have several databases on a same pc so want to give each database its own copy of the templates being used..As far as I can understand, I'm stuck with a single location since copies do not work in another location.

Thank you for your support, much appreciated ...(more)

Ardee gravatar imageArdee ( 2020-04-27 01:00:16 +0100 )edit

hi Ardee, sorry for all the questions but i need to have a clear picture so that i don't waste our time chasing rabbits. i think i got it this time. see answer.

uglybug gravatar imageuglybug ( 2020-04-27 15:46:37 +0100 )edit

hi Ardee, sorry for all the questions but i need to have a clear picture so that i don't waste our time chasing rabbits. i think i got it this time. see answer.

uglybug gravatar imageuglybug ( 2020-04-27 15:46:40 +0100 )edit

Thanks @uglybug for your comments. I fear we are not on the same wavelength, I must be doing a poor job of explaining my issue. I'm talking about updating the database with new images, not fetching what's already in the database. So a user who is putting images into the database rightclicks on the ImageControl on the base form which opens a directory browser window, the user needs ro know where to go to find the images, I want to preset the directory where the images can be found. In other words, ensure the default directory that opens is the one where the images are. Am I doing any better at explaining myself? Appreciate your efforts, thank you.

Ardee gravatar imageArdee ( 2020-04-28 00:53:38 +0100 )edit

Hi @uglybug, as a further note, in design mode I discovered you can enter a default directory in the "graphics" tab, then if you use the dropdown box on that tab you get a list of files (viz images if that's what the chosen directory contains). That's cool for setting an image in design mode, but unfortunately has no effect on setting the directory when a user in active mode rightclicks "insert image from" on the form to enter or update an image to a record in the database..

Ardee gravatar imageArdee ( 2020-04-28 01:13:09 +0100 )edit

Thanks @uglybug for "'the frugal computer guy" suggestion, that is indeed a good source, I have already seen several of them. You can go to their tutorial home page to get all the videos here https://thefrugalcomputerguy.com/seriespg.php?ser=15/

Ardee gravatar imageArdee ( 2020-04-28 01:35:07 +0100 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2020-04-26 01:59:54 +0100

Seen: 171 times

Last updated: Apr 27