Привет снова, Chaoba,
Избыточные данные обычно относятся к данным об одном и том же субъекте, которые хранятся более одного раза, а не к данным, относящимся к разным субъектам.
Пожалуйста, посмотрите на диаграмму. Верхняя часть диаграммы показывает, как данные хранятся в плоском файле - красные прямоугольники показывают все данные, которые являются избыточными.
Когда вы создаете реляционную базу данных, вы удаляете избыточность, создавая связанные таблицы и связывая эти таблицы с тем, что называется «внешним ключом». Посмотрите на синие прямоугольники - «таблица строк счета» связана с «таблицей заголовка счета» его внешним ключом заголовка счета. «Таблица заголовков счетов» связана с «таблицей счетов» внешним ключом таблицы счетов. Ничего не повторяется
MVD создает все это автоматически - все, что вам нужно сделать, это создать ссылку в вашей структуре данных.
Наконец, посмотрите на зеленые коробки; это не избыточные данные, просто один и тот же товар (принтер) был куплен по двум разным счетам двумя разными покупателями.
Я надеюсь, что это не делает вещи более запутанными! Но важно получить правильную структуру данных. и когда это, MVD очень прост в использовании.
Regards,
Derek.
.
Redundant data typically refers to data about the same subject that is held more than once, not data that is held against different subjects.
Please have a look at the diagram.  The top of the diagram shows how data is held in a flat file - the red boxes show all the data that is redundant.
When you create a relational database, you remove the redundancy by creating related tables and linking those tables with what is called 'a foreign key'.  Look at the blue boxes - the 'invoice line table' is related to the 'invoice header table' by its invoice header foreign key.  The 'invoice header table' is related to the 'account table' by its account table foreign key.  Nothing is repeated
MVD creates all this automatically - all you need to do is create a link in your data structure.
Finally, look at the green boxes;  this is not redundant data - it is simply that the same item (a printer) has been bought on 2 different invoices by 2 different customers.
I hope this doesn't make things more confusing!  But it is important to get your data structure correct. and when it is, MVD is very straightforward to use.

Привет Chaoba,
Может быть, я неправильно понимаю ваш вопрос, но я не понимаю, как поможет создание 2 дополнительных таблиц, которые содержат только 1 поле (имя) и 1 поле (фамилия)? Кроме того, с точки зрения базы данных, это не очень хороший дизайн.
Может ли ваша проблема (если я правильно понимаю) не быть решена простым использованием полей поиска для фильтрации вашей таблицы?
Пожалуйста, посмотрите на пример, где я использую только 1 таблицу. В поле поиска вы можете ввести что угодно - имя, фамилию, дату, телефон и т. Д. - и в любой комбинации.   Например, поиск «John», поиск «Smith», поиск «John Smith», поиск «200», поиск «.org» и т. Д. И т. Д.  Извините - все данные на английском
Derek.
.
Maybe I misunderstand your question, but I do not understand how the creation of 2 additional tables that contain only 1 field (name) and 1 field (last name) will help? In addition, from a database point of view, this is not a very good design.
Can your problem (if I understand correctly) not be solved by simply using search fields to filter your table?
Please look at the example where I use only 1 table. In the search field, you can enter anything - first name, last name, date, phone number, etc. - and in any combination. For example, the search for "John", the search for "Smith", the search for "John Smith", the search for "200", the search for ".org", etc.. Etc. Sorry - all data in English.

1,853

(6 replies, posted in General)

Hi David,
Have you tried:
Openfile('myprog.exe','mytext');
That's the way you'd run something like like Notepad when specifying a particular file (see attached), so I'm guessing it might be the same in your case.
Derek.

Привет Dentstar32,
Из того, что я могу понять из вашего сообщения (используя переводчик Google), не должно быть никаких проблем с использованием MVD, чтобы сделать то, что вы описываете.
Прилагается очень простая программа, показывающая небольшую часть того, что стандартное MVD может делать быстро и без кодирования; с необязательным сценарием возможно намного больше.
Я надеюсь, что это дает вам некоторые идеи, на которые способен MVD.
С Уважением,
Derek.

1,855

(2 replies, posted in General)

Hi Again David,
Attached is what I've used in the past to mimic radio buttons.
Rather than have discrete boolean fields for each option, I use a single hidden combobox instead and depending on what radio button image is clicked, set the associated value in the combobox.
The radio buttons images are simply overlaid on top of each other to simulate being clicked on or off.
Maybe this might give you some ideas.
Regards,
Derek.

1,856

(12 replies, posted in FAQ)

Sorry - forgot the second attachment - here it is
Derek.

1,857

(12 replies, posted in FAQ)

Hello Marc,
My understanding is that if you use 'copyfile' (for individual files) or 'directorycopy' (for entire directories (and sub-directories)) -
1)   if the destination file or directory doesn't exist, it will be created.
2)   if the destination file of directory already exists, it will, by default, be overwritten.
Please have a look at the attachment (1 example of 'copyfile' and 1 example of 'directorycopy').
I appreciate that these ways of performing back-ups probably won't suit more complex applications, but it does the job for my simple requirements (why buy a ferrari if you only go shopping!).
Hope this helps.
Regards,
Derek.

