Topic: Print all records

Hi there,
I am new to this, so i need help from the experts.
i have done a simple database for my dad and his old computer games, it works well at the moment.
the problem i have got is that i need to put 2 extra buttons in the project, so that i can do the following
1- print a single record (which i have done temporary)
2- print all records (the one i cant figure out)

i have attached my project, any help would be appreciated

Post's attachments

Attachment icon PDT Database V1-1.rar 787.58 kb, 513 downloads since 2021-01-29 

2 (edited by derek 2021-01-30 09:59:33)

Re: Print all records

Hi There,
The way you have configured your print button tells MVD to print which ever record has been highlighted in the tablegrid (because you have specified the tablegrid as a component on your search button).
You could simply just copy the button, change its legend and then removed any search components;  in this instance, MVD will print all the records in the appropriate table (zxspectrum).
Have a look at 'gamesA' in the attachment.
There are a number of things you can also try (which you may not have come across yet if you are relatively new to MVD).  I didn't want to add them to your existing project and mess things up so I copied it (see gamesB in the attachment).
All of these are just suggestions and in no particular order - and are just my own views.
1.  I probably wouldn't bother with the thumbnail of the games covers in the actual tablegrid - the row height needs to be increased quite a bit before you can really see what it is, which takes up lots of room.  But the main issue is the tablegrid refresh time - it might not be too bad at the moment (3 records) but the more you add, the more sluggish the refresh will become.
2.  By default, any field you choose as a search critera looks for an exact match (=).  But if you're searching for something, you might not know what the exact name (or disk no' etc etc) is.  In that case, you can change the search filter from = to %s% to do 'fuzzy matching'.
3.  MVD has an 'incremental search' feature which means it searches as soon as you start typing anything into your search criteria;  this means you can actually hide the search button and your program can feel a bit more interactive.
4.  I have combined your 3 search fields (gamename, category and diskno) into an 'all in one' search field using a 'calculated field' - it means the user doesn't have to wonder which of the search criteria they should be using.  This calculated field is then used as the selected component you specify with your 'search' button and, again, this can be made an incremental search and also 'fuzzy matching'.
5.  Rather than have 2 print buttons, I've combined them into one and share the calculated field (see above) as the selected search component for the report (it's exactly the same as the 'search button').  Doing it this way means that whatever you see in the tablegrid is what will be printed - it's a nice visual confirmation for the user.  If you want to see all games, don't enter anything in the search box, if you want to see all games with the letter 'w' in them, search for it, visually check it, then hit 'print' etc etc.  In other words, the 'search criteria' that you see in the tablegrid and the search criteria used in your report are always in sync.
Hopefully some of the above might give you some ideas and help move you along.
If anything's not clear in either attachment, just shout and someone should be able to lend a hand.
Regards,
Derek.

Post's attachments

Attachment icon games.zip 1.67 mb, 518 downloads since 2021-01-29 

Re: Print all records

Derek is always of good advice, I just add my 2 cents here, I kept your idea of using a SQLReport just for the sake of learning. The SQL query is the most basic you could find, you could write it to be specific but here, we just want to do something simple. The key in the report designer is to keep the fields inside the "Master data" band otherwise, only one record is shown.

Post's attachments

Attachment icon PDT Database V1-2.zip 861.31 kb, 517 downloads since 2021-01-29 

Re: Print all records

Hi there,
Thank you both for the quick reply, i am out at the moment but when i get back later i will have a look.
once again thank you

Re: Print all records

Hi there,
thank you for this database help it was great, but i need a bit more help.

on the main table we have got a counter of how many names or entries in the database.

How did you put that on as i cant figure it out.

much appreciated

Re: Print all records

Hi,
I think this is what you're after - have at look at the screenshot.
Derek.

Post's attachments

Attachment icon screenshot.jpg 242.52 kb, 179 downloads since 2021-02-23