maxkyl
Приложите пожалуйста ваш проект, проверю, если не получиться, реализую скриптом.
3,676 2017-02-22 19:32:13
Re: TableGrid1 (7 replies, posted in Russian)
3,677 2017-02-22 18:36:00
Re: TableGrid1 (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 2017-02-22 18:28:45
Re: automatically show dbedit (3 replies, posted in General)
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 2017-02-22 18:27:25
Re: automatically show dbedit (3 replies, posted in General)
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 2017-02-22 18:23:41
Re: Несколько вопросов 5 (38 replies, posted in Russian)
bemorhona-qt
как правило SQL запрос может вернуть только однородные данные, в вашем случае необходимо использовать Отчет, чтобы представить данные в желаемом виде.
3,681 2017-02-22 18:19:28
Re: subform (3 replies, posted in General)
timlitw
Please attach your example project.
3,682 2017-02-22 11:04:48
Re: как сортировать по алфавиту (9 replies, posted in Russian)
ComboBox сортировать мне нужно
У ComboBox есть свойство Sort, установите его значение True
3,683 2017-02-22 11:02:29
Re: About the login Form design (8 replies, posted in General)
Please attach your project (zip file without exe and dll)
3,684 2017-02-21 17:19:32
Re: please help make example this code (8 replies, posted in General)
Hello.
Please let me know which language you need, I will try yo add it.
3,685 2017-02-21 17:03:10
Re: delete record with realtionship between table (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;
3,686 2017-02-21 16:55:16
Re: сложение двух значений посредством запроса (18 replies, posted in Russian)
добрый день.
мне, к примеру нужно высчитать среднее число от двух разных значений ( две разные ячейки).
мне надо как поступить, в математическом понимании я знаю как это сделать, а как тут это реализовать?
Здравствуйте.
Если необходимо вывести среднее число от двух ячеек в компонент TableGrid для каждой записи, тогда необходимо использовать вычисляемое поле, пример
(fiel1+field2) / 2
3,687 2017-02-21 16:53:26
Re: Несколько вопросов 5 (38 replies, posted in Russian)
Можете дать пример экспорта данных грида в экзель посредством SQL-запроса?
Используйте кнопку с действием "SQL запрос", который заполнит грид необходимыми данными, затем используйте кнопку с действием "Открыть в Excel"
3,688 2017-02-21 16:51:52
Re: one more question (1 replies, posted in General)
how to change text in the Tgrid header (righit to left)
Try to set property BiDiMode = bgRightToLeft
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;
3,689 2017-02-21 16:45:03
Re: как сортировать по алфавиту (9 replies, posted in Russian)
6katran6
Вам необходимо сортировать TableGrid или ComboBox ?
3,690 2017-02-21 16:44:12
Re: Table Grid and multiple SQL Tables. (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 2017-02-21 16:39:56
Re: About the login Form design (8 replies, posted in General)
How to solve the error "=" in my visual database
Please provide more details.
3,692 2017-02-20 14:54:22
Re: editable on script (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 2017-02-20 13:04:46
Re: Footer to Excel (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 2017-02-20 12:47:41
Re: get http post value (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 2017-02-20 12:44:38
Re: delete record with realtionship between table (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.
3,696 2017-02-20 12:35:34
Re: [Script] Login with username/password with different rights (4 replies, posted in FAQ)
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 2017-02-20 12:28:22
Re: Несколько вопросов 5 (38 replies, posted in Russian)
Уважаемый Дмитрий!
Возник еще один вопрос по поводу вывода данных TableGrid1 в Excel.
На форме имеется TableGrid1 с данными и с подвалом. Также имеется кнопка, которая выводит данные TableGrid1 в Excel, но данные подвала грида туда не попадают. Как вывести данные подвала вместе с данными грида в экзель? Помоему это тоже надо посредством SQL запроса но не знаю как. Дайте ссылку или пример использования пожалуйста.
К сожалению в текущей версии данная возможность не реализована, постараюсь ее реализовать в следующей версии.
3,698 2017-02-20 12:25:29
Re: Wrong number select-Table structure (1 replies, posted in Script)
Hello.
You forgot to describe your question, I see just a screenshot.
3,699 2017-02-20 12:24:06
Re: Reports (48 replies, posted in General)
AD1408
Hello.
For component Reportnote set property StrechMode = smActualHeight
for MasterData1 set property Stretched = True
3,700 2017-02-20 12:13:31
Re: Recent Used Projects (1 replies, posted in General)
Thank you for idea, I will write down it to my plan.