1 (edited by AD1408 2016-08-19 12:38:01)

Topic: Project for all

I have started an basic accounting project for small business after reading somewhere here something like "it's possible to create a full accounting software without coding with MVD" as I don't know anything about coding. However, I discovered later on that I still need to learn certain aspects of database and components used.


For instance, lately I stuck with foreign key... Thanks to JB I understood how to use it. While there is a basic help document and Vid tutorials, they are not enough for those like me without any programming experience. Every aspects needs to be explained in details (in a walk-through fashion) step by step with plenty screen caps. Unfortunately, creating such detailed help document is quite time consuming task. Perhaps, one brave soul with programming background could undertake this task. We don't want to ask to Dmitry to spend time on it as we'd want him to improve MVDB as it needs few components to be implemented.


One work around (learning to use MVD for non programmers could be working on a shared project with the help of knowledgeable members. For this purposes I share my project with a generic name business 101. I have mainly done some forms etc starting with customers, products and sales. I can do missing forms and logic of the application if there are enough interest. If we can complete it then perhaps Dmitry can check it up and correct errors and shortcomings to have fully functional small accounting program made with MVD. I would suggest, Dmitry could sell fully finished application if he wishes to. I would be the first customer to buy it, as long as priced reasonably.

Post's attachments

Attachment icon Business 101.zip 639.27 kb, 587 downloads since 2016-08-19 

Adam
God... please help me become the person my dog thinks I am.

Re: Project for all

Hello AD1408

Good idea to use different skills to a single project with MVD.

I recently coded an application in the same spirit for my son.
A program manager orders for a catering company (customers, suppliers, supplies, stock management ...)

"it's possible to create a full accounting software without coding with MVD" is going a little fast because this project will require a lot of complex coding in loops, passwords, optimizing tables.

A minimum knowledge of the Pascal language nevertheless somewhat necessary.

But given the large number of examples in the forum and the generous intervention of Dmitry, there is no reason to get a complex project that works perfectly ..

Idea forward using all the same version of MVD (2.7 beta for me)

JB

Re: Project for all

Hi JB,


This project definitely needs your participation imho.


Is MVD 2.7 beta project compatible with MVD 2.6?


ps/. I have organized bit better and updated lookups form as on images below. If and when needed I can save it as a single form project and upload here

http://prnt.sc/c7vhpl
http://prnt.sc/c7vi67

Adam
God... please help me become the person my dog thinks I am.

Re: Project for all

AD1408
Hello,


Thank you for the project.
In the moment I start to write book for non programmers, how to create database structure and applications using MVD.
Currently the book translated to English (many to Yann Yvinec), I need just change screenshots in the book and then will put it in the forum.

Dmitry.

Re: Project for all

Hi Dmitry,


Excellent news.  Looking forward to it.

Adam
God... please help me become the person my dog thinks I am.

Re: Project for all

I have tried to reduce many forms in design level as we don't have a treeview in MVD yet.



Could somebody answer  please, is it possible to have functional form as detailed on the image below?


http://prnt.sc/ca29uv

Adam
God... please help me become the person my dog thinks I am.

Re: Project for all

AD1408 wrote:

I have tried to reduce many forms in design level as we don't have a treeview in MVD yet.



Could somebody answer  please, is it possible to have functional form as detailed on the image below?


http://prnt.sc/ca29uv

Unfortunately I can't understand what you need. But you can do anything using script.

Dmitry.

Re: Project for all

Hello AD1408,
Apologies if I'm misunderstanding your question, but maybe the method I use for look-ups will be of interest to you.
I do all my lookups with a single table (to hold my look-up keys and values) and a single form that I use both to display and maintain the look-ups;  it has saved me so much time.
It's probably easier to attach a sample project to show you (in this example, I have 9 'look-ups' all created and maintained using just one form). 
The things to look out for particularly are:
1.  the multiple relationships created in the data structure pointing to the attributes table
2.  the calculated fields to show a text value rather than a record-id
3.  the use of the combobox filter property (so it shows just the rows that match your key)
As you can see from the attachment, all this is achieved using standard MVD and no script.  Also, if your project changes and you need to add new look-ups, the structure is already in place so you are future-proofed.
Depending on your project or number of users, you might want to password protect access to the look-ups maintenance but that is easy enough.
Hope this helps or at least gives you some ideas.  Please get back to me if you have any questions.
Derek.

Post's attachments

Attachment icon ad1408.zip 790.71 kb, 604 downloads since 2016-08-25 

9 (edited by AD1408 2016-08-26 06:51:26)

Re: Project for all

Hi Derek,


Thanks for the sample project and your kind explanation.


In my case, I have too many lookup items to put in one list may not be a user friendly. Hopefully I'll get some help from others.


However, your suggestion is very valuable for me. I like it. I'm sure it'll come handy with other projects. Very interesting approach. Could I possibly ask you to explain how you did it step by step in details please.


Thanks again.

Adam
God... please help me become the person my dog thinks I am.

Re: Project for all

Hi AD1408,
A simple demo is attached for you.  For example, I want to create a project with information about people. 
It has 3 lookups (but obviously it can be many more) for 1.eye colour, 2. height and 3. zodiac sign.
Using my attached project, these are the stages you must follow;

screenshot1.jpg
1.  create a table ('people')
2.  create a table ('lookups') with 2 fields ('lookupkey' and 'lookupvalue').
3.  create 3 relationships from the 'lookups' table to the 'people' table (1 relationship for each lookup) .
4.  create 3 calculated fields to retrieve the 'lookupvalue' field (1 calculated field for each lookupvalue).

5.  create your forms (form3 and form4 are for the lookups - you will only ever need these 2 forms even if you add 100 more lookups!).

screenshot2.jpg
6.  set the foreignkey and fieldname properties of each combobox and add the filter property

screenshot3.jpg
7.  add data to your 'lookups' table

screenshot4.jpg
8.  when adding data to the 'people' table, your comboboxes should retrieve the correct lookupvalues.

Usually, this would require 4 tables and 6 forms;  this way, it requires only 2 tables and 4 forms.

I am not sure what you mean when you write "I have too many lookup items to put in one list....".  Remember than when you add the filter to the combobox property, you are, in effect, creating sub-lists that would contain the same number of rows as doing it the usual way.

Hope this helps,

Derek.

Post's attachments

Attachment icon ad1408demo.zip 691.65 kb, 552 downloads since 2016-08-26 

Re: Project for all

Hi Derek,


Thank you very much for taking time to explain your approach. It's very kind of you.


I'll certainly study and try to implement it.

Adam
God... please help me become the person my dog thinks I am.

12 (edited by AD1408 2016-08-31 11:18:32)

Re: Project for all

I have reduced the scope of 101 business project to bare minimum but I cannot get it working fully. It needs some scripts in certain areas and I don't know the coding. Learning pascal from zero would take some time for me. I cannot allocate enough time to do it. This project was an attempt to do very basic accounting for my tiny business. It's not a commercial one.


I thought If I do the forms, db tables, and settings (as much as I could do) other knowledgeable members may fill the missing bits. Then it'd have been used by other members also according to their needs. Perhaps I was bit naive to suggest to do a work for free. However, I come across couple of kind members such as JB and Derek in this community offered their help freely.


So guys, is there anybody can complete my project? I'm willing to pay for their help. Please contact me. My forum email is valid one.


I have sent couple of emails to Dmitry at support to do this project for a fee but to date I got no reply. Perhaps he didn't receive them?

Adam
God... please help me become the person my dog thinks I am.

13 (edited by AD1408 2016-09-02 12:21:44)

Re: Project for all

Latest "Business 101" project attached. That's what I could do so far.


Tasks I couldn't do in general:


1. Calculated fields
2. Settings of certain buttons
3. Ability to add data items on same form. i.e. adding invoice items on invoice forms. Same could apply to lookups form. Rather than creating many lookup items add forms it could nice to add them on same lookup forms. Derek, I couldn't get my head around to apply your method in here. Perhaps you can have a go at it.
4. Adding "Help" (linking help document in project file folder) and "About" menu items under main help menu.
5. I pasted codes to Script page but couldn't get splash and own about windows showing.
6. I'm sure there are some other things.


I come to conclusion that I cannot complete this project myself.  Any suggestions?

Post's attachments

Attachment icon Business 101 Work 4.zip 644.56 kb, 540 downloads since 2016-09-02 

Adam
God... please help me become the person my dog thinks I am.

Re: Project for all

Hello AD1048

I'm looking at your projet

1 - Calculated Fields : please look at the attachment; This example is perfect. All you have to do is to declare a fieldname of type calculated in which you detail you calcul. Nothing's easier.

2. Settings of certain buttons : All is behind property Actions. All possibilities are met.What do you say by 'setting certain buttons' ?.

3 - 4 and 5 : I am working on it.

JB

Post's attachments

Attachment icon Calulate field.zip 2.84 kb, 505 downloads since 2016-09-02 

Re: Project for all

Hi JB,


Thanks a lot for the sample totals project... Simple calc fields are OK. I meant complicated ones. Those ones on customers and products transaction history tabs + on search form (form1)


I have couple of questions within this sample project:


1. How do I calculate totals of a table grid. Assume, form1 table grid used for invoice and it contains invoice items. How do I add qty and total columns numbers and display them in fields below the Tgrid?
Please see the same attached sample project with said fields added.


2. How do we get numbers aligned to right on Tgrid display?

Post's attachments

Attachment icon Totals.zip 332.95 kb, 514 downloads since 2016-09-03 

Adam
God... please help me become the person my dog thinks I am.

Re: Project for all

Hello AD1408

For Answer 2 - to align on the right


procedure Form1_TableGrid1_OnChange (Sender: string);
begin
     Form1.TableGrid1.Columns[0].Alignment := taRightJustify; // first column
     Form1.TableGrid1.Columns[1].Alignment := taCenter;
     Form1.TableGrid1.Columns[2].Alignment := taLeftJustify;
end;

JB

Re: Project for all

Hello Again AD1408, Jean,

With regard to your question (1. How do I calculate totals of a table grid?), please find attached the script you need.
However, unless you have a specific reason for using edit fields for your grid totals,  it is probably more efficient and certainly easier just to use the grid totalling options that you get with standard MVD.  The attached screenshot shows you where to find them and how to do it.

If I have some time, I will try and re-work a bit of your project to show you the approach to lookups with just one table that I use.  I can also include the way I create a 'help file' and a simple 'menu structure' that I often use, if that would be of any interest to you.

Derek.

Post's attachments

Attachment icon Totals ad1408.zip 446.1 kb, 552 downloads since 2016-09-03 

Re: Project for all

Hi Derek,


Great stuff. Thanks a lot....................


Having totals in a field for invoice purposes, from totals field I can add tax, gross, discounts etc fields and calculate final balance.
Grid totaling also is very useful on different circumstances. Thanks for this too. However, screen cap about grid totaling seems didn't come through, unless I'm getting blind or something.


"If I have some time, I will try and re-work a bit of your project to show you the approach to lookups with just one table that I use.  I can also include the way I create a 'help file' and a simple 'menu structure' that I often use, if that would be of any interest to you."
BIG YES PLEASE!

Adam
God... please help me become the person my dog thinks I am.

Re: Project for all

Hi AD1408,
The screen capture about grid totalling should have been part of the attachment in the previous post (totals in tablegrid.jpg).   Here it is again, just in case.
Derek.

Post's attachments

Attachment icon totals in tablegrid.jpg 143.53 kb, 244 downloads since 2016-09-04 

Re: Project for all

Hi Derek and JB,


Thanks Derek. You were right, screen cap was in the project folder. I was looking for screen cap in the post, didn't notice it in project folder as I was so excited to see the totals working. My apologies....


JB,
Thanks for tgrid columns script  below:

procedure Form1_TableGrid1_OnChange (Sender: string);
begin
     Form1.TableGrid1.Columns[0].Alignment := taRightJustify; // first column
     Form1.TableGrid1.Columns[1].Alignment := taCenter; 
     Form1.TableGrid1.Columns[2].Alignment := taLeftJustify; 
end;

It produce and error. I added
begin
end.
at the end but it didn't make any difference. Perhaps you could add tgrid column data alignment code to Derek's totals project (which totals  are working nicely)

Adam
God... please help me become the person my dog thinks I am.

Re: Project for all

Hi AD1408,
1.  Attached is your project to which I have added a lookups table and form.  Now on the lookups for customer title, customer group, customer status, customer bleeper etc, you should see how this is working all off only one table.  Please note that I have not changed any of your existing table structure as there is too much in there and I would just be introducing errors in making such large changes.  Maybe now you can see how it works and how it can be quicker and easier to create (for your project, 1 table instead of 26 and just 1 form instead of 26 (or using many page controls).
2.  In order to give you an idea of menus, one simple way was to change the 'style' of the page controls that you use from 'tab' to 'menu' (it is an object property of the page control).  I have then added some extra buttons to call other forms;  so you have a mixture of page control and button but it all looks the same.  But there are quite a few ways of setting out menus - it really is which works best for your project.
3.  I have added what I think is the easiest way to create a help file.  Click on the User Guide/Help button and you will see that it is simply one very big label in which you can add all the help information that you need).  Again, there are lots of different ways, but this is, I think, very simple.
Derek.

Post's attachments

Attachment icon Business 101 AD1408.zip 482.82 kb, 647 downloads since 2016-09-04 

Re: Project for all

Thanks a lot Derek.... Appreciated very much.

Adam
God... please help me become the person my dog thinks I am.

Re: Project for all

Hi Derek,


You have shown new ways, which were not obvious for me. Once again thanks a lot for your kind help.....


I like the idea of removing app menu bar in certain circumstances. How do you do it?


I also noticed you removed resize and minimize buttons from win title bar. Again how do you manage it,  take them out etc. For instance can I keep minimize and close buttons only?

Adam
God... please help me become the person my dog thinks I am.

Re: Project for all

Hello AD1408

To remove menu bar :

begin
     Form1.mniFile.Visible := False;
     Form1.mniOptions.Visible := False;
     Form1.mniAbout.Visible := False;
end.

(To place between Begin et End at the end of scriptscript - whereEnd is End. - dont forget the dot)

To keep only some buttons on top of the form, you have to play with property BorderIcon
(I let you discover all subtilities of those properties).

JB

Re: Project for all

Hi JB,


Thanks a lot.............

Adam
God... please help me become the person my dog thinks I am.