3,676

(7 replies, posted in Russian)

maxkyl
Приложите пожалуйста ваш проект, проверю, если не получиться, реализую скриптом.

3,677

(7 replies, posted in Russian)

Здравствуйте.




В вашем случае необходимо использовать ключевое слово HAVING, попробуйте так:


SELECT
strftime('%d.%m.%Y',in_out.data),
in_out.IDG,
total(in_out.INN),
total(in_out.OUTT),
total(in_out.OUTT)- total(in_out.INN),
total(in_out.discount),
total(in_out.discountOut),
total(in_out.discount)- total(in_out.discountOut)
FROM in_out

WHERE (in_out.data >= {dtFrom}) AND (in_out.data <= {dtTo})

GROUP BY in_out.IDG

HAVING (total(in_out.discount)>0) AND (total(in_out.discountOut)>0) AND ( total(in_out.discount)- total(in_out.discountOut)>0 )

ORDER BY in_out.data

3,678

(3 replies, posted in General)

zahar2002 wrote:

what the reverse off this script
frmEmployee.Edit12.Text := SQLExecute('SELECT TotalD FROM conge WHERE id='+inttostr(frmEmployee.TableGrid1.dbitemid));
i want save record from table to table or bdedit.value

SQLExecute('INSERT INTO conge (TotalID) VALUES('+frmEmployee.Edit1.sqlValue+')');

3,679

(3 replies, posted in General)

zahar2002 wrote:

hello evryone
how to show automatically sub (records) in dbedit i mean with relation   look at the photos
and my project
user&password  admin/admin


Unfortunately I can't find any photos in your post.

3,680

(38 replies, posted in Russian)

bemorhona-qt
как правило SQL запрос может вернуть только однородные данные, в вашем случае необходимо использовать Отчет, чтобы представить данные в желаемом виде.

3,681

(3 replies, posted in General)

timlitw
Please attach your example project.

6katran6 wrote:

ComboBox сортировать мне нужно

У ComboBox есть свойство Sort, установите его значение True

3,683

(8 replies, posted in General)

Please attach your project (zip file without exe and dll)

3,684

(8 replies, posted in General)

Hello.


Please let me know which language you need, I will try yo add it.

3,685

(11 replies, posted in General)

If you enable Cascade delete, you will not to get a message, like in the first your post.


procedure Form1_bDelete_OnClick (Sender: string; var Cancel: boolean);
begin
    if MessageDlg('Deleting this record you can loose other informations', mtConfirmation, mbYes+mbNo, 0) = mrNo then
    begin
        Cancel := True;
    end;
end;
stas.kodpi wrote:

добрый день.
мне, к примеру нужно высчитать среднее число от двух разных значений ( две разные ячейки).
мне надо как поступить, в математическом понимании я знаю как это сделать, а как тут это реализовать?

Здравствуйте.


Если необходимо вывести среднее число от двух ячеек в компонент TableGrid для каждой записи, тогда необходимо использовать вычисляемое поле, пример

(fiel1+field2) / 2

3,687

(38 replies, posted in Russian)

bemorhona-qt wrote:

Можете дать пример экспорта данных грида в экзель посредством SQL-запроса?

Используйте кнопку с действием "SQL запрос", который заполнит грид необходимыми данными, затем используйте кнопку с действием "Открыть в Excel"

3,688

(1 replies, posted in General)

zahar2002 wrote:

how to change text in the Tgrid header (righit to left)

Try to set property BiDiMode = bgRightToLeft


zahar2002 wrote:

and disable onclick sorting asecending descending in the header

procedure Form1_TableGrid1_OnChange (Sender: string);
begin
    Form1.TableGrid1.Columns[0].Options := Form1.TableGrid1.Columns[0].Options - coCanClick; // 1 column
    Form1.TableGrid1.Columns[1].Options := Form1.TableGrid1.Columns[1].Options - coCanClick; // 2 column
    Form1.TableGrid1.Columns[2].Options := Form1.TableGrid1.Columns[2].Options - coCanClick; // 3 column
end;

6katran6
Вам необходимо сортировать TableGrid или ComboBox ?

3,690

(4 replies, posted in General)

Hello.

Please attach your project (zip file without exe and dll), and let me know name of form where the TableGrid placed.

3,691

(8 replies, posted in General)

robinsonmunte wrote:

How to solve the error "=" in my visual database

Please provide more details.

3,692

(2 replies, posted in General)

Hello.


Please download latest beta version
https://www.dropbox.com/s/xf20ksdbdgj6w … b.zip?dl=0


    Form1.TableGrid1.AllowCreate := True;
    Form1.TableGrid1.AllowCreateEmpty := True;
    Form1.TableGrid1.AllowDelete := True;

    Form1.TableGrid1.SecondClickEdit := True;


But to enable Edit records, you should also call method dbUpdate

    Form1.TableGrid1.AllowEdit := True;
    Form1.TableGrid1.dbUpdate;

3,693

(1 replies, posted in General)

Hello.


Unfortunately it's not support in the current version, but I will try to add this in the next version.


Thanks.

3,694

(6 replies, posted in SQL queries)

If you have problem with all Web sites, I think you have some firewall which blocked http queries from app.


Please check it out
https://www.sevenforums.com/tutorials/5 … ption.html

3,695

(11 replies, posted in General)

Hello.


You can not delete record, if this record have relationship from another table.


For example, you cannot delete an employee record from the Employees table if there are orders assigned to that employee in the Orders table. You can, however, choose to delete a primary record and all related records in one operation by selecting the Cascade Delete options for foreign key.

http://myvisualdatabase.com/help_en/database/relationship.png

stelios91 wrote:

i copied the whole script, crated the right forms with the same names and replaced what had to be replaced.
Its not working for me and its not even hiding the password when i try it.... maybe it has something to do with the suser at the start?
Im almost noob btw. The text boxes and everything is named correctly. no errors when starting the exe

Ofter mistake is when you just copy events of procedures to your script, but you should create them, please check it out, how to create events for components:
http://myvisualdatabase.com/help_en/scr … rview.html

3,697

(38 replies, posted in Russian)

bemorhona-qt wrote:

Уважаемый Дмитрий!
Возник еще один вопрос по поводу вывода данных TableGrid1 в Excel.
На форме имеется TableGrid1 с данными и с подвалом. Также имеется кнопка, которая выводит данные TableGrid1 в Excel, но данные подвала грида туда не попадают. Как вывести данные подвала вместе с данными грида в экзель? Помоему это тоже надо посредством SQL запроса но не знаю как. Дайте ссылку или пример использования пожалуйста.

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

3,698

(1 replies, posted in Script)

Hello.


You forgot to describe your question, I see just a screenshot.

3,699

(48 replies, posted in General)

AD1408
Hello.


For component Reportnote set property StrechMode = smActualHeight


for MasterData1 set property Stretched = True

3,700

(1 replies, posted in General)

Thank you for idea, I will write down it to my plan.