Home > database >  Consult, VFP if control the number of printing
Consult, VFP if control the number of printing

Time:10-06

Customer requirements, to display to print a few times, but don't know where is according to the determined print, preview is not

CodePudding user response:

I=I + 1
Messagebox (I)

Print a, variables automatically add 1

CodePudding user response:

In print statements, how do I know if the user is really print, or click the cancel button without printing?

* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Print here refers to click on the print button in the software, if the printer is not caused by fault or no print success can't be got from here,

1, report to add a report variable
Design report, click on the menu 'statements' - & gt; 'variables... ', a dialog box, the report variables
Add a report variables, such as' PrnTF ', 'you want to store values,' initial values',
'reset' and 'calculation without modifying, use the default, then select' statements output after release,
Finally click on 'ok',

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
(English version)
Design Report, click the "Report" on the menu - & gt; 'the Variables... ', a dialog box, the report variables
Add a report variables, such as' PrnTF ', 'Value To store,' Initial ',
'Reset Value -based on' and 'Calculation type' don't have to change, use the default Value,
Then select the 'Release After the report,'
Finally click on 'ok',
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

2, when printing:
The Report Form Report name To Printer Prompt
*! * -- -- -- this sentence after the operation, report variables PrnTF defined global variables,
*! * - if you click on the print button, a report output, report variables were released,
*! * - if you click on the cancel button and do not print, report variable has not been released,
*! * - so by detecting the presence of this variable to determine whether to print is ok,
If Vartype (PrnTF)='U'
Messagebox (' has to print! ', 64, 'message')
The Else
Messagebox (' not print! ', 64, 'message')
Endif


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
VFP7.0 and above can use SYS (2040) - check report status to do,

Such as write a function myFunc, but in the main program finally or set proc to... Pointing to the process of file
MyFunc finish your test report () function checks whether the print to perform certain tasks, finally returns an empty string
Add a domain control to the report, fill=expression myFunc (), and set the Print the When condition is sys (2040)='2'
If you want to append operation on the user to press the print button, then put it in the report of the title belt region in
If you want to print before execution, in the Summary area

CodePudding user response:

Ok, thank you very much

CodePudding user response:

By studying!!!!!!!!!!

CodePudding user response:

My system is to print the record number of, but the record is the number of click on the print button, preview also calculate, if you want to record the real print the number of times, it is difficult to achieve 2 is meaningless, printer paper, ribbon is bad print is not clear, and so on the reason how to calculate? Print half power? Integrated these factors, can't get real results, so, just click on the word

CodePudding user response:

Preview is not words, must put in the preview toolbar disabled, preview also has the "print" button,
  •  Tags:  
  • VFP