1,858

(3 replies, posted in General)

Hi Raheel,
I think I'd probably use 'sql query' to show a summary for each vehicle in a separate tablegrid and then link the 2 tablegrids together so that when you select a specific vehicle, the tablegrid with the details automatically filters.
One problem though is to show the 3 different fuel types on the same row (because this is not how your data is structured).  So in my example, the summary is just by vehicle (to reflect your data structure). 
Please have a look at the attached example - hopefully it gives you the general idea.
Regards,
Derek

1,859

(14 replies, posted in General)

Hi David, Gonpublc2k,
I thought I'd read somewhere that 'ostype' might work with later versions of Windows;  sorry about that.
However, there's nothing to stop you creating a new system environment variable ('ostype' or whatever you want to call it) and give it the OS Version description.  Then give the script the name of your new environment variable and it's value pulls through to the program like any other environment variable.  But obviously, you'd need to do that for each PC that's running your program (which may be impractical).
Another way might be to write a batch file that runs the DOS command that shows the Operating System details (in XP, the command is 'ver', but I'm not sure about later versions) and then write the output to a file.  Then, in the script, read the contents of that file into your edit field.
I've attached an example (but obviously you'll need to edit the included batch file and replace 'ver' with whatever DOS command works with your version of Windows);  the screenshot shows how it looks on my machine but yours will obviously be different.
At least this might give you a couple of options.
Derek.

1,860

(14 replies, posted in General)

Hi David,
I'm guessing it shows that way because at the kernel level, it's still basically windows_nt.
I can't test it because I'm still on XP but you could try replacing 'OS' with 'OSTYPE' in the script (line4) and that might display the info' you need.
With regard to screen resolution, you could use screen.width and screen.height (see attachment).
Derek.

Hi Chaoba,
Обычно я добавляю панель в форму, а затем помещаю на нее новые объекты или, если объекты уже существуют в форме, я вырезаю и вставляю их в панель; с помощью этого метода они становятся подчиненными панели, поэтому все, что вы делаете с панелью (например, перемещаете, скрываете, включаете и т. д.), автоматически происходит и со всеми подчиненными объектами. Это может сэкономить много времени.
«Вывести на передний план» и «Отправить на задний план» позволяет размещать объекты поверх панели, но при этом методе они не подчиняются панели и, таким образом, продолжают вести себя независимо.
Почему объекты меток ведут себя по-разному, я не знаю.
Но когда вы привыкаете к дизайнеру форм, я не вижу много вещей, которые вы не можете сделать.
С Уважением,
Derek.

Usually, i add a panel to a form and then place new objects onto it or, if objects already exist on the form, then I cut and paste them onto the panel;  with this method, they become subordinate to the panel, so everything you do to the panel (for example, move, hide, enable etc) automatically happens to all the subordinate objects as well.  This can save a lot of time.
'Bring to front' and 'send to back' allows you to place objects on top of a panel but with this method they are not subordinate to the panel and so still behave independently.
Why label objects behave differently, I do not know.
But when you get used to the form designer, I don't find there are many things that you can't do.

Привет Chaoba,
Добро пожаловать в МВД.
2 предложения.
1. Вы можете изменить свойство фильтра в поле поиска на% s% - это облегчит поиск. Вы также можете использовать свойство increm.search, чтобы поиск происходил постепенно. Пожалуйста, смотрите скриншот в приложении.
2. Чтобы переместить несколько объектов по форме, удерживайте клавишу «Shift» и затем щелкните объекты, которые вы хотите переместить. Другой вариант - группировать объекты на панели - тогда вам нужно только переместить панель.
(извините, я не говорю по русски - гугл переводчик).
С Уважением,
Derek.

1,863

(14 replies, posted in General)

Hi David,
How's things?
I think there are other environment variables that might show more detailed information but perhaps ('OS') is enough for what you need?
Please have a look at the attached (XP probably shows up as _NT - but I guess if you wanted, you could just add another line of script to substitute _XP where it finds _NT).
Derek.

1,864

(22 replies, posted in General)

