Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Margins getting chopped
Message
De
16/06/2015 18:30:47
 
 
À
16/06/2015 18:04:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01621019
Message ID:
01621046
Vues:
53
I ran into a related issue a little while ago. By default, VFP9 does not save printer information with reports. So, if you create a new report and save it, by default printer information is not saved with it.

However, if you're working with an existing report and its printer environment has ever been saved, then you have to take steps to remove it again. The environment might get saved if the report was originally created in an earlier version of VFP where to save was the default, or if another developer used VFP9 with the option switched on (i.e. non-default). If you don't take those steps, VFP will save the printer environment after you modify the report, even if you have that option globally disabled.

In my case I received a report file from another dev using VFP9. I suspect the report was originally created in an earlier version; in any case it contained printer information for an HP LaserJet 4000.

I opened, modified and saved the report. Because I always have the global option set off I didn't even think to check if the environment was still being saved. However, if I had checked at the time I would have seen that the printer information was changed to Microsoft XPS writer, which is my default printer. When I sent the report file back, print jobs blew up because they couldn't find an installed XPS printer driver.

So to make a long story short, if you suspect printer information is being or has been saved, you have to manually remove it. There may be tools to do this but in effect what they do is:

1. USE the .FRX as a table

2. Go to the first row

3. The .Expr memo field should be edited so it contains just:
ORIENTATION=0
PAPERSIZE=1
COPIES=1

4. All the contents of the .Tag and .Tag2 memo fields should be deleted

5. If you're going to work further on the report, make sure that the VFP global setting Tools...Options...Reports tab...Save printer environment checkbox is un-checked (disabled)

>I think this has to do with the fact that when I click properties in the report, I see that the printer is 'CutePDF', so when I try to print to the laser printer, it gets confused.
>
>How can I clear the printer information from the report? I know there is a 'save printer information' button, but I can't figure out how to just clear the information altogether and have the report use whatever printer is active.
>
>>Did you account for the printer margins? There is an unprintable margin (top/bottom/left/right) that you can't use. On most laser & ink jet printers, it's about 1/4 inch.
>>
>>
>>>Hi All:
>>>
>>>With the following code:
>>>
>>>
>>>lcFile = 'INTFBTCH'
>>>DO (_REPORTOUTPUT) WITH 1, 'loListener'
>>>loListener.PRINTJOBNAME = "C:\pj\INTF\Batch Packages\" + lcFile
>>>REPORT FORM intfbtch TO PRINTER PROMPT PREVIEW OBJECT loListener
>>>
>>>RELEASE loListener
>>>loListener = NULL
>>>
>>>
>>>The report looks fine on the screen, but when I print it out, the top and left (and maybe the bottom and right) margins are getting chopped off! What am I doing wrong?
>>>
>>>The printer I'm using, BTW, is a HP LaserJet M1530 MFP Series PCL 6, if that makes any difference.
>>>
>>>Thanks,
>>>
>>>Yossi
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform