5,976

(54 replies, posted in Russian)

Havier
Приветствую,

попробуйте выч. поле написать так:

1.0 / Поле1


получите разницы между датами в годах

datefield1 - datefield2

так можно получить разницу между датами в днях

(strftime('%s', datefield1) - strftime('%s', datefield2)) / 86400.0

5,977

(6 replies, posted in General)

BidiMode property woks correctly only on if locale your OS switched to region where reads from right to left instead of left to right.

5,978

(13 replies, posted in Russian)

delphinsl wrote:

Дмитрий, скажите пожалуйста реализована ли или планируется к реализации свойство TableGrid выравнивание по центру заголовков таблицы?

пока это можно сделать только с помощью скрипта

procedure Form1_TableGrid1_OnChange (Sender: string);
begin
    Form1.TableGrid1.Columns[0].Header.Alignment := taCenter; // выравнивание первой колонки
end;

5,979

(13 replies, posted in Russian)

Igor wrote:

Дмитрий, доброе утро!
Подскажите - когда включите кнопку (+) в строках кода у процедур? Не критично, но не очень удобно wink

К сожалению пришлось отключить эту возможность если строк кода более 500, начинает тормозить.
Компонент для подсветки синтаксиса используется сторонний, поэтому пока не могу это самостоятельно исправить.

5,980

(21 replies, posted in Reports)

abouyahya527911
There is no precision method to convert Gregorian date to Hijri date. Sometime there is one day error.

Hello,


To store boolean values in database used integer values like 0 = No, 1 = Yes
If you want return Yes or No from database instead  0 or 1, you should use sql query like that:


SELECT 
field1, 
field2, 
(CASE BoolField WHEN 1 THEN 'Yes' WHEN 0 THEN 'No' ELSE '' END),
field3

FROM tablename

'Yes' and 'No' you can replace on any other words.

5,982

(2 replies, posted in Script)

In the current version there is no Status Bar and Progress Bar, but planned.


But you can create ProgressBar using script, example:
http://myvisualdatabase.com/forum/misc. … download=1

5,983

(6 replies, posted in General)

Please set property of TableGrid BidiMode=bdRightToLeft

5,984

(28 replies, posted in General)

tcoton
About TextHint, fixed, please download again beta version
http://myvisualdatabase.com/forum/viewtopic.php?id=1936


Thanks.

5,985

(28 replies, posted in General)

tcoton
I can't fix it himself, this third-party component, I'll contact with author.
Thanks.

5,986

(12 replies, posted in Russian)

//считаем количество строк в колонке [4,i] со значением 'buy'...
procedure Form1_TableGrid1_OnChange (Sender: string);
var
   i,c,q: integer;
   s: string;
begin
     q := 0;
     c := Form1.TableGrid1.RowCount - 1;
     for i := 0 to c do
         if Form1.TableGrid1.Cells[4,i] = 'buy'  then Inc(q);

     Form1.Label35.Caption := IntToStr(q);
end;

5,987

(12 replies, posted in Russian)

Роман wrote:

На основании этой темы, у меня возникла сложность....
есть TableGrid1 в нём есть колонка "prrofit"...в этой колонки веществ. числа: отрицательные и положительные!
Друзья подскажите как подсчитать количество всех  строк с отрицательными значениями из колонки "prrofit" в TableGrid1
и вывести их количество в Label ?  (в идеале было бы назначить Form1_Button3_OnAfterClick) ...где Button3 это поиск!

                                                                                                            С Уважением и Благодарностью Роман!!!

пример:

procedure Form1_GridAbonent_OnChange (Sender: string);
var
   i,c,q: integer;
   iValue: double;
begin

     q := 0;
     c := Form1.GridAbonent.RowCount - 1;
     for i := 0 to c do
         if ValidFloat(Form1.GridAbonent.Cells[3, i]) then
         begin
             iValue := StrToFloat(Form1.GridAbonent.Cells[3, i]);
             if iValue < 0 then Inc(q);
         end;
     Form1.Label5.Caption := FloatToStr(q);

end;

5,988

(12 replies, posted in Russian)

Для подсчета количества записей, сумм колонки, ср. значение и др, вы можете использовать подвал грида с необходимой формулой, подробней:
http://myvisualdatabase.com/help_ru/com … ooter.html

5,989

(6 replies, posted in Russian)

Приветствую,


Как правило нет нужды в том, чтобы делать две одинаковые таблицы для разных пользователей.
Пожалуйста скачайте данный проект
http://myvisualdatabase.com/forum/misc. … download=1


в проекте можно создать пользователей и администраторов, каждый пользователь имеет доступ только к своим записям, в тоже время администраторы имеют доступ ко всем записям.



На счет импорта в Word, не совсем ясно, имеете ввиду экспорт в Word?
или импорт из Word-a в базу данных?


для объеденения несколько таблиц одинаковой структуры в SQL запросах используется UNION ALL

5,990

(8 replies, posted in General)

jumper
I suppose you got this error message?

---------------------------
Error
---------------------------
Since the database is already created.
Cannot add a NOT NULL field without a default value.

Please enter the default value.

Either you must delete the database file sqlite.db, in order to be automatically recreated.
---------------------------
OK   
---------------------------

Please pay attention to this "Please enter the Default value."

5,991

(3 replies, posted in General)

Hello,


Unfortunately I have no idea why your OS don't allow install My Visual Database, but you can download version without installer
https://www.dropbox.com/s/ul1rf42j31big … a.zip?dl=0



Please send email to sales@drive-software.com about discount.


Thanks.

5,992

(2 replies, posted in General)

Thanks, I'll update the documentation.

5,993

(28 replies, posted in General)

tcoton
Thank you for the bug report, fixed, please download beta version 2.3
Also thank for bug "color coding" I'll check it.

5,994

(5 replies, posted in Russian)

перепроверил, главная форма также разворачивается.
Пожалуйста отправьте ваш проект на support@drive-software.com


посмотрю в чем дело.

5,995

(7 replies, posted in SQL queries)

mathmathou
Because the SQL query is just text, it's ok using IntToStr for Integer values in sql queries.

5,996

(7 replies, posted in SQL queries)

if main_cat > 0 then SQLExecute('UPDATE asset SET id_main_cat='+ IntToStr(main_cat) + ' WHERE id='+ IntToStr(current_asset_id));

5,997

(1 replies, posted in Script)

Hello,


You can using script to set filter for tablegrid, like this

procedure Form1_ComboBox1_OnCloseUp (Sender: string);
begin
    Form2.TableGrid1.dbFilter := 'id_typework' = Form1.ComboBox1.sqlValue;
    Form2.TableGrid1.dbUpdate;
end;

5,998

(28 replies, posted in General)

tcoton
You can change order of focus using property TabOrder, set this property for button or combobox TabOrder=0


Text - for set text to TextBox
Hint - Tooltip text. Set ShowHint=True to activate it.

5,999

(5 replies, posted in Russian)

Я пологаю вам необходимо развернуть форму на весь экран?
Тогда установите свойство формы Sizeable = True
и свойство WindowState = wsMaximized


после чего данная форма по умолчанию будет развернута на весь экран пользователя.


Пожалуйста перед этим скачайте последнюю бета версию 2.3, т.к. пришлось исправить одну ошибку связанную с этим
http://myvisualdatabase.com/forum/viewtopic.php?id=1935

6,000

(28 replies, posted in General)

tcoton wrote:

How do you remove the focus automatically set on the first created textbox? I just created a new project and put a textbox and the focus is on it whatever I do and it is quite annoying.

If you have on form only textbox you can't to hide this focus.