Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can preview those SELECTED, but not Print those SELECTED
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01221933
Message ID:
01221952
Views:
14
Too late in the game, but check Forms with Grids and printing reports FAQ #15515

Also I don't recommend using filters. Why not create a cursor instead?

>Hey Gang!
>
>This one is STRANGE!!!!!..........................
>
>When I click on the button to print the Patient Medical Reports, I see in the Preview ALL of the SELECTED (MARKED) Prescriptions...
>
>But...
>
>When I press the Print button in the Preview, it only prints ONE Prescription!!!
>
>Here is the code....
>
>
>LOCAL lcRxCaption,llFirst,lcPharmacy,lcPhone
>
>llFirst = .T.
>Thisform.mousepointer = 11
>Thisform.m_Actions(2)
>ThisForm.txtStatus.value = "Printing Patient Medical Reports..."
>Thisform.Draw
>
>SELECT rx
>SET FILTER TO (marked = .T.)
>
>GO top
>
>IF NOT EOF()
>
>
>
>Here is where it prints...
>
>
>	SELECT rx
>	REPORT FORM RxPMR NOCONSOLE TO PRINTER PREVIEW 		
>ELSE
>	MESSAGEBOX("There are no Rx's selected to print the Patient Medical Report" + CHR(13) + ;
>		"(To select a Rx, check it)",64,"Cannot Print PMR(s)")
>ENDIF
>Thisform.mousepointer = 0
>ThisForm.txtStatus.value = ""
>
>* Reset grid
>SELECT rx
>IF Thisform.p_ViewType = 1
>	SET FILTER TO INLIST(status,0,1,5)
>ELSE
>	SET FILTER TO
>ENDIF
>GO TOP IN rx
>ThisForm.grdProfile.Refresh()
>Thisform.m_Actions(1)
>
>
>The Rx table is filtered by MARKED = .T.
>
>Any ideas? What have I overlooked?
>
>Thanks!!
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform