Здравствуй Maksim,
Возможно, попробуйте это так (см. Прилагаемый пример) и посмотрите на скриншот, который показывает
1. как использовать опцию 'linkfile'
2. Как указать папку 'copy to' в вашем приложении (я использую / gallery), чтобы при переносе приложения на другой компьютер фотографии не терялись.
Я считаю, что это самый простой способ
Derek.

Здравствуй Vickus,
Возможно, сделайте это так.
Derek.

1,453

(3 replies, posted in General)

Hi,
The 'frame' around the button is because it is defined as the 'default' (when you press 'enter'  whichever button is defined as the default is the button-action that is executed, no matter where you are on the form).
If you de-select the 'default' property for all buttons on your form, then the 'frame' should only appear around any button when you have tabbed into it.
Please see the attached screen-shot.
Derek.

Это маленький скрипт:
процедура Form1_TableGrid1_OnClick (Отправитель: TObject);
начать
   form1.button7.click;
конец;
Выполняется второй инкрементальный поиск (первый инкрементальный поиск автоматически выполняется свойством объекта инкрементного поиска form1.tablegrid1).
Derek.

Здравствуйте Vickus,
Пожалуйста, посмотрите на пример в приложении
Возможно, это помогает.
Derek.

Здравствуй Tefix,
Если вы хотите заменить «0» на «Нет» и «1» на «Да» как часть вашего SQL-запроса, взгляните на «screenshot1.jpg».
Если он не является частью вашего sql-запроса, я бы использовал вычисляемое поле (синтаксис тот же).
Я думаю, что выравнивание верхних колонтитулов таблицы, столбцов, нижних колонтитулов и т. Д. Является частью свойств объекта tablegrid из Версии 5, но оно не работает с выводом из SQL-запроса, поэтому вам придется написать небольшой скрипт (см. Screenshot2.jpg). Повторите это для столько столбцов, сколько у вас в таблице (номера столбцов начинаются с 0).
С Уважением,
Derek.
.
If you want to replace '0' with 'No' and '1' with 'Yes' as part of your sql query, have a look at 'screenshot1.jpg'.
If it is not part of your sql query, then I would use a caculated field (the syntax is the same).
Aligning tablegrid headers, column, footers etc is part of the tablegrid object properties from Version 5 I think, but it does not work with output from an sql query, so you would have to write a small script (see 'screenshot2.jpg).  Repeat it for as many columns as you have in your tablegrid (column numbers start at 0).

Здравствуйте Tefix,
Вам нужно включить идентификатор записи как часть вашего оператора sql запроса «select», чтобы «MVD» знал, какую запись использовать.
Однако, если вы не хотите видеть идентификатор в таблице, вы можете просто написать «delete_col» в заголовках SQL-запросов.
С Уважением,
Derek.
(с гугл переводчиком)
.
You need to include the record id as part of your sql query 'select' statement so that 'MVD' knows which record to use.
However, if you do not want to see the id in the tablegrid, you can simply write 'delete_col' in the sql query titles.
Regards,
Derek.

1,458

(3 replies, posted in General)

Hi Wood,
I had the same problem a couple of years ago. 
The only solution I could come up with was using panels and setting them to 'enabled = true' or 'enabled = false'. 
You then use 'tab' to go from one field to the next within a block or (in the attached example) use ''left arrow' and 'right arrow'' to jump between blocks (you could use other keys but 'left arrow' and 'right arrow' seemed a logical choice).
I appreciate it's a work-around but perhaps it gives you some ideas,
Derek.

Здравствуй,
Есть разные способы сделать это - я использую вычисляемые поля.
Это помогает?
Derek

Здравствуй Vdovin,
Отношения между таблицами в порядке, вам просто нужно добавить кнопку поиска (в моем примере этот «поиск» выполняется автоматически).
Пожалуйста, спросите, что-нибудь не понятно.
Derek
(с гугл переводчиком)

Здравствуйте,
Test.vdb сам по себе не достаточно.
Вам нужно загрузить весь ваш проект (но не test.exe).
С Уважением,
Derek.

1,462

(6 replies, posted in General)

Hi Wood,
I understand why you might think that the integer fields are the problem, but I've been able to print a record that has, for example, a value in the RAM field, so I think it might be another issue.
When you change some of your data and try to print, the error message changes and highlights different fields / values so I'm wondering if it might even be the size of the actual select statement (you have 36 components plus their values!) that is causing errors in the query plan - but it's just a guess;  maybe someone else could either confirm or correct me on that.
But you don't actually need to specify any components in your search anyway because you have already selected a single record from the tablegrid on the previous form.  So as a simple fix, I'd suggest you remove them all (see attached screenshot) and run the report like that.
Derek.

1,463

(6 replies, posted in General)

Hi,
If you upload your project, I'm sure someone will be able to have a look.
Derek.

Hello Henri,
Please have a look at the attachment for one way of doing it but there are probably other (better!) ways (just couldn't think of any!).
Hope this helps,
Derek.

Здравствуйте Vit007,
Это помогает?
С Уважением,
Derek.

Здравствуй Maksim,
Вы не можете клонировать форму, но вы можете скопировать любое количество (или все) объектов из одной формы в другую.
Чтобы скопировать один объект, щелкните правой кнопкой мыши, выберите «Copy» и вставьте в новую форму.
Чтобы скопировать несколько объектов, нажмите «Shift», затем щелкните правой кнопкой мыши, выберите «Copy» и вставьте в новую форму.
Derek.

Hi Eyeman, Hi Jean,
Now you are using page control / tab sheets rather than your 'menu' form, things become more straightforward.
There's actually no reason why you can't enter 'chief complaint' data, 'systemic imaging' data etc AT THE SAME TIME as you add your OPD Visit Rec - there is no need to save it first before carrying on, so the question of whether to stay on, or close AA_Form_007_OPD_Visit_Rec becomes less relevant.
Derek.

Hello,
OPD_ID is auto-incremented whenever AA_Form_007_OPD_VISIT_REC is opened.  But if you don't close AA_Form_007_OPD_VISIT_REC once the record has been saved, then OPD_ID can't auto-increment until the next time AA_Form_007_OPD_VISIT_REC is opened (see screenshot3)..
As a general rule (just my personal preference), I would always try to close any form once the data has been saved because it's too easy to accidently create duplicate records, blank records etc.  You could always check for this happening (by script) but it's extra work and not playing to MVD's strengths.
When you get 'foreign key constraint failed' error messages, it's because you have data in other tables that is dependent on the row of data you're trying to delete (if it's allowed to happen, you get an 'orphan record'  - ie it's 'parent' no longer exists, and the integrity of a relational database is compromised).
In your case, I imagine you're trying to delete a record from AA_002_REC_Visits but there are still related records in AA_003_REC_Chief_Complaints.  What you need to do is note the ID of the AA_002_REC_Visits record that you can't delete and then find the record(s) in AA_003_REC_Chief_Complaints where the foreign key (ID_AA_002_REC_Visits) is equal to the ID that you've noted. 
Delete all of the relevant rows in AA_003_REC_Chief_Complaints and then go back to AA_002_REC_Visits and the deletion should now work.
Derek.

Hi Eyeman,
It's not the script.
If you have a look at the raw data (screenshot1 in the attachment) you can see the 'null' values.
So I suspect the problem is with the 'save' button on AA_Form_007_OPD_VISIT_REC not saving editcounter1 (look at screenshot2.jpg).
Derek

Hello,
Your application doesn't close completely because the login form is only hidden (AA_Form_001_LOGIN.hide - see line 71 in the script).
The easiest fix is to create an 'on close' event for AA_Form_002_SELECT_MODULE and insert the instruction  AA_Form_001_LOGIN.close;  in the script (see attached screenshot). 
So now, when AA_Form_002_SELECT_MODULE closes, it automatically closes AA_Form_001_LOGIN at the same time;
Derek.

Hi,
AA_Form_007D_OPD_VISIT_REC_MENU neither receives any data nor passes any on, so it breaks any relationships that MVD maintains automatically for you.  You could manually obtain the necessary keys by script but it's not playing to MVD's strengths.
I understand what you are trying to achieve using a 'menu' form to keep AA_Form_007_OPD_VISIT_REC uncluttered but I think a better approach might be to use a page control with a number of tab sheets (one tab sheet for each of your menu items).  This keeps the relationships intact and should then result in only the relevant child records being displayed in the tablegrid in AA_Form_006_PATIENT_REG_REC which was your original concern (see the attachment as a suggestion).
However, for information, there are a number of points that I would mention.
1.  When you close your application, it stays running in the background - this is due to the way you use your login form, I suspect.
2.  I would probably question any application that has 107 tables and 141 forms - I don't fully understand your requirement but I'd have a rethink of the data structure.  In my experience, if that's not correct then it's never going to work properly.
3.  With such a large number of tables and forms, I would also be worried about how slow your application will run once you have some meaningful data loaded and, I'm presuming from the nature of what you've done, it will be multi-user as well.
Anyway, that's just my opinion and you and others may have a different view.
Hope this helps,
Derek.

Hi,
It's hard to work out exactly what's going on although it does sound like one of the keys is either not being passed through or not being saved.
Can you attach the latest version of your project and I'll try and have a look.
Derek.

Здравствуй Rasnikgal,
Я изменил ваш sqlquery.
Это помогает?
Derek.

1,474

(13 replies, posted in Database applications)

Hi,
Yes, you've got it.
Derek.

1,475

(13 replies, posted in Database applications)

Hello Eyeman,
The data structure defines a one-to-many relationship between 'clients' and 'bills'. 
The form 'frmservice' can only be accessed through 'frmclient' which already knows the clients.id.  Therefore, when the form 'frmservice' is opened, clients.id is passed through and used to automatically generate (and save) the foreign key (bills.id_clients) without you having to do anything. 
This is 'standard' MVD functionality and one of its main strengths.
Derek.