1,526

(4 replies, posted in General)

Hi Humblelion,
If you want a simple attendance register, you could do it something like the attached.
Each employee selects his name from the combobox and then enters his password.  If the password is correct, he is signed-in (with the date and time).  Exactly the same happens when he signs out from work.
If he successfully signs-in or signs-out, there is a delay of 3 seconds so he can view the update to make sure his details are correct.
Sign in using user 'Admin' and a password of 'Admin' (case sensitive) and you will get access to a second form where you can maintain employee details and also view the passwords for some dummy users that I've set up for testing purposes.
Hope this gives you some ideas,
Derek.

Привет Ffpereverzeff,
Пожалуйста, найдите прикрепленную программу чата, которую я написал несколько лет назад.
Он не пытается делать ничего, кроме обмена сообщениями чата (сохраняет их, если получатель не в сети), поэтому это ОЧЕНЬ просто, но это то, что требовалось в то время.
Чтобы проверить это, просто войдите в систему несколько раз как разные пользователи (все пароли «123»). Используйте «Admin» для настройки новых пользователей.
Возможно, это дает вам некоторые идеи.
Derek
(с гугл переводчиком)

1,528

(6 replies, posted in Russian)

Привет Иван,
Вот пример с 3 вариантами.
Здесь нет 'script' - вы просто изменяете свойства 'fieldname' и 'filter' для 'combobox'.  (см. также включенный скриншот.jpg)
Вариант 1 показывает только товары, которые есть на складе, но вы не знаете, что временно отсутствует на складе.
Вариант 2 показывает все товары и сортирует их в зависимости от того, есть ли они в наличии или нет
Вариант 3 показывает все продукты, сортирует их в зависимости от того, находятся ли они «в наличии» или «нет в наличии», а также показывает текущий уровень запасов.
Это зависит от того, что вы считаете наиболее полезным.
Надеюсь это поможет,
С уважением,
Дерек
(с гугл переводчиком)

1,529

(6 replies, posted in General)

Hi Domebil,
Does doing it like this help you?  (see attached).
Derek.

Привет,
Возможно, вы можете сделать это так (см. Приложение).
Вы также должны установить представление ключа для формы (см. Скриншот).
Derek.
(с гугл переводчиком)

1,531

(3 replies, posted in General)

Hi Sonixax,
On Point 4, as Dmitry says, it's not possible to use 'tab' to move from one field to another.
However, if you tick 'goarrowkeyexitediting' (see attached screenshot), you can use the arrow keys to move from one input column to another.
This also works when you are editing cells in the grid, so you can go up, down, left and right; so it's probably more flexible than 'tab'.
Regards,
Derek.

1,532

(2 replies, posted in General)

Hi Adam,
Does this fix it for you? (see attached).
When I was doing a test, I found it was possible to create a transaction record with a null transactions.id_transtree so I stuck a line of script in to stop it happening (but you may be taking care of this elsewhere, in which case just delete it)
Derek.

1,533

(2 replies, posted in General)

Hello,
Is this the sort of thing you want? (please see attached).
In this example, you search by (partial) name to retrieve a sub-set of rows, then pick a date and update the selected rows. 
If you want to update all rows, just leave the name search field blank.
Regards,
Derek.

Hi,
Yes, it should still work.
However, you might want to force the calculated field to always show to 2 decimal places, in which case you could alter the calculated field format with the 'printf' command (please see attached).
Derek.

Hi,
If I understand your question, perhaps you could use a calculated field (please see attached example).
Regards,
Derek.

1,536

(6 replies, posted in General)

Hi,
Can you attach your project with the 'report sql' button placed on the form so the error can be reproduced?
Derek.

1,537

(5 replies, posted in General)

Hi,
See the attached screenshot.  Set the combobox 'filter' property as shown and also make sure that the 'sort' property is 'false', otherwise this will override the 'filter' property.
But I'm not sure if this is what you mean by 'without hard coding'.
Derek.

Привет Dmitry,,
Это работает именно так, как мне нужно сейчас.
Спасибо,
Derek.

Hi EHW,
Well, don't I feel a fool - LOL!
I could swear I'd tried that first of all with no success before going on to try various cell enabling combinations (none of which worked).  I'll put it down to a 'senior moment'.......
Thanks for the help.
Derek.

