Hi Yandi,
As Sibprogsistem wrote, if you want to see 'age' in the tablegrid, use a calculated field.
If you also need to see 'age' change real-time on the form where you enter the date of birth, you also need to use a script.
Perhaps try it like this (see attached).
Derek.
1,626 2019-08-02 11:01:13
Re: Date of Brith (8 replies, posted in General)
1,627 2019-07-30 16:31:59
Re: Show .ini values in report (7 replies, posted in Reports)
Hi Kristof,
Not sure without seeing the actual project, but can you copy the company information that you need to show to calculated fields and then use the calculated fields in the report?
If not, I think you might have to use reportsql rather than report.
Derek.
1,628 2019-07-28 18:48:33
Re: Accidentally removed relationship from table - cant add it again? (2 replies, posted in General)
Hi Kristof,
I've done that before but have just been able to re-create the relationship with no trouble.
If you attach your project and indicate the tables / relationship you want to re-establish, maybe someone can have a look.
Derek.
1,629 2019-07-26 14:43:13
Re: Adding an extra field to the query results in a broken report (2 replies, posted in Reports)
Hi Kristof,
If you can attach the project and indicate the newly added field, I can have a look and see if I can spot anything.
Derek.
1,630 2019-07-24 17:58:22
Re: monthcalendar - highlight date range (7 replies, posted in General)
Hi Dmitry,
EHWagner has reported that your download is displaying highlighted date ranges correctly on his system so it seems that it might be an issue with Windows XP. I'd appreciate it if you could check this out.
But if there is no easy solution, then there's no need to investigate any further; it's not fair to you or other users to spend time on fixing a problem that may only be affecting me.
Thanks,
Derek.
1,631 2019-07-24 17:49:50
Re: monthcalendar - highlight date range (7 replies, posted in General)
Hi EHW,
I was hoping someone else would be able to check it out with their configuration. I'm suspecting that it might be an issue specific to Windows XP.
Thanks for your help,
Derek.
1,632 2019-07-24 15:08:08
Re: monthcalendar - highlight date range (7 replies, posted in General)
Hi Dmitry,
I downloaded your application to test and the result is the same (there is still a white bar between the start and end dates).
Please see attached screenshot.
Regards,
Derek.
1,633 2019-07-24 10:49:07
Re: monthcalendar - highlight date range (7 replies, posted in General)
Hi Dmitry,
Please see the attached screenshot.
The white bar between the start and end dates makes the dates unreadable.
I'm using MVD5.5 / WindowsXP
Thanks,
Derek.
1,634 2019-07-19 12:17:55
Topic: monthcalendar - highlight date range (7 replies, posted in General)
Hi Dmitry,
Is it possible to change the way in which a selected monthcalendar date range is highlighted?
The current display is a white bar which makes the dates unreadable and not very user friendly..
Would something like the attached screenshot be possible?
Thanks,
Derek.
1,635 2019-07-19 00:33:49
Re: MonthCalendar (4 replies, posted in General)
Hi Terry,
Is the attached the sort of thing that you mean?
Personally, I think it would be more readable if the highlighted colour extended across the entire selected date range rather than 'whiting it out' but I think that's something that Dmitry would have to review - I remember trying to change it a while ago but had no success.
Derek.
1,636 2019-07-15 10:28:38
Re: mac address (7 replies, posted in General)
Hi,
Sorry, I've never done anything like POS before.
Derek.
1,637 2019-07-15 09:22:02
Re: Index number from a list of values. (4 replies, posted in Script)
Hi Hedan,
Not sure if I understand your question correctly, but does the attached help at all?
When you display your combobox, you can concatenate a number of fields together (enclose each one in { }).
So in your example, you can show both the record id and the country.
If you then make the combobox searchable, when you add or edit, you can either enter an ID or value to select the correct record.
Derek.
1,638 2019-07-13 16:34:00
Re: mac address (7 replies, posted in General)
Hi Raheel,
Is this the sort of thing that you want? (see attached)
Derek.
1,639 2019-07-13 13:59:17
Re: How to format date with DayOfWeek ? (6 replies, posted in General)
Hi Agusecc, Dmitry,
An alternative might be to use a calculated field to show the day of the week. Then the calculated field can be used in your report just like any other data fields.
Please see the attached as a simple example.
Regards,
Derek.
1,640 2019-07-12 14:54:28
Re: вычисляемое поле (5 replies, posted in Russian)
Привет Sibprogsistem,
Это помогает?
С уважением,
Derek
1,641 2019-07-12 09:53:30
Re: CALCULATED FIELDS (2 replies, posted in General)
Hi Manix,
If I understand your question corrrectly, putting the 'onchange' event against the calculated field itself won't work because a calculated field, by definition, can only change if the fields involved in its calculation are themselves changed - the 'onchange' event needs to be placed against these fields, not the calculated field.
Please see attached which uses a small script so you can see the changes to the calculated field real time.
Regards,
Derek.
1,642 2019-07-10 08:43:31
Re: showhints (4 replies, posted in General)
Hello Manix,
Make sure that the 'show hint' checkbox object is unchecked and that the 'hint' property is empty (see attached screenshot).
Regards,
Derek.
1,643 2019-07-07 19:48:33
Re: Округление вычисляемого поля (1 replies, posted in Russian)
Привет,
Попробуйте это так:
(select round((x+y-z) * (a/b),2)).
Посмотрите на этот простой пример.
С Уважением,
Derek.
1,644 2019-07-05 10:56:54
Re: Как не отображать дату в DateTimePicker если она не выбрана? (17 replies, posted in Russian)
Привет михаил,
Возможно, вы могли бы сделать это так.
Derek.
(с гугл переводчиком)
1,645 2019-07-03 09:19:31
Re: edit button (6 replies, posted in General)
Hi Manix,
Try it like this
form1.tablegrid1.columns[0].header.caption := ' Edit ';
See attached example (borrowed from EHW's earlier message).
Derek.
1,646 2019-06-29 14:33:26
Re: Movie Oscars database (59 replies, posted in Database applications)
Hi Darek,
I was having a look at your project again.
It seems like users could ask almost any combination of things so I tried to come up with a solution that makes it as flexible as possible (I changed the layout a bit to try and get most things to fit and work off Form1, but it's just cosmetic).
What I've done is basically as follows:
1. Form1 was taking too long to load because of the calculations it was performing. So I have taken those off and just left some basic statistics (how many films, how many categories etc) and to save space, I run these at the bottom of the scree on a 'screen ticker'.
2. Form1 now has filters that enable you to search both films and nominations. So if, for example, you need to see films with the word 'green' in the title made between 1990 and 2019 with between 4-6 nomination and more than 3 winners etc etc you can. You can do the same sort of things with nominations. Depending on what you want, you can just click in a cell on the nominations grid to copy that cell value as the filter (but you can, of course, also type filters in).
3. All of your options are now put on a 'menu' button to tidy up the screen.
4. On the 'menu' button', the 'summary' gives you breakdowns by category; rather than have discrete buttons for the 'top 3', 'top10', top '20' etc, you now just enter the number you want to see and select a category - this then shows both nominations and winners for your selection. Click on any row and it will break it down into the individual films that were nominated. Click on an individual film and you switch to Form1 with that selected film as your filter.
The script is a bit muddled (as always happens when you're developing and adding new things in as you think of them, but it can be tidied up when you're finished).
Personally, I wouldn't bother with TreeView - the options for sorting, searching and filtering are limited.
It's too large to attach so here's a link to download from - https://app.box.com/s/y7s86yvqplkoxyvfzev62v1h3p8e7oml
Hope some of this helps move things along.
Derek.
1,647 2019-06-24 19:50:35
Re: Movie Oscars database (59 replies, posted in Database applications)
Hi,
I don't think I'd do it that way (movie titles separated by commas) - the user could end up having to scroll left and scroll right quite a lot.
Instead, I think I would use a linked tablegrid - the first tablegrid shows the winners summarised by the number of winning nominations for the selected category and the second tablegrid lists the individual films.
This has the added benefit that you can then click on one of the film and then be taken back to Form1 to see all the other nominations for that film. For example, select 'Best Actor' as your category, then select 'Jack Nicholson'. The linked grid will show you the two films he won awards for. Then click on 'One Flew Over The Cuckoo's Nest' and it goes to Form1 (automatically taking the film title as a parameter) to show you all the categories that the film was nominated for (9).
In this way, your statistics and your queries can start to be more integrated.
Derek.
1,648 2019-06-22 15:36:03
Re: Movie Oscars database (59 replies, posted in Database applications)
Hi Darek,
Instead of having a lot of discrete buttons to show specific statistics, I wonder if it might be easier to have a more 'general' procedure.
In my example (on the frmstatmenu form), I can choose a category and see a summary of nominees and winners (sorted by the most nominations / winners).
Perhaps this can address the sort of 'who has been nominated more than 4 times as supporting actress?' etc etc sort of queries?
Maybe this helps.
Derek
(I had to comment some of your code out before I could get it to run on my PC).
1,649 2019-06-22 10:19:30
Re: Printing with Richedit has a lot of codes (gibberish) (6 replies, posted in Reports)
Hi,
It sounds like you are either dragging the datafield directly into the report or selecting the RTF component and then dragging the datafield into the RTF component - in both instances, this will result in you seeing /tab /par {{!! etc etc.
You must first place an RTF component into the report.
Then you must specify the dataset and the datafield USING THE RTF object's properties (don't drag and drop it from the list of available datafields.
Please have a look at the screenshot (screenshot1.jpg) in the attached example.
Hope this helps,
Derek
1,650 2019-06-22 09:12:31
Re: Couple of issues. Dropdown boxes not working and data not saving. (9 replies, posted in General)
Hi,
Please have a look at the attached - the script changes the default setting to be 'comic sans ms' for the fontname and '18' for the fontsize (I chose these 2 settings so I can easily see the difference! - just change the relevant lines in the script to what you need them to be).
I think there is a bit of understandable confusion because, when you are adding a NEW record, the default settings displayed in the Richedit toolbar still show as 'arial' and '10' (the original defaults). But if you just start typing, you will see that it is actually using the fontname and fontsize as specified in the script (when you edit a record, the display shows correctly).
If you always want it to be a specific fontname and specific fontsize, I guess you could set it in the script (as above) and remove the relevant toolbar from the richedit component to avoid any confusion.
Derek.