7,776

(14 replies, posted in General)

tcoton
Please, send me your project to support@drive-software.com
or attach your ptoject here (without exe and dll)

7,777

(3 replies, posted in Russian)

Kvanterman
Извиняюсь за задержку с ответом.


Пожалуйста, используйте для этого компонент Memo (Многострочное текстовое поле) http://myvisualdatabase.com/help_ru/components/memo.png

C помощью скрипта Вы можете изменить шаблон отчета у кнопки с действием Отчет

Form1.ButtonReport.dbReportFile:='print.fr3'; 

7,779

(1 replies, posted in Russian)

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


вы можете создать вычисляемое поле, примерно такого содержания

fieldname1 || ' ' || fieldname2

затем добавить данное вычисляемое поле в настройки кнопки Поиск или в настройках компонента TableGrid

7,780

(6 replies, posted in Russian)

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


Пока такой возможности к сожалению нет.


В качестве альтернативы, могу посоветовать посмотреть данное видео, как подключиться к удаленному рабочему столу без статического IP
https://www.youtube.com/watch?v=MYqv0JhX5X0

7,781

(16 replies, posted in Script)

I think just forgot about it )

7,782

(4 replies, posted in Script)

tcoton wrote:

And how to display the records into a grid when getting the variable from a textbox?

I think the same question, to which I replied at this topic
http://myvisualdatabase.com/forum/viewtopic.php?id=1118

7,783

(14 replies, posted in General)

tcoton
Your script is incorrect, please try this, but this example works only in the latest beta version 1.50
https://www.dropbox.com/s/0m799p8qxh5kb … 0.zip?dl=0


procedure Form1_Button5_OnClick (Sender: string; var Cancel: boolean);
var
    sPCName: string;
begin
    sPCName := Admin.EditPCName.sqlValue; // get current PCName

    Admin.TableGrid1.dbSQL:='SELECT PCName, id_Pc_Typ, Maint_details, Maint_Date FROM Maintenance WHERE PCName="'+sPCName+'"';
    Admin.TableGrid1.dbListFieldsNames :='PC Name,Model,Details Maint,Date Maint'; 
    Admin.TableGrid1.dbSQLExecute;
end;

also you can download the example
http://myvisualdatabase.com/forum/misc. … download=1
(fill TableGrid result of the SQL query using script)

7,784

(11 replies, posted in General)

The reason is that your try Update data (Form1.TableGrid1.dbUpdate) in TableGrid that has no data.
unfortunately I can not figure out what exactly you want to implement?

7,785

(3 replies, posted in General)

Yes, in the event OnShow of main form, you should put code

Form1.ButtonExcel.Enabled := False;

7,786

(2 replies, posted in Reports)

Montenegr0 wrote:

i think i solved the problem... not the way i want it was but i thin i got it XD

another question, how to can i send the information of one checkbox to the report?

In the current version you can do it using action of button "Report (SQL)"

Example:

SELECT

firstname,
lastname,
{ChekcBox1}

FROM tablename

where {ChekcBox1} is name of component on the form.
in the same manner you can send the information from any component to report.

7,787

(16 replies, posted in Script)

To specify any colour, you can use the number hexadecimal
Example: Form1.Label1.Font.Color := $00DDEEFF;
where: FF - red, EE - green, DD - blue.


In addition, you can use the text label colours
Example: Form1.Label1.Font.Color := clWindowText;
Example: Form1.Label1.Font.Color := clRed;


The following list the color constants:
clBlack - Black
clMaroon - Maroon
clGreen - Green
clOlive - Olive green
clNavy - Navy blue
clPurple - Purple
clTeal - Teal
clGray - Gray
clSilver - Silver
clRed - Red
clLime - Lime green
clYellow - Yellow
clBlue - Blue
clFuchsia - Fuchsia
clAqua - Aqua
clWhite - White


