Здравствуйте
Попробуй это
Derek.

2,052

(12 replies, posted in General)

Morning Wen, EHW,
EHW - I've never looked at any of the charting options before so you saved me having to scratch my head over this one - very nice!
Wen - one thing you might consider is automatically updating the pie-chart rather than doing it on the button (see attached).  But it's just a cosmetic thing, the real work has already been done by EHW and yourself.
Derek.

2,053

(12 replies, posted in General)

Hello Wen,
To answer the first part of  your question, the easiest way (I believe) to show counts by region (by country, by anything!) is to use calculated fields.
Please see the attached (an old project that I quickly altered to be more relevant to what you're after).
But, as always with MVD, there are many different approaches that you could take.
Regards,
Derek

2,054

(3 replies, posted in General)

Hi,
If I understand your question correctly, a single relationship between two tables will automatically retrieve any relevant text.  Subsequent relationships between the same two tables will only retrieve the record id and not the relevant text.  To retrieve the relevant text for these, the easiest solution is to use calculated fields.
If you can attach your project, someone will be able to show you how to do it or take a look at the attachment (specifically, the 2 calculated fields that are used to retrieve the text from the related table).
Derek.

2,055

(2 replies, posted in Script)

Hello There,
Can you try this instead and see if it works
Form1.Label2.Caption:=sqlexecute ('select count(ID) from deelnemer where country = "Nederland"');
I have attached a couple of other examples of working with counts and labels that may help you along.  The form is a bit untidy, but simply because there are 4-5 different options to show (labels, buttons (with filters), an input field and clicking on the grid itself) .
I guess it all depends on how you want to present your data.
Hope this helps,
Derek.

Привет Макс, Дмитрий,
Возможно, это еще одно решение??
Derek

2,057

(2 replies, posted in SQL queries)

Hi Akkerhof,
Try it like this:
ifnull(naam,'')||' '||ifnull(roepnaam,'')||' '||ifnull(tussenvoegsel,'')
Please see the attachment for a working example.
Regards,
Derek.

Привет Netros,
попробуйте это с вашей версией
Regards,
Derek.

Здравствуйте
Попробуйте это
(select maker.maker||' '||model.model from maker, model where maker.id = car.id_maker and model.id = car.id_model) 
Кроме того, пример
Derek.

Привет Netros,
Помогает ли это?

procedure Form1_OnShow (Sender: string; Action: string);
begin
  form1.combobox1.dbSQLExecute('select distinct FIELDNAME from TABLENAME');
end;

Кроме того, вот пример

Regards,
Derek.

Здравствуйте,
возможно, так.
но может быть проблема, если более одного пользователя?
Regards,
Derek.

Hi David,
It's not really a question of 'date' OR 'text'.  'Date' is just a data type, not a storage class (valid storage classes are 'text', 'real', 'integer', 'blob' and 'null'). 
So before your 'date' data type is saved, it first needs to be converted into one of these storage classes - in this case, to 'text', which is why Mathias has to do the conversion.  And the same holds for the 'time' data type.
I hope this helps to clarify it a bit.
Derek.

Здравствуйте,
Попробуйте это
Derek.

Здравствуйте Raspr,
If I understand you correctly, use calculated fields for id_user1, id_user2......
Please see attachment,
Derek.

Здравствуйте Max1779signal,
этот пример показывает вам, как?
{fieldname1} {fieldname2}
Derek.

2,066

(4 replies, posted in General)

Hi Adam,
Glad it helped.
I frequently use tablegrid filters with multiple grids (provided I have space on the form, I prefer them to pagecontrols and sheets)  to show different 'views' of the data.  And when you combine them with options such as grid colouring, default field values etc, it can be quite effective - all without any script.  Or a few lines of script gives you cell highlighting too.
It's not a cheat's sheet but see the attached (basic view and then 3-4 different options for presenting the data) for the sort of thing I'm meaning
Regards,
Derek.

2,067

(4 replies, posted in General)

Hi Adam,
When you specify for each grid what columns to display, this doesn't have any bearing on the selected rows.
For that, you need to add a couple of filters in the grid settings ('number is not null' and 'mnumber is not null' would be one way to do it).
Please see attached.
Derek.

2,068

(6 replies, posted in Script)

Hello Popcorninicusor, Jean,
I had an old example that was pretty close so I've modified it and attached it - maybe this will help.
This doesn't do 'flashing' cell colours (not entirely sure how you would actually code for that) but, in my experience, it tends to be quite annoying after the first couple of minutes anyway!
Dont worry about being a novice - we've all been there - LOL!
Regards,
Derek.

2,069

(4 replies, posted in General)

Hi David, EHW,
A 'no-script' option (LOL!) that I've used in a couple of applications is simply to put a filter on the grid (so that, in your example, the user never gets to see any records created by 'system' in the first place). 
Obviously, if you want your users to be able to see that the 'system' records exist (even if they can't edit them), it's going to be of less use to you.
In the attached example, I've included both filtered and non-filtered grids for comparison (type in 'ker' for example, in the two search boxes to see the difference).
Regards,
Derek.

2,070

(6 replies, posted in General)

Hello Hadjieff,
You could use a calculated field for this (see attachment and screen shot (calculated field.jpg)).
Derek.

2,071

(5 replies, posted in General)

Hi Adam,
My questions are more about design rather than how you might code it.
1.  Does Form1 (with Panel1 hidden) shift to the centre (ie BETWEEN Panel1 and Panel2) or shift all the way to the right (to Panel2's position)?
2.  If Form1 calls Form2, where is Form2 positioned?  In the centre of Form1 if Form1 is full size or in the centre of Panel2 if Form1 is reduced size?
3.  Your example has no objects that are not part of either Panel1 or Panel2, but in the real world, is that likely? - for example, Form1 has a full width title displaying the name of your application.  What do you do when Form1 is reduced in size? - do you display half the title, lose the title completely or move the title and reduce it by half so that it fits (perhaps having to change font size at the same time)?  The combinations (and complexity) are significant.
I understand why you might want to hide parts of the screen (panels etc) but I think most of the people that I've written applications for would find it distracting to have forms that changed size and location depending on what they were doing.
Derek.

2,072

(2 replies, posted in General)

Hello Ljhurtado,
Add this line between the final 'begin' and 'end' of your script as follows:

  Form1.TableGrid1.dbPopupMenu.Items[0].Enabled := False;

Please see attached for an example and i hope this helps,
Regards,
Derek

2,073

(2 replies, posted in General)

Hi Wenchester,
If I've understood your question correctly, have a look at the attachment which shows a couple of ways of doing this (I've documented the script so you can see what's going on).
If anything's not clear, just drop a line.
Regards,
Derek.

2,074

(17 replies, posted in General)

Hi Lectrond,
Thanks for the attachement.
Was the 'machine parts' table previously named 'service_records'? 
Simply renaming a table or field in MVD doesn't normally cause this type of problem so I'm wondering if the database was moved or copied from another location with a schema that was out of sync with the current MVD table definitions.
Anyway, in this instance, all you need to do is to delete sqlite.db and then run your project again;  sqlite.db will recreate itself and start to use the updated schema.
Hope this moves you forward,
Derek.

2,075

(17 replies, posted in General)

Hello Lectrond,
Most of us have encountered these sort of error messages at one time or another and it's usually a quick fix.  If you attach your project, someone will be able to point out what has happened.
Derek