Stop user changing No. of Copies

Navision 3.01B. I have several reports with request forms, where I do not want the user to be able to change the Number of Copies on the printer dialogue form that follows the request form. The reports print labels for boxes, which have unique numbers on them (and of course, they are not unique if the user says 5 copies!) Does anyone know of a way of disabling this? Ta, Andy Malkin

You could just set the VISIBLE property to NO for the “NoOfCopies” control which is on the request forms of your reports.

[:(]Sorry I can’t do that, because the No of Labels on the request form controls the incrementing of the unique box number printed on the label. In other words, the labels are not identical (unless of course, the user changes the No of Copies on the print dialogue form, which is what I want to stop).

Try to set the EDITABLE property to NO Does that solve your problem ?

quote:


Originally posted by Andy Malkin
[:(](unless of course, the user changes the No of Copies on the print dialogue form, which is what I want to stop).


The field I want to control is the No of Copies field on the ‘Choose a printer’ window which comes up automatically after you click ‘Print’ on the request form. This seems to be a standard Windows form, and not one which I can amend.

Then yes your kind of stuck [:D] This particular form is part of Windows, not Navision. A Solution could be to add some code on your report to check that each document cannot be printed more than one time. So basically you could do something like that : IF YourDocument.“No. Of Copy Printed” = 1 THEN ERROR(‘You cannot print this document because it has already been printed’); I never tried it, so I cannot guarantee it will work. (You might have to do a COMIT after you have done YourDocument.“No. Of Copy Printed” := YourDocument.“No. Of Copy Printed” + 1; YourDocument.MODIFY(TRUE); )

Hello, If you have access to code behind forms, you could possibly create your own Navision form to print from, with the fields that you might want to have on the request form, and a ‘print report’ button as a substitute request form. You could then pass the field values to the report using code and set the report property UseReqForm to ‘No’. When UseReqForm is set to ‘No’ in a report, then the user only gets a dialog that flashes up as ‘printing’, prints once and then it disappears, so the user does not get an option to print more than one, but they do not have a choice of changing printer either… When trying out UseReqForm, it is best to test it with a report that will only print one or two pages at most. Hope this is of some help.

What Ed said will work. But will of course print to the default printer. If your users have more than one printer, one for labels and one for reports, It could get messy. To overcome that you would would need to specify a default printer for the report in Navision. BUT you would not be able to preview the report. Tarek is also right in that you could specify a function to stop it printing more than one copy. But using the commit statement will mean that even if the printer does not print the labels, i.e. has an error or chews the pages, you will not be able to print it again unless you modify the table or have a way to change the No. of Copy printed. Regards Tony

Unless the user is having the printer setup for having by default 2,3 or four copies… :slight_smile: But otherwise is the best way you can do it…

This may be an off-topic remark, but you could put the label no. on bard code and have the user scan the box before shipping it. If the label no. has already been used then the system would beep at you and complain— and maybe generate a new label if needed :slight_smile: You would probably need a non-Navision program to do this. You might able to adapt a shipping program for this purpose, or you might have to write your own program.

[:)] Many thanks for all your help. I can see how Ed’s solution will work, and will think about using that. With the help from General Ledger/Printer Selections, I should be able to get the report to the correct printer, without the user choosing. Thanks, Andy