How to obtain that in a form with all fields related to ...

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

How to obtain that in a form with all fields related to ...

Postby cuoredisardegna@tiscali.i » Mon Apr 19, 2004 10:55 pm

How to obtain that in a form with all fields related to the same table, one part do not change when we make “new record”?


Could someone help me,


I am studying of preparing an invoice form. I am thinking of insert all fields of it in a table named invoice. I should also bring fields from other tables ( clients, items).

The problem is:

1) That the invoice will consist of two parts in the same form.

2) I need that the first part of the invoice ( Date, Invoice Number, client, client address etc.) do not change when i make “new record” for insert in every new row (items, ean_code, price etc).

Is it possible? If yes, how?
I am a beginner, any expert developer could tell me if my thought is right, or if exists any better method in order to preparing an infoice form?

Tanks in advance

Gianni Pinna
cuoredisardegna@tiscali.i
 
Posts: 151
Joined: Sun Feb 29, 2004 10:35 pm
Location: Sassari

Postby automazione » Tue Apr 20, 2004 12:08 am

Hi Gianni, salve

I think the best way is to use 2 tables, one for invoice header and one for the rows of the invoice. You can then put the tables in relation so that when you see a single invoice the related rows of detail are displayed (for example in a portal)

you can then easily add new detail records doing a small method (and calling it with a button). The method can contain the following instructions

fatture_to_rigafattura.addNewRecord();
fatture_to_rigafattura.numerofattura = numerofattura;

where fatture_to_rigafattura is the name of the relation between invoices and rows of the invoice and numerofattura is the invoice number field defined in both tables and used to make the relation.

Hope this can help.. contact me if you think you need more help...

Have also a look to the crm example shipped with Servoy, the orders have the same structure header-details

Ciao
Enrico Arata
Servoy Italia
automazione
 
Posts: 366
Joined: Thu Apr 24, 2003 11:37 am
Location: Torino, Italy

Post subject: How to obtain that in a form with all fields r

Postby cuoredisardegna@tiscali.i » Tue Apr 20, 2004 7:18 am

Hi Enrico, Salve,

tank you for the signs of Your availability - i received with
pleasure your first e-mail- and for your prompt reply. It is precious for me : "A little mistake on beginning becomes great at last".
-I'll work in accord to Your specifications. I like Servoy for many reasons. Besides, now i have two questions of principle. They could be banal for You. The program "Fatture":

1) If server is in Sassari, could it be utilizzable -via internet- from others users in others city?. If yes, coud it be wiewed as server wiews it?

2) Speed. If 1.) yes, could a user in another city, use it speedly or will he meet speed problems?

Tanks in advance
Gianni Pinna.
cuoredisardegna@tiscali.i
 
Posts: 151
Joined: Sun Feb 29, 2004 10:35 pm
Location: Sassari

Postby automazione » Tue Apr 20, 2004 9:08 am

If server is in Sassari, could it be utilizzable -via internet- from others users in others city?. If yes, coud it be wiewed as server wiews it?


ABSOLUTELY YES, your application can be on line in a couple of minutes.... just start the server, check the network settings and your firewall configuration, test it and done.

If yes, coud it be wiewed as server wiews it?


ABSOLUTELY YES, (I think you meant as you see in developer). Local client is faster than developer, the forms display the same. The method and the windows menu will only show the methods and forms you declared to be visible to clients in developer.

2) Speed. If 1.) yes, could a user in another city, use it speedly or will he meet speed problems?


ABSOLUTELY SPEEDLY. Probably you will notice no difference running from remote, the queries are executed in the server and Servoy client uses very very little bandwith. You will only have to wait a couple of minutes the first time you load your new solution BUT this is all it takes to deploy a new application on a client kilometers away from your office and your server :idea: :D 8)

You can test loading (it took me less than 2 minutes with my ADSL) the crm sample application over the internet from servoy (Netherland) :

http://demo.servoy.com:8080

I also made some testing with a db of 800.000 records. Searching by key or by indexed field was 0.x seconds; serching by sub-part of a string (#%nome%) was 2...4 seconds; sorting by not indexed field was less than 20 seconds. I'm using Sybase. I loaded my sybase table from a dBase file with Sybase Central and the loading speed was 100.000 record / minute (with no index defined) or 40.000 record / minute with 4 index defined. (on a XP-PRO Centrino 1.4 laptop).
Enrico Arata
Servoy Italia
automazione
 
Posts: 366
Joined: Thu Apr 24, 2003 11:37 am
Location: Torino, Italy

Postby Westy » Tue Apr 20, 2004 3:10 pm

automazione wrote:loading speed was 100.000 record / minute (with no index defined).


Wow. That's fast. A lot faster than my experience with EMS IB Manager with Firebird. Thanks for pointing that out!
Westy
 
Posts: 852
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Post subject: How to obtain that in a form with all fields r

Postby cuoredisardegna@tiscali.i » Tue Apr 20, 2004 8:55 pm

Hi Enrico, Salve,

tanks for Your reply in wich you, not only give me the responses, but also the reasons of the responses trough experimental data: this is to make science: "Scire per causas".
Your demonstration not only confirms me -beginner-, but also important developer in USA.
Compliments.
Best regards.
Ex Corde
Gianni Pinna
cuoredisardegna@tiscali.i
 
Posts: 151
Joined: Sun Feb 29, 2004 10:35 pm
Location: Sassari

Postby automazione » Tue Apr 20, 2004 11:30 pm

Thank Gianni,

it is nice to introduce people to things you love!! ... and I'm loving Servoy more and more every day.

saluti
Enrico Arata
Servoy Italia
automazione
 
Posts: 366
Joined: Thu Apr 24, 2003 11:37 am
Location: Torino, Italy


Return to Programming with Servoy

Who is online

Users browsing this forum: Bing [Bot] and 12 guests

cron