Salut Destiny,
Can you attach your project?
Derek.
51 2025-03-01 11:16:26
Re: Hide a form (4 replies, posted in General)
52 2025-02-24 10:12:53
Re: PRODUCTION ORDERS (2 replies, posted in General)
Uploading your project is also very helpful in trying to understand your requirement (delete the '.exe' file and then zip the project folder).
Derek.
53 2025-02-20 23:28:21
Re: treeview moving parent (22 replies, posted in General)
Hey Sparrow,
No permission needed - it's good when we can all exchange ideas on the Forum and make suggestions to each others' projects. Everyone wins.
I really like the ''scrolltree'' procedure that you've added - I was looking at the problem but didn't manage to find a fix.
Thanks for your interest and input.
Derek.
54 2025-02-19 12:15:35
Re: treeview moving parent (22 replies, posted in General)
Hi Sparrow,
Yes, I see the problem now.
I'll have a look later on and see if it can be fixed.
Thanks,
Derek.
55 2025-02-19 11:33:48
Re: treeview moving parent (22 replies, posted in General)
Hi Sparrow, Jean,
I had the same problem but thought that I'd fixed it in the script (Line24 - "if (form1.edit3.value <> form1.edit1.value)" to stop the ParentID being set to the ID and the node disappearing).
Any chance you can give me a 'step by step' example of the problem you've found as I can't re-create it and then I can try to correct it.
Thanks for your help,
Derek.
56 2025-02-18 23:47:48
Re: treeview moving parent (22 replies, posted in General)
Hi Igor, Sparrow,
Attached is an example of a ''treeview'' with functionality to move nodes (including children) by drag and drop (click and hold down the mouse on the node you want to move, drag it to its new position and then release the mouse).
I think Jean and Adam use ''treeviews'' quite a lot so maybe they (and others) will find this useful.
Derek.
57 2025-02-17 23:59:13
Re: treeview moving parent (22 replies, posted in General)
Hi Sparrow,
I've always thought that being unable to move rows (and their children) from one node to another was a big weakness but this code has improved the functionality of 'treeview' considerably.
Thanks for sharing,
Derek.
58 2025-02-16 12:35:31
Re: Переименование файла при загрузке или создание для него подпапки (5 replies, posted in Russian)
Привет SNKip, Sparrow,
В приложении приведен пример, где вы создаете новую подпапку для каждой фотографии (имя подпапки — это идентификатор записи).
Возможно, это поможет.
Derek
.
Attached is an example where you create a new sub-folder for every photo (the name of the sub-folder is the ID of the record).
59 2025-02-15 12:42:43
Re: lifetime licence? (1 replies, posted in General)
Hello Igor,
It is correct that MVD is no longer being actively developed (however, support for the product continues through volunteers on this Forum).
As such, purchasing a ''lifetime'' license has no advantage over purchasing the ''free minor updates'' license.
Note that if you purchase a license via the Russian language version of the MVD website, it is shown at a discounted price (https://myvisualdatabase.com/ru/purchase.html),
Regards,
Derek.
60 2025-02-11 00:35:17
Re: Is MVD good for me and my needs ? (2 replies, posted in FAQ)
Hi,
It's all subjective but personally, I think MVD is one of the simpler and yet still powerful programs for writing and distributing your own applications.
However, no matter which product you choose, all of them require a basic understanding of database design and what a relational database is. What it is NOT is a spreadsheet yet all too often we see database design that tries to replicate a flat file structure and unsurprisingly fails.
From the outline of your requirement, it is something that can be done using MVD but I would advise against 'trying to run before you can walk'. Too many people try to 'climb Mount Everest' with their very first project, get understandably disillusioned when they encounter problems and then give up.
Also be prepared to change the way you currently operate so that you can take full advantage of how MVD (or any other product) works.
Regards,
Derek.
61 2025-02-07 10:48:53
Re: Скрипт для установки значения по умолчанию. что с ним не так? (7 replies, posted in Russian)
Привет Oleg,
Пара вещей.
1. Если вы используете событие 'Form1_OnShow', оно запустит вашу процедуру только один раз при первом запуске вашей программы. В этом случае лучше использовать событие Form1_TableGrid1_OnChange, чтобы процедура запускалась каждый раз при изменении содержимого вашей 'tablegrid'.
2. Если проверяемое вами значение ('На складе') всегда находится в одном и том же столбце, сделайте это, как в примере 1 во вложении.
3. Если проверяемое вами значение ('На складе') находится в разных столбцах, сделайте это, как в примере 2 во вложении.
С уважением,
Derek.
62 2025-02-06 10:16:24
Re: Скрипт для установки значения по умолчанию. что с ним не так? (7 replies, posted in Russian)
Привет Oleg,
Забыл сказать, что это можно сделать и без скрипта - посмотрите прикрепленный скриншот.
Derek.
63 2025-02-05 09:06:23
Re: Скрипт для установки значения по умолчанию. что с ним не так? (7 replies, posted in Russian)
привет
Попробуйте вот так
procedure Form_AddTool_OnShow (Sender: TObject);
begin
if Form_AddTool.dbAction = 'NewRecord' then // Если открыта новая запись
begin
Form_AddTool.ComboBox2.dbItemId := 1; // ID состояния "На складе"
end;
end;
Derek.
64 2025-02-02 21:13:44
Re: Chekbox in Tablegrid (4 replies, posted in Russian)
Привет Delphinsl,
Не уверен, что правильно понимаю ваш вопрос, но думаю, что это необходимый вам синтаксис.
procedure Form1_TableGrid1_OnCellClick (Sender: TObject; ACol, ARow: Integer);
begin
if Form1.TableGrid1.cell[0,arow].AsBoolean = false then ........ etc etc.
end;
Также смотрите прикрепленный пример.
С уважением
Derek.
65 2025-02-01 12:33:35
Re: update data in feild (7 replies, posted in General)
You could try something like this (see attached - re-orders the 'companies' table by 'name').
Why you would want to is the more pertinent question as it's rather pointless!
Derek.
66 2025-01-31 00:48:54
Re: button show record clears txtbox default value (9 replies, posted in General)
Hi Igor,
Attached is a fix for the problem with default values not appearing in 'rabat' and 'PDV' (see in the script).
However, I've had a look at your project and I think there are basic design issues that you should consider before you develop your project any further.
A couple of things that I noticed (there are others);
1. you have an 'operaters' table - does this mean that your project will be used by more than a couple of people at the same time? You might want to consider using MYSQL rather than SQLite as your database (although if concurrency is not a major concern, you should be okay to stick with SQLite as your database).
2. You have set up a relationship between the 'usluge' and 'stavke' tables in your data schema; however, because of the way you have designed your forms (specifically 'formusluge'), this relationship is not being populated.
3. There is a lot of duplication of fields in the 'usluge' and 'stavke' tables. This may be intentional if you are using the information in 'usluge' as defaults but then want to change some of those defaults before populating the 'stavke' table. But having fields (for example 'kolicina') in the 'usluge' table doesn't make any sense (unless you are also wanting to use it to monitor stock levels etc). Another example is 'artikel' that appears in both tables - surely 'artikel' (and 'jedinicnaMjera') would be common to both 'usluge' and 'stavke' tables otherwise why have a relationship between them in the first place.
4. I understand that different items in the 'usluge' table can have different 'PDV' rates but would you have a different 'PDV' rate on the 'slavke' table for the same item?
5. You need to re-do 'formusluge' - maintaining 'usluge' data and 'stavke' data not only on the same form but also using the same fields(!) is going to cause you a lot of problems. Using a separate form for 'usluge' data will both simplify and fix a few problems.
6. You have a 'napomena' field in the 'nalozi' table but this is not related to the 'napomena' table which doesn't seem to do anything.
7 Consider using 'editable tablegrids' for your 'look up' reference data (it gives your project a clearer structure, reduces the number of forms and is a lot quicker to write). The 'kupci', 'operater', 'mjeseci', 'godina' and 'usluge' tables could all be managed this way.
As a general observation, your database design looks a bit as if you are using a 'relational database' (ie SQLite) in a non-relational way (we often see this when someone tries to replicate something that was previously done in a spreadsheet and while it can be done, it doesn't take full advantage of what a relational database can offer).
I appreciate that your project is still being worked on and some of the outstanding issues may be known to you. But I'd strongly advise sorting out the above points before making any further progress.
Do not take any of the above points as critisisms; trying to design quite a complicated requirement as your first MVD project is not easy and a lot of what you've managed so far is working okay.
Regards,
Derek.
67 2025-01-29 10:42:33
Re: button show record clears txtbox default value (9 replies, posted in General)
Hi igor, Sparrow,
Sparrow has outlined how the basic functionality works so I'm a bit confused to what your exact problem is.
Perhaps if you upload your project, it will help to clarify the issue.
Derek.
68 2025-01-28 21:48:26
Re: Fetch the Maximum Value and Increment (7 replies, posted in General)
Hi Igor,
If you still want to use the record_counter functionality, you can just copy it to an edit field and then you can make any adjustments that you want.
And there are quite few different ways to achieve this.
One suggestion is in the enclosed attachment.
1. You do not have to use the record counter at all - just type in an invoice number in whatever format you want.
2. If you want to use the record counter, enter '=' in the 'Invoice No' field.
3. If you want to include the record counter as part of the invoice no', enter '=' in the 'Invoice No' field and then make any additional adjustments manually.
It really doesn't matter which method you choose but it's important, once you've decided, to be consistent so I'd make changes at that stage so that the program forces that consistency.
Regards,
Derek.
69 2025-01-28 11:18:46
Re: Fetch the Maximum Value and Increment (7 replies, posted in General)
Hi Sparrow,
It's a fair point (although Igor hasn't specified it at this moment - but I guess it's on the way ).
Rather than adding new fields etc, I think I'd just update the record_counter (for example when the year changes)..
Derek.
70 2025-01-27 21:16:26
Re: Fetch the Maximum Value and Increment (7 replies, posted in General)
Hi,
See the attached example (Option 1).
Is there a reason why you can't use a 'counter' filed type - this will automatically add 1 to the order number every time without you having to write any script (Option 2).
Also in Option 2, instead of placing the order number in an edit field (if the user is unable to do anything with it, then why have it there simply taking up space?), the order number is displayed as part of the form's header caption).
Derek.
71 2025-01-25 13:17:34
Re: IGMA database (8 replies, posted in General)
Hi,
Have a look at the attachment.
Another option if you have a long column header, might be to shorten it so that it fits on one line and then use a ''hint'' to expand the column header when the mouse is place over that column header.
Derek.
72 2025-01-25 00:34:22
Re: Filling tg Cells with color (15 replies, posted in General)
Hi Adam, Sparrow,
Had a bit of time so smarted up the script to remove all of the ''repeats'' and also do away with frmitems.edit2 (which was being used to temporarily hold the hex color value); now it just applies it directly to each of the frmitems.edcolor fields.
Anything not clear, just shout
73 2025-01-24 20:53:43
Re: Filling tg Cells with color (15 replies, posted in General)
No problem at all Sparrow.
It's good when other people contribute and suggest different ways of doing something that we might not have thought of - we all learn a little more every time and everyone ends up a winner!
Derek.
74 2025-01-24 19:48:53
Re: IGMA database (8 replies, posted in General)
Hi,
Try it like this
procedure Form1_TableGrid1_OnChange (Sender: TObject);
begin
form1.edit1.text := form1.tablegrid1.Columns[2].Footer.caption;
end;
See it working in the attachment.
Derek.
75 2025-01-24 18:54:55
Re: Filling tg Cells with color (15 replies, posted in General)
Hi Adam,
You might have heard me cursing you from across the pond .
It took me a while to work out what was going on and it was so simple in the end.
I've also added tests in case some of frmitems.edcolor11 through edcolor33 aren't filled in.
Also, I think the code could be simplified (there's a lot of repeats in the script that could be put into a single procedure but I'm pushed for time).
Finally, I took off the ''select full row'' on the tablegrid so you don't see the hex color codes.
And the ACTUAL problem?
It was because you'd switched on ''styles'' (and so needed to add ''styleelements := 0 to your frmitems fields (see at the end of the script); it was pretty much working all along but we just couldn't see it!
Regards,
Derek.