Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending to printer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01428050
Message ID:
01428237
Vues:
41
I came up with an alternative. I created a dbf with just a memo field, and a rpt with a memo expression field and the said field is formatted courrier new. I used "repl zmemo with FILETOSTR('e:pfile')", and problem is solved. Don't worry, the users will never know ~~~~~~


>Hmmmm.... let's go back to basics. I have a feeling you have font issues.
>
>Run this:
>* Add here your commands to set output to printer.
>
>? repl("i", 20)
>? repl("m", 20)
>
>* Now add the commands to close the printer and flush it, so it prints...
>If the above code produces two lines of different length, your printer's using a proportional font, like Naomi said.
>
>BTW, what's the printer's brand and model?
>
>Alex
>
>>Well, I have taken to using the spacebar and spacing out to eyeball perfection, like this:
>>
>> TAKE NOTICE: UNPAID CC FOR 2009 RV = $ 118614.08
>> 2009 RY = $ 49249.92
>> 2009 CHKs = $ 0.00
>> ------------------
>> 167864.00
>>so that it looks good when I design it. It's just when it gets printed that the mis alignment occurs. A printining font issue perhaps?
>>
>>
>>
>>
>>
>>
>>>Hi Tim,
>>>
>>>Like Ken said, you need to take control of the spacing yourself. Using ltrim() when converting a number to string will already remove spaces that you need to line things up. It results in things like:
$   120.50
>>>$   3.95
>>>$   10.15
And this is not what you want.
>>>
>>>If you're doing a lot of these, you might want to create a function to handle the spacing for you, ensuring that each amount is preceeded by the same number of characters (or spaces), and that the numbers themselves, when converted to strings, are of the same length. That's what I've done in the past.
>>>
>>>Have fun!
>>>
>>>Alex
>>>
>>>
>>>>I have a prg that does the following (shortened for brevity)
>>>>
>>>>set prin to e:\zprtfile.
>>>>?" 2009 CHKs = $ ",ltrim(str(g3,10,2))
>>>>?" ------------------"
>>>>?" ", g1+g2+g3
>>>>
>>>> type e:\zprtfile to prin
>>>>
>>>>but no matter how I line it up, the hardcopy totals/text come out mis aligned. Is there some better way?
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform