1,726

(6 replies, posted in FAQ)

Hi,
Attached is a small example (5 data dictionaries, all maintained on one form).
There is also a calculated field for 'age' ('cfage' in the data structure) which might be of interest.
Derek.

1,727

(6 replies, posted in FAQ)

Hello Eyeman,
The way you are trying to use a single data dictionary table for multiple attributes on the same row is incorrect and will give you additional problems - for example, your tablegrids will display key values rather than descriptions, your comboboxes will display with empty rows etc.
I do not understand your objection to using multiple data dictionary tables with just one field - that is the whole point of using data dictionaries.  Multiple data dictionary tables can still be maintained on just one form using editable tablegrids (as suggested in an earlier response).
You are holding fields like 'last name' and 'middle name' as data dictionary items when they would normally be part of 'table_1'.
You shouldn't hold a field like 'age' - this is redundant.  It should be a calculated field based on the date_of_birth (again, as suggested in an earlier response).
Derek.

1,728

(3 replies, posted in General)

Hi Raheel,
Try it like this (see attached).  Edit1 and Edit2 are passed through to the report as component variables rather than data.
Derek.

1,729

(7 replies, posted in General)

Hi,
'Hiding' frminfo is not the same as 'closing' it;  even though it is hidden, it is still active and therefore affects how your program behaves.
I would suggest you use frminfo.close instead.
procedure frmInfo_OnClick (Sender: TObject);
begin
  frmInfo.close;
end;
Derek

1,730

(7 replies, posted in General)

Ciao Reteinformatica,
The reason why you have to click two times is because you have defined two different buttons to 'show record' (see attached screen shot).
Change the 'stampa' button from 'show record' to 'report' and this should fix the problem.
Regards,
Derek.

Привет pt.82,
Я изменил определение поля (date_begin) с «date / time» на «date».
Я думаю, что это было единственное.
Derek.

1,732

(2 replies, posted in General)

Hi Manixs,
Does the attached example help you?
You also need to set the form's position to 'podesigned' (see screenshot1 in the attachment).
Regards,
Derek.

1,733

(7 replies, posted in General)

