Silvio,
There are four scenarios we have identified:
1) Do it like most systems do, assign the ID after the new record is saved. Every system I have ever seen uses this method and thus TData was written to work this way.
2) Do like your friend Alfredo does, and use a fake ID on the new record data entry screen. Then aissgn the real ID when saving the new record.
3) Use Nages' system that recovers abandoned IDs and uses them later. This leaves the database with IDs out of physical order, Also, there can be some missing ID's at any given time (did you realize this?).
4) Use my alternate system that shows the real ID on a new data entry screen and just abandons IDs that are created by the user cancelling a new record entry screen. I suggested this BEFORE I knew about your Italian regulations.
Number 1 meets your Italian regulations as near as I can tell.
Number 2 probably meets the regulations too. Users will likely be very confused why the ID on the new record data entry screen isn't always the ID in the record.
Number 3 and 4 probably don't meet the regulations due to lack of sequential IDs in the physical order (not indexed) of the database. Also I believe you have to store the date and time in each record and these would be out of order when you reused abandoned IDs.
Silvio, you have to pick which one you want to use. If you pick something other the number 1 above, then you are going have to write the code for it.
I sold you a product that works very well as is. If you want it to work some other way, that is up to you and you will have to write new code for that. I did not claim that my product would do everything and anything you wanted.
What I would suggest is you go with Number 1 (no new coding involved) for now. You can tell your client that showing the ID on the new screen is an unsolved issue right now, and you don't want to hold up the entire project over it. Later, you can go back and work on it. Meeting the regulations are "must have", displaying the ID on the new record screen is a "nice to have."
Since you will probably only have to write new Load() and Save() methods for the database class to change the behavior of the app, all the data entry screens will automatically inherit the new behavior. This is one of the great things about using objects. If you are not convinced that this will work, I will write up 2 (very simple) different systems as a demo to prove it.
So don't hold up the whole project over how to display the ID on a new record data entry screen.