1

(1 replies, posted in General)

While working on SunRise, it was a discovery for me to support the functions YearOf(), MonthOf(), DayOf()
for each date element separately. Perhaps for some, this will also be good news. See example.

2

(2 replies, posted in General)

The main menu on Form1 can be hidden, but can also be displayed at any time,
if necessary, using either the mouse or hotkeys.

Date_Appo = CURRENT_DATE||' 00:00:00.000' - All entries for current day

SUBSTR(Date_Appo, 1, 10) = CURRENT_DATE - All entries for current day

DATE(Date_Appo) LIKE CURRENT_DATE - All entries for current day

Date_Appo LIKE '2024-02-18%' - All entries for current day months

Date_Appo LIKE '2024-02%' - All entries for this month

DATE(Date_Appo) BETWEEN DATE(CURRENT_DATE, '-7 day') AND CURRENT_DATE - All entries for last 7 days

https://www.sqlitetutorial.net/sqlite-like/

https://www.sqlitetutorial.net/sqlite-between/

https://www.sqlitetutorial.net/sqlite-in/

...

Of course you can ask.
I showed you that there are no obstacles in MVD.
You also have hands, you have a head, you have the Internet, reference books... So go ahead.


In addition to appetite, you also need to have a conscience.

5

(10 replies, posted in General)

Option with one field, selection of TOP or child and correct operation of editing TOP and child records.

6

(10 replies, posted in General)

Well why can't we? Can. There is more work in the script....
Don't you want to bypass this? Having created one TOP record, let's say DIRECTORY, and everything else will be child records, STANDS OF POSTCARDS, MAGAZINES, NEWSPAPERS...



If you need it more difficult...
Something like this
Edit the required fields for the entry.

date(Date_Appo) = CURRENT_DATE

Data of type DATE is stored as '2024-02-16 00:00:00.000'. And this is a text format.
When you set your condition, it turns out that '2024-02-16 00:00:00.000' = '2024-02-16' which is FALSE.
Therefore, DATE('2024-02-16 00:00:00.000') will highlight only the date and allow for a correct comparison.
Another possible solution would be to use LIKE.

8

(10 replies, posted in General)

This option is possible for TOP (separate button), child and editing. Everything is as simple as possible.

9

(10 replies, posted in General)

Hi Adam


If only a child record and quite simply, then like this

10

(10 replies, posted in General)

Calculation via Delphi functions.
Another algorithm for calculating sunset and sunrise.

11

(10 replies, posted in General)

Calculation of sunrise and sunset.


Option 3. All calculations are carried out in SQLITE in one query.
Options 1 and 2 also work.
Something like this.

The archive does not contain a folder with the script.

13

(10 replies, posted in General)

Well, if you have already written similar calculations before, ARCSIN ARCCOS ARCTAN ARCTAN2 will not be difficult for you. I only see this as a problem for converting to radians. And this is the first way.
The second way is to use a newer version of SQLITE and perform calculations through it.
Something like this )))

14

(10 replies, posted in General)

MVD doesn't support this.

You can write some simple functions yourself, but most are impossible.
If it's not a secret, what do you want from these libraries?

15

(38 replies, posted in Russian)

Да все именно так.
Для всех панелей создается универсальный OnPaint в котором и отрисовываются границы и закрашивание при необходимости.

При старте формы создаются панели и накладываются компоненты.
В событии OnPaint вызывается процедура отрисовки/перерисовки.
Tag формы использую для запоминания что панели созданы во избежании повторного создания и ошибки.
В некоторых случаях нужно использовать небольшую задержку по таймеру для отрисовки/перерисовки.
Код проще из за упрощения рисования RoundRect.

var
...
  arrFrm: array of TAForm = [Form1, Form2, Form3, Form4, Form5];                      // list of Forms

procedure Form1_OnShow (Sender: TObject; Action: string);
begin
  create(Sender);
end;
...
procedure create(Sender: TObject);
var
  tmpP: TdbPanel;
  i: integer;
  tmpMemo: TdbMemo;
...
  tmpForm: TAForm;
begin
     tmpForm := TAForm(Sender);
      if tmpForm.Components[i] is tdbEdit then                                          // Edit
      begin
        tmpEdit := TdbEdit(tmpForm.Components[i]);
        tmpEdit.borderstyle := bsNone;
        tmpP := tdbpanel.create(tmpForm);
        tmpP.name := 'tmp_'+tmpEdit.name;
        tmpP.Caption := '';
        tmpP.Parent := tmpEdit.Parent;
        tmpP.BevelWidth := 0;
        tmpP.SetBounds(tmpEdit.Left, tmpEdit.Top, tmpEdit.Width, tmpEdit.Height);
        tmpP.Anchors := tmpEdit.Anchors;
    //
        tmpEdit.Parent := tmpP;
        TControl(tmpEdit).SetBounds(4, 2, tmpEdit.Width - 8, tmpEdit.Height - 4);
      end;
...
procedure draw;
var                                                                                   // Draw and ReDraw
  i, f: integer;
  tmpPan: TdbPanel;
begin
    for i := 0 to arrFrm[f].componentcount - 1 do
    begin
      if (arrFrm[f].Components[i] is tdbpanel) and (copy(tdbpanel(arrFrm[f].Components[i]).name, 1, 4) = 'tmp_') then
      begin
        tmpPan := TdbPanel(arrFrm[f].Components[i]);
        tmpPan.canvas.brush.color := clWhite;
        tmpPan.canvas.pen.color := clBlack;
        tmpPan.canvas.roundRect(0, 0, tmpPan.width, tmpPan.height, 10, 10);
      end;
    end;
end;
...
procedure onp(Sender: Tobject);                                                       // OnPaint event
begin
  draw;
end;

16

(38 replies, posted in Russian)

k245 wrote:

Насчет скруглений - можно заморочиться и сделать так:
1) убрать штатные границы и добавить картинки с нарисованными круглыми рамками
2) убрать штатные границы и добавить TShape c закругленными углами.
3) убрать штатные границы и рисовать на канве формы/панелей


Константин,
Я попробовал третий вариант. Рабочий. Только требует дополнительной обработки в событии OnPaint


https://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=10236

17

(38 replies, posted in Russian)

Да Константин, вы полностью правы.


Из той же справки по ФастРепорт. Раздел про рисунки.

Следующий объект, который мы рассмотрим - это объект "Рисунок". Он также довольно часто используется в отчетах. С помощью объекта вы можете вставить в отчет логотип вашей фирмы, фотографию сотрудника или любую другую графическую информацию. Объект способен отображать графику в формате BMP, JPEG, ICO, WMF, EMF.

18

(38 replies, posted in Russian)

Может вы раздел откроете или PDF по фастрепорт скачаете.
Вот например открытый раздел "Построение отчетов" и видим целый раздел "Отчет с картинками".

19

(38 replies, posted in Russian)

Подозреваю, что от вас прячут эту информацию... Но вы не сдавайтесь, попробуйте ещё раз почитать.

20

(38 replies, posted in Russian)

https://www.fast-report.com/documentati … index.html

Roberto,


When checking, it turned out that there were some colors that caused the color switching effect when typing.
I'm posting the corrected version.
Thank you.

Hi Derek, Roberto


Some fixes and improvements have been made.
Completely (hopefully) fixed typing in color in Edit.


P.S.  I am posting the corrected version below in the posts.

23

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

24

(38 replies, posted in Russian)

Занимательно )))

25

(5 replies, posted in Database applications)

jrga wrote:

I'm sorry it doesn't work in MVD 5.6....


Supports versions 5.6 and higher