The list the colors that map to the closest matching color in the system palette:
clDefault - The default color for the control to which the color is assigned.
clActiveBorder - Current border color of the active window.
clActiveCaption - Current color of the title bar of the active window.
clAppWorkSpace - Current color of the application workspace.
clBackground - Current background color of the Windows desktop.
clBtnFace - Current color of a button face.
clBtnHighlight - Current color of the highlighting on a button.
clBtnShadow - Current color of a shadow cast by a button.
clBtnText - Current color of text on a button.
clCaptionText - Current color of the text on the title bar of the active window.
clGradientActiveCaption - Windows 98 or Windows 2000: Right side color in the color gradient of an active window's title bar. clActiveCaption specifies the left side color.
clGradientInactiveCaption - Windows 98 or Windows 2000: Right side color in the color gradient of an inactive window's title bar. clInactiveCaption specifies the left side color.
clGrayText - Current color of text that is dimmed.
clHighlight - Current background color of selected text.
clHighlightText - Current color of selected text
clHotLight
clInactiveBorder - Current border color of inactive windows.
clInactiveCaption - Current color of the title bar of inactive windows.
clInactiveCaptionText - Current color of the text on the title bar of an inactive window.
clInfoBk - Windows 95 or NT 4.0 only: Background color for tool tip controls.
clInfoText - Windows 95 or NT 4.0 only: Text color for tool tip controls.
clMenu - Current background color of menus.
clMenuBar
clMenuHighlight
clMenuText - Current color of text on menus.
clScrollBar - Current color for the of scroll bar track.
cl3DDkShadow - Windows 95 or NT 4.0 only: Dark shadow for three-dimensional display elements.
cl3DLight - Windows 95 or NT 4.0 only: Light color for three-dimensional display elements (for edges facing the light source).
clWindow - Current background color of windows.
clWindowFrame - Current color of window frames.
clWindowText - Current color of text in windows.

7,788

(1 replies, posted in Script)

Hello,


This button displays the list functions and classes available to you using script.
The script is a programming language Object Pascal or Delphi, thus for learnig the script, you can read any book about Delphi.

7,789

(187 replies, posted in General)

Thank you for your ideas )

7,790

(14 replies, posted in General)

tcoton
Your code (procedure Admin_maint_add_OnClick) should be working.
Please, send me your project to support@drive-software.com with link at this topic, or attach your project here.

7,791

(3 replies, posted in General)

Example:

procedure Form1_TableGrid1_OnChange (Sender: string);
begin
     Form1.ButtonExcel.Enabled := Form1.TableGrid1.RowCount>0;
end;

7,792

(2 replies, posted in General)

asperen1959
Please, download en example, how to calculate on the form.
http://myvisualdatabase.com/forum/misc. … download=1

megood70
Sorry for delay.
Unfortunately the current version is not possible.

7,794

(11 replies, posted in General)

rjkantor
Sorry for delay.
Please, send me your project, which receiving an access violation.
In your attached file Demo.zip no script.



and you must escape keyword Transaction in SQL query, like [Transaction] (is a reserved word)

select [Transaction].[year], coin.[desc] from [Transaction]
left outer join [coin] on [transaction].[id_coin]=coin.[id]

7,795

(1 replies, posted in General)

Sorry for delay.
Your application is to be expired after 60 days.

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

if frmOpozdun.dbAction = 'NewRecord' then 
begin
    frmOpozdun.ComboBox2.dbItemID := idOtdel;
    frmOpozdun.ComboBox2.DoOnChange;

    frmOpozdun.DateTimePicker1.MinDate := Trunc(now)-5; // минимальная возможная дата, сегодняшняя
end else frmAbonent.DateTimePicker1.MinDate := -1; // если например открыли для редактирования записи, то ограничение убираем 

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

ComboBox-ы отделы и сотрудники являются связанными?
тогда попробуйте так

if frmOpozdun.dbAction = 'NewRecord' then 
begin
    frmOpozdun.ComboBox2.dbItemID := idOtdel;
    frmOpozdun.ComboBox2.DoOnChange;
end;

Попробуйте так:

idUser := SQLExecute('SELECT id FROM users WHERE (login = ''' + frmLogin.edUser.Text + ''' AND (password='''+sHash+'''));');
idOtdel := SQLExecute ('SELECT id_Otdely FROM users WHERE id='+IntToStr(idUser));

7,800

(11 replies, posted in General)

rjkantor
Try it:

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
var
    id_Orders: integer;
begin
    id_Orders := SQLExecute ('SELECT id_Orders FROM Transactions WHERE id=' + IntToStr(Form1.TableGrid1.dbItemID));
    Form1.TableGrid1.dbFilter := 'Transactions.id_Orders=' +  IntToStr(id_Orders);
    Form1.TableGrid1.dbUpdate;
end;