No problem.
I often find my problem is with the data rather than the program itself so I use SQLiteStudio (it's free) to look at how the data is being stored.
But if you don't have SQLiteStudio, it's very easy to create a temporary form and display the entire contents of all your tables on it (including any relationships that might be missing).
Have a look at the attached - I use a temporary form called 'raw data' and place a button (raw data) on the first form.  Click it and it shows you right away where there might be a problem (in this example, some links between the 'database' table and the 'receipt' table are missing).    Once you have corrected that and are happy that the data is being stored as you want, you can simply delete the form and button.
Derek.

1,865

(22 replies, posted in General)

Hi Raheel,
Are you trying it on data that you'd added before you created the relationship?  If so, there wouldn't be any id's in place to link the data.
Can you attach what you've done and maybe I or someone else might spot something?
Derek.

Привет Mikhail
Это еще один метод - дважды щелкните конкретную ячейку, которую вы хотите изменить, и она изменяется с помощью Да - Нет - Да - Нет и т. Д.
Я считаю этот метод полезным, потому что он может сделать ваши действия специфичными для ячейки таблицы, а не только для таблицы. Таким образом, ваша таблица становится более интерактивной.
Надеюсь это понятно (гугл переводчик).
С уважением,
Derek
.
This is another method - double-click the specific cell that you want to change, and it is changed (in this example using Yes - No - Yes - No, etc).
I find this method useful because it can make your actions specific to a tablegrid cell, not just a tablegrid row - this way your table becomes more interactive.
Regards,
Derek.

1,867

(22 replies, posted in General)

Hello Raheel,
I understand what you're trying to do - load the dbimage into the 'picture' object in Fastreport by script.  But like you, I can't work out what the correct syntax should be.
As a work-around, and because you only ever have 1 row in your 'receipts' table, I would simply create a relationship between your 'database' table and your 'receipt' table, pre-set form1.combobox2 to '1' (using index1) and hide it;  that way,  the logo (and the header and footer messages) can be added as data fields to the dataset that you define for the report in the standard way.
I don't know if that's an acceptable solution for you?
Derek.

1,868

(22 replies, posted in General)

Hi Raheel, Zimguy, Sibprogsistem,
I don't use the ReportDesigner much but whenever I've wanted to use any pictures (as in your example, for a logo), then I simply add the picture(logo) directly into the Reports folder within my project.  Then, in the ReportDesigner, I drag a 'picture object' into whatever section of the report I want and then specify the picture I want to load. 
Because, in this instance, it's simply a picture(logo) and unrelated to any data, it's actually nothing to do with MVD and all done within the Reporter.
Regards,
Derek.

Hi Eyeman303,
As a general 'rule of thumb', you should try to not hold the same piece of data more than once in your database;  creating a new field to hold information that you are already holding (firstname, middlename, lastname) introduces data redundancy.  I would suggest using a calculated field instead (please see attached).
I have had a quick look at your project and the database has a number of tables that seem unnecessary (middle_name, last_name, age_years, years, age_months, unit_price, subform2_opd_registration).  Also, some of the relationships do not look correct.
If I have some time, I can go through it and suggest an alternative schema that has no redundancy and is less complex, if this would be of help;  this should also help in reducing the number of forms that you currently have.  One suggestion might be to use 'editable tablegrids' for your 'look-up' forms (salutation, gender, next of kin etc - these can all be done on one form;  your project would load a lot faster with fewer forms.
Derek.

1,870

(3 replies, posted in General)

Hi Raheel,
Is this of any help to you (see attached)?
Derek.

1,871

(4 replies, posted in General)

Hi Kees,
I don't know of a tutorial for 'treeview' specifically but have a look at the attached and hopefully it will be enough to give you a overview.
There are a couple of things to remember if you use a 'treeview'.
1.  Your table must have a 'parentid' (defined as integer);  this is how MVD internally links child and parent nodes together on the hierarchy.
2.  Your table should have a 'description' (text) field that contains the legend that appears on the hierarchy.
3.  On your form, the treeview object must be set to 'editable' (see screenshot in the attachment).
4.  You must nominate a form on which you maintain your hierarchy and any other data (again, see screenshot in the attachment).
The attachment has 2 examples.
Keestree1 shows a simple hierarchy with additional fields as cells attached to the same node.
Keestree2 shows the same hierarchy but with the additional fields displayed as edit fields on the form (this way requires a small script).
There are other options but these 2 basic ways should be enough to get you started.
Hope this helps,
Derek.

1,872

(2 replies, posted in General)

Hello Marcomvd,
Probably a number of ways but I think I would do it with a small script (see attachment) instead of a calculated field.
Hope this helps and please get back if anything is unclear.
Regards,
Derek.

1,873

(2 replies, posted in Russian)

Привет Agatlogic101,,
Вы можете сделать это так (см. Пример).
С Уважением,
Derek.

Hello Eyeman,
The PID is not being formatted as you want because your code has not been inserted in the correct place in the script.
Each time you want to perform a specific action in a script, the instructions must be contained within the 'begin' and 'end'  of a procedure that relates to that action (ie clicking a button, displaying a form etc).
At the very end of your script there is a 'general purpose' 'begin' and 'end' where you can add addtional instructions that simply execute when the program runs, rather than any specific action.
Anything that you insert AFTER this final 'begin' and 'end' of your script will simply be ignored;  this is what's happening with your script.
Perhaps it would help if you uploaded your program so that someone in the Forum could correct it - then you would be able to get a better understanding of scripts and what is required.
In the meantime, to give you an idea, I have attached an old program of mine that I have quickly changed to be more like your project (obviously, lots of it will be incorrect for what you actually need, but the principle is the same and it should give you more ideas).
Hope this helps,
Regards,
Derek

Hello Eyeman,
Welcome to MVD.
By default, the form that is first displayed when you run your .exe is the form that is left-most in the MVD work area.  All you need to do is click and drag the form's tab to the left and that then becomes the first form that is displayed when you execute your program.
Please have a look at the 2 screenshots in the attachment and also there is a small program (that does nothing!) except show you the effect of dragging either form to the left.
Hope this helps,
Derek.