How Can I Create a Distance Chart from my DB

Discuss the database features

How Can I Create a Distance Chart from my DB

Postby Dzynr » Thu Jul 15, 2010 1:52 pm

I guess first off I should tell you "I'm not a programmer". My boss has asked me to create an interface or window where I can type in the name of a city, and have the distance (from Toronto, Canada) appear in some sort of box. I have all of the city names and all of the distances as a file on my computer. We are a courier company and at the moment we have loose-leaf bynders with 40 pages of city names and their distances, but he would rather have the info available on our computers for ease of use and faster look-ups. I just need to know if I create a chart or a data base or a query etc.
Any help would be greatly appreciated!! :crazy:
OpenOffice.org 3.0 Windows XP
Dzynr
 
Posts: 5
Joined: Thu Jul 15, 2010 1:37 pm

Additional Info for Create a Distance Chart

Postby Dzynr » Thu Jul 15, 2010 4:12 pm

I think I'm confusing people with a wordy explanation for a Distance Chart. All I need is to know how to create a window where I can type in one field and have an amount appear in a field beside it. I have all the info on my computer but need a head start as to what app within OOo to use.
My final outcome will be to type in a city name on the left side and have the distance (from Toronto) appear in a field on the right side. I have all the city names and distances on my pc.

Thanks again for any help.

Dzynr
OpenOffice.org 3.0 Windows XP
Dzynr
 
Posts: 5
Joined: Thu Jul 15, 2010 1:37 pm

Re: How Can I Create a Distance Chart from my DB

Postby acknak » Thu Jul 15, 2010 4:35 pm

I have merged your topics. Better to keep questions on the same topic together.
AOO 4 • Linux • Fedora 17
User avatar
acknak
Moderator
 
Posts: 17422
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How Can I Create a Distance Chart from my DB

Postby RPG » Thu Jul 15, 2010 5:46 pm

Hello

You did not describe how the data is stored in your database?

Romke
openSuse version of LibreOffice 4.1.5.3 stable on openSUSE 12.2
RPG
Volunteer
 
Posts: 1548
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: How Can I Create a Distance Chart from my DB

Postby Dzynr » Thu Jul 15, 2010 6:12 pm

Hi RPG ...

At the moment I am merely imputting city names in one column and the distances in a second column and assigning an ID to each row. I have just begun this process and will make any changes necessary for this project to happen.
Thanks for your reply.
OpenOffice.org 3.0 Windows XP
Dzynr
 
Posts: 5
Joined: Thu Jul 15, 2010 1:37 pm

Re: How Can I Create a Distance Chart from my DB

Postby RPG » Thu Jul 15, 2010 7:41 pm

Hello

I understand it as
you make a list
ID , Placename,Placename,Distance

Then you have only to search for that two place names

Use the Basetools of Benitez
See here for an example.

An other idea more base on forms and SQL is select first one place name in a form then the second place name and in a lower subform display the result.
viewtopic.php?f=13&t=27556

In both case it is good first to check if you can find the good result with that method. I think do that also before you input all data.

Romke
openSuse version of LibreOffice 4.1.5.3 stable on openSUSE 12.2
RPG
Volunteer
 
Posts: 1548
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: How Can I Create a Distance Chart from my DB

Postby Dzynr » Fri Jul 16, 2010 1:31 pm

Thanks for the reply Romke. I don't fully understand and guess I will have to do more research before I can tackle this project. I need to be walked through this using baby steps. I think I need to utilize the "forms" part of Base but really don't know where to start.

Thanks again ... but this is too advanced for me.

Christine
OpenOffice.org 3.0 Windows XP
Dzynr
 
Posts: 5
Joined: Thu Jul 15, 2010 1:37 pm

Re: How Can I Create a Distance Chart from my DB

Postby RoryOF » Fri Jul 16, 2010 1:56 pm

Any geographical route finder that covers the area will do this, such as MS Autoroute. Why reinvent the wheel?
Apache OpenOffice 4.0.1 on Xubuntu 14.04 and Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 14376
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: How Can I Create a Distance Chart from my DB

Postby Dzynr » Fri Jul 16, 2010 7:18 pm

Hi Rory