Hello Reteinformatica,
As far as I can see, all of the fields appear on the report except 'Provincia' (this is because you have defined it in the 'anagrafica' table but you are not entering it on any of the forms, so it is always blank).
I have entered test data into all of the other fields that you are passing through to the report (as selected on your print button (b5 stampa) and they are displaying correctly on the report.
Derek.

Привет pt82,,
Возможно, так?
Derek.

1,735

(21 replies, posted in Reports)

Hi,
Yes, it can be done automatically. 
Before, the 'events' that filled Edit1, Edit2 and Edit3 was 'onclick' for tablegrid2 and tablegrid3. 
Instead, you can now use the 'onshow' event for Form1.  So as soon as Form1 is displayed, the script executes and Edit1, Edit2 and Edit3 are filled automatically (see attached).
Having an 'onshow' event for your first form is very common as there are often things you want to do at the very start of your program.
But you now want additional 'events' because the dates or the venue may get changed and you don't want to have to exit the program and then re-start just to pick up the changes. 
So we add 'events' for 'onclose' of the 'parties' form and 'onclose' for the 'venue' form so that any changes that have been made are immediately and automatically copied into Edit1, Edit2 and Edit3.
Finally, note that if you only have one row in the 'parties' and 'venue' tables, you can take the 'where clause' out of your script to simplify things.
Hope that all makes sense.
Derek.

1,736

(21 replies, posted in Reports)

Hi,
There are a few things you need to follow.
1.
A script is a set of instructions to be executed when a certain 'event' occurs to an object.  In your example, the 'event' is 'onclick' and the object is form1.tablegrid2.  But in your example, there is no link between the object/event and the script (see screenshot1).  To generate this link, double-click against the 'event' you want, the link will get created (see screenshot2) and the script editor opens.
Without this link, no code will get executed.
2.
When you're developing, if you use hidden fields, it's best to leave them visible until you've finished testing and are happy they are working properly.  I've made Edit1, Edit2 and Edit3 visible so you can check them - just make them invisible when you're finished.  In your example, click tablegrid2 and you'll see Edit1 and Edit2 get filled with the relevant dates, click tablegrid3 and you'll see Edit3 get filled with the relevant venue.
3.
You cannot use tablegrid2 and tablegrid3 as search criteria in the report because there is no relationship with 'addressbook' - that's the whole point of having to use Edit1, Edit2 and Edit3 as local variables.  Replace tablegrid2 and tablegrid3 in the report search criteria with Edit1, Edit2 and Edit3.
4.
With Edit1, Edit2 and Edit3 populated, click the 'Print Invitation' button and open the report in designer mode;  you should see Edit1, Edit2 and Edit3 are available (in the 'Variables' tab);  they can now be place on the report layout as required.
Derek.

1,737

(5 replies, posted in Russian)

Привет Agatlogic,
Извинения - я забыл упомянуть, что вы также можете использовать tablegrid2 в качестве критерия поиска (просто нажмите на строку). Это, пожалуй, лучшее решение, потому что не требует дополнительного обслуживания.
Derek.

1,738

(21 replies, posted in Reports)

Hi,
Because there are no joins between the address book table and the venue and party tables, the venue and party details need to be put into local variables (edit1 - edit4) and added as search components in MVD (screenshot1).
When you go into FastReport, these additional variables (edit1-edit4) are located in the 'variables tab' (next to the 'data tab' on the right side of the screen) - see screenshot2.
Now you can just drag them onto the report like any other fields.
Derek.

1,739

(5 replies, posted in Russian)

Привет Agatlogic101,
Вот два разных метода (метод 2 более интерактивный, но требует небольшого сценария).
Возможно, это помогает.
С Уважением,
Derek.

1,740

(21 replies, posted in Reports)

Hi,
Your 'invitations' report requires information from the 'addressbook', 'venue' and 'party' tables. 
But because there is no relationship between the 'addressbook' table and the 'party' and 'venue' tables, the information from the 'venue' and 'party' tables isn't automatically built into the report data-set.
So you need to pass this additional information (venue, party start and end dates and party text) through to the report as variables instead.
This is what the script in the attachment is doing (I've stripped out everything that isn't needed so you can see more clearly what is going on).
On a different point, if you need to upload your project, you can delete the executable file (it's not needed) before zipping it to reduce the size of the zip file.
Derek.

1,741

(21 replies, posted in Reports)

Hi,
I'd probably approach it like this (see attached).
Took the opportunity to tidy a couple of things up as it was looking a bit messy - most things are now under the 'menu' option.
And as always happens when you add things on, change ideas etc, the script gets a bit disorganised but it's easy enough to straighten out when everything is settled.
Derek.

1,742

(21 replies, posted in Reports)

Hi,
It's a fair comment about some of the 'standard' things like button styles, forms etc.
But there is also a lot you can do by using icons or images instead of standard buttons, a bit of imagination  and a few lines of script.
Have a look at the attachment for some light-hearted examples.
Regards,
Derek.

1,743

(21 replies, posted in Reports)

Hi,
There are a couple of ways that the content of the invitation can be created (basically set it up and save it as part of creating the invitation (which is how I do it in the attached example)  or just writing it 'on the fly' without saving it). 
In both instances, you then just pass the contents through as 'plain text' to the report.  I don't use FastReport much but I think I'm right in saying that this doesn't work if you try to use 'rich text' (although it would be nice if it did).
MVD doesn't support 'radio buttons' (at the moment);  the nearest equivalent is 'check boxes' but they are not mutually exclusive so each check-box needs to be visited individually to set it 'off' or 'on' and so can be rather confusing for the user (ergo - not so much fun!).
Derek.

1,744

(21 replies, posted in Reports)

Hi,
So if I understand your message correctly, you are,  in effect, wanting to use the status of 'active' or 'inactive' to determine who gets an invitation, rather than adding guests to a 'guests list table'.  There's no problem doing it that way (see attached) but you lose the functionality of being able to see who was invited to previous parties (because their status may have changed, or people may have been added  / deleted in the address book in the meantime).
Derek.

Hi,
I don't use FastReport that much but I think you need to do 2 things;
1.  set 'stretchmode' to 'smactualheight' in the properties of the memo field (see screenshot1)
2.  set 'stretched' to 'true' in the properties of the relevant report band  (see screenshot2)
Have a look at the attached example to see if this is what you're after.
Regards,
Derek.

Hi,
In the dbimage1 properties, the tablename was blank.  Also, you need to specify 'linkfile' as the 'type' (please see attached screenshot).
I wasn't sure from your post if you also wanted the images to display on 'frmstudent'.  If so, there are 2 basic ways of doing this (both of which require a script.
In the first way, the image is displayed when a row in frmstudent.gridcheck is highlighted.
In the second way, all images are displayed against the relevant row in frmstudent.gridcheck.  Whilst this is nice to have, you either have to increase the row height in the tablegrid quite a lot and so only get a few rows per screen, or if the row height is reduced, you can't really tell who's image it is anyway!  Also, retrieving images for each row in the tablegrid can increase load times which may be a problem if you have a large number of students in your database.
But ultimately, the choice is down to your specific needs.
Hope this helps,
Derek.

1,747

(2 replies, posted in General)

Hi Manixs,
You could add a simple condition in the script to check if you've reached the last record (see the attached as an example).
Derek

1,748

(21 replies, posted in Reports)

Hi There,
Not sure what you mean by 'live search' but the combobox on Form6 is already searchable so it gives you both options (pick from the drop down list or just type any part of the firstname or lastname).
Derek.

1,749

(21 replies, posted in Reports)

Hello,
A few different ways of tackling this (see attached for one solution that doesn't require (hardly) any script).
The 'invitation' report is a bit 'rough and ready' but it gives you the general picture.
The 1 line of script is nothing to do with the basic functionality at all - it's just to update the tablegrid (calculated field) with the number of guests at a particular venue and is purely cosmetic - you can leave it out if you want to avoid having a script at all.
Regards,
Derek.

1,750

(2 replies, posted in General)

Hi Manixs,
Does this help (please see attached)?
Derek.