Hello Dmitry,
I am using an editable grid with 3 columns (please see attached).
However, I want Column 0 to be read-only, Column 1 to be editable and Column 2 to be editable.
I have tried various options but have been unsuccessful so far.
Can you think of any way to do this?
Thanks,
Derek.

1,541

(2 replies, posted in General)

Hi,
A few different ways depending on exactly what you want to do, but you could try it like this.
Derek.

1,542

(2 replies, posted in General)

Hi Didier,
Please have a look at the attached.
Even though the form object has a property of 'autoscroll', this does not seem to work even when ticked (at least on my configuration) and so you need to explicitly code for it in a script. 
Also (again in my configuration), if your form object has a 'borderstyle' property of 'bsdialog', this will disable the scrollbar (perhaps a couple of small bugs that Dmitry could have a look at).
Regards,
Derek.

1,543

(1 replies, posted in General)

Hi Kees,
Try putting this code in the final section of your script
begin
  form1.tablegrid1.dbpopupmenu.items[0].Enabled := false;   //** where items[0] is the 1st item in the popup list, items[1] is the 2nd item etc etc
end.
If you prefer not to see 'Show Record' grayed out, you can make it invisible like this -
begin
  form1.tablegrid1.dbpopupmenu.items.items[0].Visible := false;
end.
Another way of doing it is to find the text of the item you're trying to disable rather than by using items[0]
begin
  form1.tablegrid1.dbpopupmenu.Items.find('Show Record').enabled := false;
end.   
Please see attached.
Derek.

1,544

(14 replies, posted in General)

Hi,
You just need to add a check in your calculated field to see if any of the fields that are being concatenated are blank.
Try it like this:
ifnull(firstname,'')||' '||ifnull(lname,'')||' '||ifnull(oname,'')
Regards,
Derek.

1,545

(14 replies, posted in General)

Hi,
Perhaps try it like the attached - it seemed the simplest, but I'm sure there are other ways too.
I added a new form just so you can check that the inserts into the 'stdfee' table are working correctly.
Regards,
Derek.
(also just added a check to stop rows being inserted into stdfee table if either 'fee' or 'class' not selected)

1,546

(4 replies, posted in General)

Hi Dynapta, Hi Jean,
Just to expand a little on Jean's reply, you can autofit columns depending on
1.  the header (bfheader),
2.  the data in the column ()
3.  both the data and the header (bfboth). 
You can also specify, for discrete columns
4.  a specific initial column width which can be manually altered,
5.  lock the column width so that the User can't change it.
All of the above are done using a script.  Please see the attached example - in the script, each option is commented out - just remove the '//' against each option then run the example to see the effect. 
You can also use these options in combination - for example, let the data interactively adjust the column by using form1.tablegrid1.bestfitcolumns();  but prevent the User from adjusting, for example, Column0, by using form1.tablegrid1.columns[0].options := form1.tablegrid1.columns[0].options - cofixedsize;
I've probably made that sound way more complicated that it actually is - just play around with the attached example and all will be revealed (I hope - LOL!)
Derek.

1,547

(4 replies, posted in General)

Hello Dynapta,
Please see the attached screenshot.
To sort on multiple fields, select 'Order By' from the 'Sort' drop down box and then enter the tablename.fieldname that you want to sort on (separated by commas). 
'Ascending' is assumed, if you want to change the order, enter 'desc' after the relevant fieldname.
Regards,
Derek.

Hi,
As I understand it, setting 'keypreview' to true basically allows you to process an action (in this example, using the 'enter' key) AT THE FORM LEVEL instead of writing code for each individual object on that form.
Derek.

You have changed the name of the procedure in the script to 'registrationpanel' but you haven't changed the name of the edit field to match this (and it should be 'form1.registrationpanel).
I would strongly advise leaving the names of objects (and the generated names of procedures associated with those objects) as the defaults to avoid these sorts of problems.
I have corrected and simplified what you're trying to do (please see the attachment).
Derek.

Hi,
Perhaps the easiest way is to reformat the date using a calculated field and then just pass it through to the report and not use ReportSQL at all (see attached).
Thanks to DBK for the example.
Derek.