You are right ... there are many. I use Google maps when necessary but our initial start point is from our office to destinations around the province. The km count stems from us (in Markham) and not from downtown Toronto as the route finders dictate. We have all of the mileages for quoting purposes, any deviation from that list will give n inaccurate quote.
But I do appreciate your input

Christine
OpenOffice.org 3.0 Windows XP
Dzynr
 
Posts: 5
Joined: Thu Jul 15, 2010 1:37 pm

Re: How Can I Create a Distance Chart from my DB

Postby Arineckaig » Sat Jul 17, 2010 4:17 pm

At the moment I am merely imputting city names in one column and the distances in a second column and assigning an ID to each row.

Please forgive me if I fail to pitch my reply at the most helpful level. You mention 40 pages of data most of which I guess you have yet to input. Few things are more depressing than typing all that data into an OpenOffice Base table, and then losing the lot which is an all too common experience before you have gained experience with the idiosyncrasies of Base which is the least mature element of the OpenOffice applications.

When I started I found it much safer to enter database data initially into an OpenOffice Calc spreadsheet. Admittedly I was more accustomed to using spreadsheets, but a Calc spreadsheet can be regularly saved as you enter the data and easily backed up.

The great strength of OpenOffice is that its constituent parts work well together. Provided no cells are left empty in your three columns of the spreadsheet, it will be easy to access this data from Base: you can link/register the spreadsheet as the data source for Base forms, queries or reports. There is one proviso: you can read but cannot change the spreadsheet data from within Base. Until you are more familiar with Base that is no bad thing: it keeps the data safe. You can still change or add to the data, but you have to do it in the spreadsheet itself but only when the linked Base is not open and the changes will not be reflected in Base until the Calc spreadsheet has been closed.

If you have already entered a lot of data into a Base table, do not worry. It is easy to copy that data from the Base table into Calc. Open a new Calc file and press f4. If the database file has been registered it will appear in the so-called beamer above the empty sheet. In the left hand box of the beamer select the Base file name and the table name from the list of tables: a copy of the Base table will appear in the right hand box.

Click on the top left gray cell and while all the data is selected drag that gray cell down into the A1 cell of the spreadsheet. Alternately while all the data is selected in the right hand box, right click on the top left gray cell, select copy, move the cursor to the A1 cell and paste. Once the sheet is filled, press f4 to close the beamer and save the Calc file.

In due course enter all 40 pages of data into the spreadsheet. As all the data is quickly visible in the spreadsheet it is easy to spot and correct errors. By typing Ctrl+f you can enter part or all of a City Name and find the mileage quickly. If you sort the data in the spreadsheet by the the City Names you can even search visually. This is a primitive but effective way of meeting your aim.

To link the spreadsheet to Base. You should first check that all the data in the spreadsheet (other than the titles in the top row) are correctly formatted according to the respective columns: text for City Names and Numeric for distances. Open a new Base file. In the opening screen select the lowest radio button against "Connect to an existing database file". In the drop down box just below select "Spreadsheet" and click Next. In the next screen browse to and select your Calc file containing the data and click Next. In the next screen leave the radio button "Yes, register the database for me" selected and "Open the database for editing" checked. Click Finish and save the file with a suitable name. Hopefully the table in the new Base file will match the spreadsheet and will reflect changes or additions after they have been made to the spreadsheet that is subsequently saved.

I suggest that before attempting to create a form in Base to display distance whenever a City Name is typed, you download "Getting Started with Base" to be found at http://wiki.services.openoffice.org/w/images/8/8a/0108GS3-GettingStartedWithBase.pdf

Again my apologies if this long post tells you nothing that you did not know already and nothing new that you wanted to know. Please come back and I will try to be more helpful when explaining how to set up a form in Base to meet you specific requirement.
When this issue has been resolved, it would help other users of the forum if you add the word - [Solved] - to the Subject line of your 1st post (edit button top right).
OOo 3.4.1 on MS Windows XP MySQL and HSQLDB
Arineckaig
Volunteer
 
Posts: 600
Joined: Fri Nov 30, 2007 10:58 am
Location: Scotland


Return to Base

Who is online

Users browsing this forum: No registered users and 4 guests