Really elegant solution
27 2024-02-01 13:06:43
Re: Подсчёт ответов в столбце грида (4 replies, posted in Russian)
Простое решение не всегда правильное.
Начните со структуры данных вашего проекта.
И оперировать лучше не с колонками на экране, а полями в таблице БД.
28 2024-01-29 10:06:13
Re: Запутался в связях (38 replies, posted in Russian)
Константин,
Я попробовал третий вариант. Рабочий. Только требует дополнительной обработки в событии OnPaint
Выглядит прилично, как я понимаю, возможен вариант с универсальным обработчиком формы OnPaint, в котором производится обход компонентов на форме и отрисовка рамок при необходимости. И кода будет поменьше, чем при создании кучи TShape
29 2024-01-29 08:48:21
Re: Узнать состояние окна формы (открыто - закрыто) (3 replies, posted in Russian)
Какая-то сложная концепция.... И что такое "выходные результаты работы формы"?
Зачем изобретать велосипед с таймером? Сделайте многостраничный форму-мастер или используйте модальные вызовы окон.
30 2024-01-29 07:48:51
Re: Запутался в связях (38 replies, posted in Russian)
Попробуйте заменить GIF на JPG или PNG.
31 2024-01-25 10:49:37
Re: Запутался в связях (38 replies, posted in Russian)
В любом случае, если проблемы при экспорте, то пофиксить это не получится. В таких случаях обычно приходится идти каким-то обходным путём...
33 2024-01-25 10:36:56
Re: Запутался в связях (38 replies, posted in Russian)
У меня ошибку выдает при запуске печати
34 2024-01-24 16:25:14
Re: Запутался в связях (38 replies, posted in Russian)
Имею ввиду печать картинки с бд. Там какая то хитрость? Если просто вытянуть в фр репор.форма.картинка - то получаем набор букв
Приложите проект, не совсем понимаю, о чем речь. Обычно картинки в отчете или из базы, или из файла на диске гружу.
35 2024-01-24 12:24:31
Re: Запутался в связях (38 replies, posted in Russian)
И еще момент. Можно ли обновить версию ФастРепорта ?
Эта 3, при выгрузке в эксель, залазит за "ширину листа" и нужно при печати ставить "по ширине". Что бы не делал, гадина, все равно лезет шире. В новой версии ФР есть описание, что это пофиксили.И еще - а чего картинка не печатается в ФР? Просто набор букв
Пофиксить не получится, все зашито в экзешник. Насчет картинок - вроде не было проблем, кроме как с прозрачностью при экспорте в PDF.
36 2024-01-24 12:22:20
Re: Запутался в связях (38 replies, posted in Russian)
k245 wrote:Вот пример создания Мемо с закруглениями:
...2d массив не пошел. Было бы понятнее.
Можно большой массив разделить на две части(фигура и служебные)
На счет правильности оригинальных суффиксов не уверен.var ... arrSX : Array[0..9] of string = ['_TL','_TR','_BL','_BR','_HR','_VR','_TP','_BT','_LF','_RG']; arrParam: Array[0..89] of integer = [5,1,2,0,0,0,0,RP_SIZE,RP_SIZE, 5,0,2,4,0,AMemo.Width-RP_SIZE,0,RP_SIZE,RP_SIZE, 5,1,0,0,8,0,AMemo.Height-RP_SIZE,RP_SIZE,RP_SIZE, 5,0,0,4,8,AMemo.Width-RP_SIZE,AMemo.Height-RP_SIZE,RP_SIZE,RP_SIZE, 0,1,2,4,8,0,RP_SIZE div 2,AMemo.Width,AMemo.Height-RP_SIZE, 0,1,2,4,8,RP_SIZE div 2,0,AMemo.Width-RP_SIZE,AMemo.Height, 0,1,2,4,0,RP_SIZE div 2,0,AMemo.Width-RP_SIZE,1, 0,1,0,4,8,RP_SIZE div 2,AMemo.Height-1,AMemo.Width-RP_SIZE,1, 0,1,2,0,8,0,RP_SIZE div 2,1,AMemo.Height-RP_SIZE, 0,0,2,4,8,AMemo.Width-1,RP_SIZE div 2,1,AMemo.Height-RP_SIZE]; //(Shape,akLeft,akTop,akRight,akBottom,Left,Top,Width,Height) begin ... while i <= 89 do begin s := TShape.Create(tmpForm); s.Name := T_SHAPE + tmpName + arrSX[i div 9]; s.Parent := tmpPanel; s.Shape := arrParam[i]; s.SetBounds(arrParam[i+5],arrParam[i+6],arrParam[i+7],arrParam[i+8]); s.Anchors := arrParam[i+1]+arrParam[i+2]+arrParam[i+3]+arrParam[i+4]; i := i + 9; end; ...
Да вы знаете, как проводить тихие зимние вечера )))
Отличный пример борьбы с копипастом. А вот я всё время забываю, что в MVDB можно объявлять переменные сразу со значениями.
37 2024-01-23 08:09:52
Re: Курсы обучения и статьи о разработке приложений (239 replies, posted in Russian)
Ещё одна возможность для получения информации о My Visual Database и общения на тему визуального программирования.
Тегеграм-канал:
38 2024-01-22 08:55:44
Re: Change form color and some controls in real time (10 replies, posted in General)
The topic is interesting, but you need to dig deeper. In one of the projects, I implemented color palettes: color data was stored in a database, the user could create/customize the palette and select it. And on the code side, I made several procedures that updated all the colors according to the selected scheme.
I also repainted the images in the desired color, but this only works with images in the BMP format.
Below are the basic procedures.
procedure Colors_LoadTheme(AID: string);
// загрузка схемы
var
tmpSQL: string;
tmpDataSet: TDataSet;
tmpIndex: Integer;
tmpName: string;
begin
try
// извлекаем цвета, в приоритете - индекс, если данных по схеме ещё нет в базе, все цвета будут чёрными.
tmpSQL := 'SELECT ci.id, coalesce(cu.color,0) as color, coalesce(cu.id_color_item1,0) as colorIndex, ci.name ' +
' FROM color_item ci ' + ' LEFT JOIN color_ui cu on ci.id = cu.id_color_item ' +
'WHERE cu.id_color_theme = ' + AID;
SQLQuery(tmpSQL, tmpDataSet);
while not tmpDataSet.EOF do
begin
tmpName := tmpDataSet.FieldByName('name').asString;
tmpIndex := Colors_GetColorIndex(tmpName);
if tmpIndex = -1 then
ErrMsg('Colors_LoadTheme', 'Не найден цвет с именем ' + tmpName)
else
begin
UIColors[tmpIndex] := tmpDataSet.FieldByName('color').asInteger;
UICIndex[tmpIndex] := tmpDataSet.FieldByName('colorIndex').asInteger - 1;
end;
tmpDataSet.Next;
end;
finally
tmpDataSet.Free;
end;
// инициализировать цветные картинки
Colors_Image_Init;
end;
procedure Form_UpdateColor(AForm: TAForm);
// обновить цвета на форме
var
i: integer;
tmpPanel: TdbPanel;
tmpFormColor: TColor;
begin
// обновление цветов у элементов формы
tmpFormColor := Colors_Get(FORM_COLOR); // цвет формы
AForm.Color := Colors_Get(FORM_FRAME_COLOR); // цвет рамки
FindC(AForm, 'panWork', tmpPanel);
tmpPanel.Color := tmpFormColor;
FindC(AForm, 'panBottom', tmpPanel, False);
if tmpPanel <> nil then
tmpPanel.Color := tmpFormColor;
FindC(AForm, 'panTop', tmpPanel, False);
if tmpPanel <> nil then
tmpPanel.Color := tmpFormColor;
FindC(AForm, 'panTopFilter', tmpPanel, False);
if tmpPanel <> nil then
tmpPanel.Color := tmpFormColor;
FindC(AForm, 'panRight', tmpPanel, False);
if tmpPanel <> nil then
tmpPanel.Color := tmpFormColor;
// обновить цвета у компонент
for i := 0 to AForm.ComponentCount - 1 do
begin
VC_UpdateColor(AForm.Components[i]); // обновление цветов у компонент
end;
end;
procedure VC_UpdateColor(AComponent: TComponent;);
// обновление цвета
begin
try
case GetVClassName(AComponent.Name) of
T_FORM_CAPTION:
FormCaption_UpdateColor(TdbPanel(AComponent));
T_USER_DATA_PANEL:
UserDataPanel_UpdateColor(TdbPanel(AComponent));
T_ROUNDED_LABEL:
RoundedLabel_UpdateColor(TdbLabel(AComponent));
T_ROUNDED_PANEL:
RoundedPanel_UpdateColor(TdbPanel(AComponent));
T_ROUNDED_BUTTON:
RoundedButton_UpdateColor(TdbButton(AComponent));
T_ROUNDED_CHECKBOX:
RoundedCheckbox_UpdateColor(TdbCheckbox(AComponent));
T_ROUNDED_RADIOBOX:
RoundedRadiobox_UpdateColor(TdbCheckbox(AComponent));
T_ROUNDED_GRID:
RoundedGrid_UpdateColor(TdbStringGridEx(AComponent));
T_ROUNDED_COMBOBOX:
RoundedCombobox_UpdateColor(TdbComboBox(AComponent));
T_PARENT_COMBOBOX:
ParentCombobox_UpdateColor(TdbEdit(AComponent));
T_ROUNDED_MEMO:
RoundedMemo_UpdateColor(TdbMemo(AComponent));
T_ROUNDED_PAGECONTROL:
RoundedPagecontrol_UpdateColor(TdbPageControl(AComponent));
T_ROUNDED_DATEPICKER:
RoundedDatePicker_UpdateColor(TdbDateTimePicker(AComponent));
T_IMAGE_EDIT:
ImageEdit_UpdateColor(TdbImage(AComponent));
T_ROUNDED_EDIT:
RoundedEdit_UpdateColor(TdbEdit(AComponent));
T_FILESTORE:
FileStore_UpdateColor(TdbEdit(AComponent));
T_ROUNDED_TREE:
RoundedTree_UpdateColor(TdbStringGridEx(AComponent));
T_PHONE_EDIT:
PhoneEdit_UpdateColor(TdbEdit(AComponent));
T_EDIT_PAGECONTROL:
EditPagecontrol_UpdateColor(TdbPageControl(AComponent));
T_ROUNDED_SPLITTER:
RoundedSplitter_UpdateColor(TdbPanel(AComponent));
T_MAIN_MENU:
MainMenu_UpdateColor(TdbPanel(AComponent));
T_WIDGET:
Widget_UpdateColor(TdbPanel(AComponent));
T_SCROLL_BAR:
ScrollBar_UpdateColor(TdbPanel(AComponent));
T_ROUNDED_COLOR_EDIT:
RoundedColorEdit_UpdateColor(TdbEdit(AComponent));
T_CURRENCY_EDIT:
CurrencyEdit_UpdateColor(TdbEdit(AComponent));
T_NEWS_PANEL:
NewsPanel_UpdateColor(TdbPanel(AComponent));
T_DROP_DOWN_PANEL:
DropDownPanel_UpdateColor(TdbPanel(AComponent));
T_POP_UP_PANEL:
PopUpPanel_UpdateColor(TdbPanel(AComponent));
T_TOOLBAR:
ToolBar_UpdateColor(TdbPanel(AComponent));
T_ROUNDED_LIGHT_COMBO:
RoundedLightCombo_UpdateColor(TdbEdit(AComponent));
T_TASK_LEGEND_PANEL:
TaskLegendPanel_UpdateColor(TdbPanel(AComponent));
end;
except
ErrMsg('VC_UpdateColor(' + AComponent.Name + ')');
end;
end;
procedure RoundedLabel_UpdateColor(ALabel: TdbLabel);
// обновить цвет
var
S: TShape;
tmpForm: TAForm;
tmpName: string;
begin
CForm(ALabel, tmpForm);
tmpName := DeleteClassName(ALabel.Name);
//
ALabel.Color := Colors_Get(LABEL_COLOR);
ALabel.Font.Color := Colors_Get(LABEL_TEXT_COLOR);
if not ALabel.Transparent then
begin
S := TShape(tmpForm.FindComponent(T_SHAPE + tmpName + SX_RIGHT));
S.Pen.Color := ALabel.Color;
S.Brush.Color := ALabel.Color;
end;
end;
Unfortunately, I don’t have a simple example, but I hope the principle itself will be clear.
39 2024-01-22 07:36:53
Re: Запутался в связях (38 replies, posted in Russian)
Вот пример создания Мемо с закруглениями:
procedure RoundedMemo_Create(AMemo: TdbMemo);
// создание
// если в свойстве TEXT указать NOFRAME, то отображение будет без рамки; COPY_TO_CLIPBOARD - добавляет кнопку копирования в буфер обмена
var
s: TShape;
tmpLabel: TdbLabel;
tmpLabelLimit: TdbLabel;
tmpForm: TAForm;
tmpName: string;
tmpImage: TdbImage;
tmpImageName: string;
tmpPanel: TdbPanel;
tmpParam: array of string; // параметры
tmpBPanel: TdbPanel;
i: integer;
begin
tmpParam := SplitString(AMemo.Text, '%');
AMemo.Text := '';
CForm(AMemo, tmpForm);
tmpName := DeleteClassName(AMemo.Name);
// панель - подложка
tmpPanel := TdbPanel.Create(tmpForm);
tmpPanel.Name := T_PANEL + tmpName + SX_BACK;
tmpPanel.Caption := '';
tmpPanel.Parent := AMemo.Parent;
tmpPanel.BevelWidth := 0;
tmpPanel.Top := AMemo.Top;
tmpPanel.Left := AMemo.Left;
tmpPanel.Width := AMemo.Width;
tmpPanel.Height := AMemo.Height;
tmpPanel.Anchors := AMemo.Anchors;
// пересаживаем на неЄ мемку
AMemo.Parent := tmpPanel;
AMemo.Top := 0;
AMemo.Left := 0;
//
AMemo.BorderStyle := bsNone;
SetFont(AMemo.Font, FORM_TEXT_SIZE);
if (Length(tmpParam) = 1) and (tmpParam[0] = 'NOFRAME') then
begin // нет рамки и надписи - используетс¤ дл¤ отображени¤ на панели
AMemo.TagString := 'NOFRAME'
end
else
begin
// красивая рамка состоит из 10-ти элементов
// верхний левый угол
s := TShape.Create(tmpForm);
s.Name := T_SHAPE + tmpName + SX_TOP_LEFT;
s.Parent := tmpPanel;
s.Shape := stCircle;
s.Top := 0;
s.Left := 0;
s.Height := RP_SIZE;
s.Width := RP_SIZE;
s.Anchors := akTop + akLeft;
// верхний правй угол
s := TShape.Create(tmpForm);
s.Name := T_SHAPE + tmpName + SX_TOP_RIGHT;
s.Parent := tmpPanel;
s.Shape := stCircle;
s.Top := 0;
s.Left := tmpPanel.Width - RP_SIZE;
s.Height := RP_SIZE;
s.Width := RP_SIZE;
s.Anchors := akTop + akRight;
// нижний левый угол
s := TShape.Create(tmpForm);
s.Name := T_SHAPE + tmpName + SX_BOTTOM_LEFT;
s.Parent := tmpPanel;
s.Shape := stCircle;
s.Top := AMemo.Height - RP_SIZE;
s.Left := 0;
s.Height := RP_SIZE;
s.Width := RP_SIZE;
s.Anchors := akBottom + akLeft;
// нижний правый угол
s := TShape.Create(tmpForm);
s.Name := T_SHAPE + tmpName + SX_BOTTOM_RIGHT;
s.Parent := tmpPanel;
s.Shape := stCircle;
s.Top := tmpPanel.Height - RP_SIZE;
s.Left := tmpPanel.Width - RP_SIZE;
s.Height := RP_SIZE;
s.Width := RP_SIZE;
s.Anchors := akBottom + akRight;
// горизонтальна¤ полоска
s := TShape.Create(tmpForm);
s.Name := T_SHAPE + tmpName + SX_HORIZ;
s.Parent := tmpPanel;
s.Shape := stRectangle;
s.Top := RP_SIZE div 2;
s.Left := 0;
s.Height := tmpPanel.Height - RP_SIZE;
s.Width := tmpPanel.Width;
s.Anchors := akBottom + akRight + akTop + akLeft;
// вертикальна¤ полоска
s := TShape.Create(tmpForm);
s.Name := T_SHAPE + tmpName + SX_VERT;
s.Parent := tmpPanel;
s.Shape := stRectangle;
s.Top := 0;
s.Left := RP_SIZE div 2;
s.Height := tmpPanel.Height;
s.Width := tmpPanel.Width - RP_SIZE;
s.Anchors := akBottom + akRight + akTop + akLeft;
// верхн¤¤ горизонтальна¤ лини¤
s := TShape.Create(tmpForm);
s.Name := T_SHAPE + tmpName + SX_TOP;
s.Parent := tmpPanel;
s.Shape := stRectangle;
s.Top := 0;
s.Left := RP_SIZE div 2;
s.Height := 1;
s.Width := tmpPanel.Width - RP_SIZE;
s.Anchors := akRight + akTop + akLeft;
// нижн¤¤ горизонтальна¤ лини¤
s := TShape.Create(tmpForm);
s.Name := T_SHAPE + tmpName + SX_BOTTOM;
s.Parent := tmpPanel;
s.Shape := stRectangle;
s.Top := tmpPanel.Height - 1;
s.Left := RP_SIZE div 2;
s.Height := 1;
s.Width := tmpPanel.Width - RP_SIZE;
s.Anchors := akBottom + akRight + akLeft;
// лева¤ вертикальна¤ лини¤
s := TShape.Create(tmpForm);
s.Name := T_SHAPE + tmpName + SX_LEFT;
s.Parent := tmpPanel;
s.Shape := stRectangle;
s.Top := RP_SIZE div 2;
s.Left := 0;
s.Height := tmpPanel.Height - RP_SIZE;
s.Width := 1;
s.Anchors := akBottom + akTop + akLeft;
// права¤ вертикальна¤ лини¤
s := TShape.Create(tmpForm);
s.Name := T_SHAPE + tmpName + SX_RIGHT;
s.Parent := tmpPanel;
s.Shape := stRectangle;
s.Top := RP_SIZE div 2;
s.Left := tmpPanel.Width - 1;
s.Height := tmpPanel.Height - RP_SIZE;
s.Width := 1;
s.Anchors := akBottom + akRight + akTop;
// надпись
tmpLabel := TdbLabel.Create(tmpForm);
tmpLabel.Name := T_LABEL + tmpName + SX_CAPTION;
tmpLabel.Parent := tmpPanel.Parent;
tmpLabel.Alignment := taLeftJustify;
tmpLabel.Caption := AMemo.Hint;
//
if isRequiredMark(tmpLabel.Caption) then
tmpLabel.Tag := TG_REQUIRED_FIELD;
//
tmpLabel.Top := tmpPanel.Top - tmpLabel.Height - 10; // - 2
tmpLabel.Left := tmpPanel.Left; // AEdit.Left;
SetFont(tmpLabel.Font, EDIT_CAPTION_FONT_SIZE);
if (Length(tmpParam) = 2) and (tmpParam[0] = 'CHECK_LENGTH') then
begin
// добавляем контрол отображения лимита
tmpLabelLimit := TdbLabel.Create(tmpForm);
tmpLabelLimit.Name := T_LABEL + tmpName + SX_TOP_RIGHT;
// лимит храним в теге
tmpLabelLimit.Tag := StrToInt(tmpParam[1]);
tmpLabelLimit.Parent := tmpPanel.Parent;
tmpLabelLimit.Alignment := taRightJustify;
tmpLabelLimit.Anchors := AMemo.Anchors;
tmpLabelLimit.Autosize := False;
SetFont(tmpLabelLimit.Font, EDIT_CAPTION_FONT_SIZE);
// положение на экране
tmpLabelLimit.Top := tmpLabel.Top;
tmpLabelLimit.Left := tmpLabel.Left;
tmpLabelLimit.Height := tmpLabel.Height;
tmpLabelLimit.Width := tmpPanel.Width;
// обработчик на изменение данных
AMemo.OnChange := @RoundedMemo_CheckLimit;
RoundedMemo_CheckLimit(AMemo);
end;
// коррекци¤ по ширине
AMemo.Width := AMemo.Width - 16;
AMemo.Height := AMemo.Height - 16;
AMemo.Left := AMemo.Left + 8;
AMemo.Top := AMemo.Top + 8;
// положение на экране
for i := 0 to Length(tmpParam) - 1 do
begin
if tmpParam[i] = 'COPY_TO_CLIPBOARD' then
begin
// добавляем панель с кнопкой правее основной панели
tmpBPanel := TdbPanel.Create(tmpForm);
tmpBPanel.Name := T_PANEL + tmpName + SX_BUTTON_PANEL;
tmpBPanel.Caption := '';
tmpBPanel.Parent := tmpPanel.Parent;
tmpBPanel.BevelWidth := 0;
//
tmpBPanel.Height := 33; // уточнить
tmpBPanel.Top := tmpPanel.Top + tmpPanel.Height - tmpBPanel.Height;
tmpBPanel.Width := tmpBPanel.Height;
tmpBPanel.Left := tmpPanel.Left + tmpPanel.Width - tmpBPanel.Width;
// коррктировка ширины основной панели
tmpPanel.Width := tmpPanel.Width - tmpBPanel.Width - 4;
tmpBPanel.Tag := 1; // признак наличия кноки
// якоря зависят от якорей основной панели
if tmpPanel.Anchors AND akRight then
tmpBPanel.Anchors := akRight
else
tmpBPanel.Anchors := akLeft;
//
if tmpPanel.Anchors AND akBottom then
tmpBPanel.Anchors := tmpBPanel.Anchors + akBottom
else
tmpBPanel.Anchors := tmpBPanel.Anchors + akTop;
// добавляем кнопку
tmpBPanel.TagString := 'CopyToClipboard';
PanelButton_Create('CopyToClipboard', tmpBPanel, -1, 'RoundedMemo_CopyToClipboard',
'Скопировать текст в буффер обмена');
break;
end;
end;
end;
end;
Выглядит так:
Использование. На форму накидывается обычный TdbMemo, затем в скрипте вызывается RoundedMemo_Create(), в который передается ссылка на компонент. Процедура добавляет красоты и функциональности.
40 2024-01-21 08:09:51
Re: Запутался в связях (38 replies, posted in Russian)
Do you have an example on how to do these designs? The rounded boxes look nice, how about the special icons next to the window controls?
I had to “invent” and create many components myself (date input, scroll bar, checker, etc.). But this process was not completed: the color of the drop-down list is not controlled, problems with tables (color of scroll bars and footer/header lines). A lot of code was written, a whole library of “virtual classes”, but for a private project. Perhaps after some time I will have the opportunity to publish applied solutions.
41 2024-01-19 12:17:40
Re: обработка всех записей db (7 replies, posted in Russian)
Наверное, это работает... Для 10 строк в таблице. И даже для 30. Но если их больше ста, то бедная база.... попробуйте убрать SQL-запрос из цикла: включите его в основной запрос для выборки данных, а результат разместите в невидимой колонке.
42 2024-01-19 12:06:34
Re: Запутался в связях (38 replies, posted in Russian)
Отличный дизайн интерфейса!
Насчет скруглений - можно заморочиться и сделать так:
1) убрать штатные границы и добавить картинки с нарисованными круглыми рамками
2) убрать штатные границы и добавить TShape c закругленными углами.
3) убрать штатные границы и рисовать на канве формы/панелей
Первый способ дает больше красоты, но дизайн жёстко привязывается к размеру форм и компонентов. Второй боле гибкий, но нужно писать много кода. Третий не пробовал )))
43 2024-01-12 12:09:16
Re: Cashier system (4 replies, posted in General)
Я делал проект с кассой, но маленький и в нем использовался сканер штрих-кодов.
Этот проект я внедрял в сервисную программу https://myvisualdatabase.com/forum/view … hp?id=6853
если не разберетесь, пишите!I did a project with a cash register, but it was small and it used a barcode scanner.
I implemented this project into the service program https://myvisualdatabase.com/forum/view ... hp?id=6853
If you don't understand, write!
Фигасе маленький. Да тут без проектной документации не разобраться...
I wouldn't say it's small.
It’s impossible to figure this out without project documentation.
P.S. Из плюсов отмечу возможность локализации.
44 2024-01-12 11:56:39
Re: Запутался в связях (38 replies, posted in Russian)
Обычно формируют два SQL-запроса по одному ID. Первый запрос для шапки документа, второй - для детализации.
SELECT * FROM acts
LEFT JOIN MyFirm ON MyFirm.id = acts.id_MyFirm
LEFT JOIN ConuterParty ON ConuterParty.id = acts.id_ConuterParty
WHERE act.id = <значение>
SELECT * FROM ActsPosition
LEFT JOIN nomenclature ON nomenclature.id = ActsPosition.id_nomenclature
WHERE ActsPosition.id_acts = <значение>
Первый запрос возвращает реквизиты документа, второй - все записи, которые относятся к документу:
45 2024-01-12 06:43:14
Re: Cashier system (4 replies, posted in General)
It is unlikely that you will find a ready-made free project that fully meets your needs.
There are many opportunities on this forum: find a ready-made similar solution, find tips for creating the application you need yourself, or find a specialist who will create the software product you need. So what are you looking for? Formulate your requirements more precisely.
46 2024-01-12 06:31:14
Re: Запутался в связях (38 replies, posted in Russian)
А зачем вам привязываться к одной таблице? Поищите на форуме скрипты, которые позволяют формировать отчет из любого количества таблиц и параметров.
Если не найдете, то посмотрите здесь:
https://k245.ru/software-ru/clearapp.html
Модуль: report.pas
Процедура: Report_Open()
Пример использования:
https://k245.ru/mvdb/linejnyj-raskroj.html
UserApp_LinearCalc_Report()
47 2024-01-11 08:58:16
Re: Show specific record from database into textbox (3 replies, posted in Script)
There is one caveat. If there are several users in the database with the same name, then you need to decide how to display the search result. Typically in this case the result is displayed as a comma separated list of values. The group_concat() SQL-function will help in implementing such functionality.
procedure option1 (Sender: TObject);
begin
form1.edit2.text := sqlexecute('select GROUP_CONCAT(age,",") from example where name = "'+form1.edit1.text+'"');
end;
48 2024-01-09 08:23:57
Re: Creating Treeview like panel with new entries and groups (27 replies, posted in Database applications)
Hello,
Can this be done with MVD?
Add a treeview to create and select entries,
then auto-display previously filled form fields when selecting treeview entries.Adding new entries.
Create groups.
Filter groups from the form data.
Here is a 3 minutes Youtube ID of the reference video.
o6wqnpdtFQg0:10 Clicking treeview entries / auto-display in form
0:31 Creating new entries / filling the form
1:02 Creating Groups
1:19 Filtering groups using form data
1:40 default / pre-made data in databaseThank you for your insights.
I am sure that all this can be done at the MVDB. But scripts will be required to implement functions such as displaying data in the work area depending on the selected tree element. Most of all you will have to tinker with the mechanism of smart groups, but it can also be implemented. But you need to start not with the interface, but with the data structure. And everything else will follow. ))
There are two implementation options: 1) place all interface elements on one form (use TdbPageControl); 2) use several forms, displaying them on the main form. The first one is easier in the short term, the second one is better in the long term.
But again, you need to start with the data structure.
49 2024-01-07 13:35:33
Re: Display a table from right to left (4 replies, posted in General)
Unfortunately, the table columns are displayed from left to right. But you can add the first empty column and achieve the desired visual effect by setting the width of the first (empty) and all other data columns with a script.
50 2023-12-28 09:50:21
Re: Training courses for developers. Articles about application developmen (93 replies, posted in General)
TColorEdit
My Visual Database. Composant d'édition de couleurs DIY TColorEdit.
https://k245.ru/fr/mvm-fr/tcoloredit-3.html
Traduction : Yann Yvnec