1,451

(5 replies, posted in Script)

Thanks Hedan and best wishes for 2020.
Derek.

1,452

(5 replies, posted in Script)

Hi Jean,
No - I had a choice between replying to Hedan's question or going Christmas shopping with the grandchildren - it was no contest!!  smile
Merry Xmas to you too.
Derek.

Hi Pnoindl,
Please have a look at the attached example.
Form1.tablegrid1 shows your invoice headers.
Form1.tablegrid2 shows your invoice lines related to the invoice header row that has been highlighted
The way you link the two tablegrids is by using a button defined with a 'search' action (in my example, this is button4).
Button4 uses form1.tablegrid1 as its search criteria - in other words, whichever row is highlighted in tablegrid1 will display the related child records (invoicelines) in tablegrid2 when form1.button4 is clicked.
To make it more user-friendly, button4 can be hidden and automatically clicked (an 'incremental search'), whenever a different row in form1.tablegrid1 is highlighted - see the screenshot in the attachment to see how this is done.
This is standard MVD functionality and needs no script.
Regards,
Derek.

1,454

(5 replies, posted in Script)

Hello Hedan,
I think you can change the combobox to pretty much anything you want with a combination of
form1.combobox1.color := xxxxx
and
form1.combobox1.font.color := xxxxx
For the datetimepicker, I think it's only possible to change the background color (and that needs to be done at 'form1.show' rather than being able to set it as part of the datetimepicker object properties.
Please see the attached where I was just messing with different combinations - it might give you some ideas.
I also seem to remember that not all background / foreground color options are available depending on the Operating System that you're using (but I might be wrong!).
Regards,
Derek.

Здравствуй Tefix,
Добавьте это в конце вашего sqlquery -
order by 2;
Вы также можете использовать -
order by tablename.fieldname;
Другие варианты -
order by 2 desc;
order by tablename.fieldname desc;
Возможно, это помогает?
Derek
(с гугл переводчиком)

1,456

(3 replies, posted in General)

Hi Scribtx, Hi JB,
If I don't want to use the pre-set colors (clred, clblue, clgreen etc), I click on the bgcolor object property (the very small box circled in the attached screenshot - it's quite easy to miss - LOL!), click on 'define custom colors' and then just choose a color from the palette.
The color value is then copied back into the object's property (in my example $00B6AA85).  You can then simply copy this value and use it elsewhere if required.
All of this holds true not just for form backgrounds but for labels, tablegrid backgrounds, panels etc etc.
Regards,
Derek.

1,457

(2 replies, posted in FAQ)

Hi George,
Not sure why Dmitry's example didn't work for you (it's good for me) but attached is an example with a few keys mapped to certain actions (I use CTRL+ALT to avoid any conflicts that you might get with just CTRL+ or with just ALT+ but the decision is yours). 
CTRL+ALT+H displays what short cut keys have been set up.
Derek.

Здравствуйте Konstruktor,
Это может быть несколько вещей
Возможно, вам нужно обновить таблицу.
form1.tablegrid1.dbupdate;
Если это не работает, пожалуйста, загрузите ваш проект, и я уверен, что кто-то может посмотреть.
Derek.
(с гугл переводчиком)

1,459

(7 replies, posted in SQL queries)

Hi Vijaian, EHW,
Another thing  you might want to consider, for example, is using 'editable grids' for your dictionaries. 
It saves a lot of time by not having to create extra forms (17 fewer in your clientmanager example), makes your project more compact and will probably load that bit quicker (please see attached).
Regards,
Derek.

1,460

(2 replies, posted in Script)

Try something like this (see attached).
Derek.

1,461

(5 replies, posted in General)

Hi George,
I'm not sure that I'd approach it this way - what if you want more than 5 images?  I think I'd use one table for the car parts data and then a related table to hold how ever many photos you want.
With regard to not wanting to load images one at a time, I wondered if you couldn't take a completely different approach (much simpler with just one table), as follows:
1.  Add a folder within your application (in the attachment, I've called it 'photos' (pretty imaginative - LOL!).
2.  When you add a part no', a sub-folder is automatically created within the 'photos' folder which is named as the part no'.
3.  You can then simply drag / drop in bulk any photos directly into the sub-folder (and don't use MVD at all).
4.  When you want to view the photos, click on the 'camera' icon either in Form1 or Form2 which then shows all the photos within that subfolder.
No photos are stored in the database at all - either directly or as a 'linked file' reference - so it should keep things nice and fast.
Maybe this helps,
Regards,
Derek.

Здравствуй Maksim,
Если вы заглянули в Справку MVD - DBImage, там есть информация - http://myvisualdatabase.com/help_ru/
Тогда я просто пробую разные вещи, пока не получится так, как я хочу!
Derek.

Здравствуй Vickus,
В самой программе вы можете отобразить эту информацию, используя 'sqlquery' (см. Tablegrid4), поэтому я думаю, что вам придется сделать что-то подобное, используя ('report sql').
К сожалению, я не пользуюсь FastReport, поэтому не уверен, что делать. Надеюсь, что некоторые другие пользователи могут иметь ответ.
С Уважением,
Derek.

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

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

1,466

(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,471

(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,475

(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.