1

(31 replies, posted in General)

i have version 2.8 with minor update license.  do i need to buy new license to use version 3?

2

(1 replies, posted in General)

Is it possible to have the monthcalendar component to bold the date of each day that has a record? 

I want to be able to create a search from a dropdown list (persons name) that shows the records(dates for persons appointments) on the monthcalendar.  I know I can have this information shown on a grid but this way I can view dates with records without having to scroll through a grid.

Having the dates with records in bold would help in scheduling new appointments for a particular person.

3

(2 replies, posted in FAQ)

procedure Form1_Edit1_OnDoubleClick (Sender: string);
begin
    OpenFile('mailto:'+Form1.Edit1.Text);
end;

Is there a way of attaching a report to the email when using this script?

I looked at the script for sending email direct from MVD but this means storing email login/password in MVD which I would rather not do, hence wanting to use my email client (currently Thunderbird).

4

(1 replies, posted in General)

Can I filter a combobox where the user is logged in?  frmLessonLIST.combobox1.dbFilter:='id_users='+IntToStr(idUser);

I have successfully used dbFilter for tablegrid but this doesn't seem to work for combobox.

var
   idUser: integer = -1
procedure frmLogin_Button1_OnClick (Sender: string; var Cancel: boolean);
var
   s: string;
begin
     // SQL query for check user and password
     s := VarToStr(SQLExecute('SELECT count(id) FROM users WHERE (id = ' + frmLogin.ComboBox1.sqlValue + ') AND (password = ''' + frmLogin.edPassword.Text + ''');'));

     // if SQL query found login and password
     if (s <> '0') and (s<>'') then
     begin
          idUser := frmLogin.ComboBox1.dbItemID; // remember user id

          // check admin rights
          s := VarToStr( SQLExecute('SELECT administrator FROM users WHERE (id = '+ frmLogin.combobox1.sqlValue + ');') );
          if s='0' then // if the user does not have administrator privileges, deactivate the button to create other users
          begin
              frmLessonLIST.tablegrid1.dbFilter:='id_users='+IntToStr(idUser); // show records according to user login


     end;

5

(30 replies, posted in General)

Thank you for you quick reply but I found the problem.  There was a mix up with old and new forms and the new form I was developing had the problem but i was looking at the old form. sad  I had put in dd/m/yyyy and this was giving the false data reading!  I will endevour to be more thorough in working out a problem before presenting an issue to you in the future. Sorry for the inconvenience caused.

6

(30 replies, posted in General)

Hi Dimitry, thankyou for your most recent update. I have discovered the datepicker component not showing the date correctly, I checked the data using sqllight studio, it it is storing the data ok.  pics attached.

7

(1 replies, posted in SQL queries)

When I use the following sql statement after 'Save and Close' the report works well, but does not work (ie the report is blank) if the form is only 'Save and do not close'.  What is wrong with this sql statement?

SELECT
tblStudent.fldStudentName,
tblLesson.fldReference,
tblLesson.fldStudentNotes,
tblCompany.fldLogo,
tblLesson.id,
strftime('%d/%m/%Y', fldDateTime),
CASE
        WHEN CAST(strftime('%H', fldDateTime) AS INTEGER) = 12
                THEN strftime('%H:%M', fldDateTime) || ' PM'
        WHEN CAST(strftime('%H', fldDateTime) AS INTEGER) > 12
                THEN strftime('%H:%M', fldDateTime, '-12 Hours') || ' PM'
        ELSE strftime('%H:%M', fldDateTime) || ' AM'
END

FROM tblLesson
LEFT OUTER JOIN tblStudent ON  tblLesson.id_tblStudent=tblStudent.id
LEFT OUTER JOIN tblCompany ON  tblLesson.id_tblCompany=tblCompany.id

WHERE tblLesson.id=$id

8

(1 replies, posted in General)

Hi Dimity,
I have successfully used script texthint for text component, but it doesn't work for memo component.  Is there a way to put a hint in the memo component like I can the text component?  I have attached a picture of the current form.

current script is:

procedure frmTeacher_OnShow (Sender: string; Action: string);
begin
frmTeacher.Edit1.TextHint := 'Enter the teachers name';
frmTeacher.Edit2.TextHint := '0444 444 444';
frmTeacher.Edit3.TextHint := 'sam@sample.com';
frmTeacher.Memo1.TextHint := 'This field appears on the bottom of reports';
end;

thank you.

9

(7 replies, posted in General)

thanks Dimitry, I changed the buttons to Show Form and then used the following script to gain the feature I want

procedure frmStudentList_Button5_OnClick (Sender: string; var Cancel: boolean);
var
       Value1: string;
begin
       Value1 := SQLExecute('SELECT fldStudentName FROM tblStudent WHERE id=' + IntToStr(frmStudentList.TableGrid1.dbItemID) );
       frmLessonLIST.edit1.text := Value1;
end;

10

(7 replies, posted in General)

Thanks Dimitry
the form is frmStudentList
the button I need to open on double click of grid is Button3 (opens frmStudentNew)
the other buttons that open the other forms are Button4 and Button5
it seems that the other forms appear when form frmStudentNew is closed.

11

(7 replies, posted in General)

Hi Jean,  thanks for your reply.  The three buttons in question are all property "Show Record" my question is I only want 1 button to show the record on double click of the grid.  The other 2 buttons are for convenience to show records using different forms so using the mouse to click these is acceptable.

12

(7 replies, posted in General)

I have a form with 3 'show record' buttons 1) Edit 2)Account 3)Lessons; when I double click on the grid (to show a record) it opens the first 'Edit' but when I close the 'Edit' form the next form shows (account) and on closing this form the next form shows (lessons).  I have tried using form1.close; on close of the 'Edit' form but this didn't work.  How can I set the focus to the 'Edit' button and not have the other 2 buttons activate when double clicking on the grid to show a record?

13

(4 replies, posted in General)

here is attachment

14

(4 replies, posted in General)

the form in question is the "Job_Description_EDIT" when saving is not triggering the Form OnClose event.  Project attached.  I have version 1.51

15

(4 replies, posted in General)

Hi, first time question, so I hope to communicate well...
When I use the form event 'onclose' to 'click' a button on another form with a script it works when I click a 'close' button but not when I click the 'save' button which then closes the form.  Is there a script to save the form and then close?  The important thing is to trigger the 'onclose' script.

Thank you.