Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / FoxPro / Reports and Printing / November 2008

Tip: Looking for answers? Try searching our database.

Barcode printing.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juan Alonso - 18 Nov 2008 18:11 GMT
I have a program that prints the barcode equivalent of the invoice number.

I try and print it and it won't print the barcode, yet I run a seperate
program with the same commands on it and then it prints it.

I am using the "PF Barcode 128" font.

Is anyone having anything similar?

I don't understand why it won't print on one and print on the other.

Juan.
Mark Burgum - 19 Nov 2008 08:32 GMT
maybe your prgoram is not using PF Barcode 128? but i think you will need to
give a lot more details before someone is going to be able to help you. What
program are you talking about, is it a foxpro report, have you checked the
report layout to see what font it is trying to use?

>I have a program that prints the barcode equivalent of the invoice number.
>
[quoted text clipped - 8 lines]
>
> Juan.
Juan Alonso - 19 Nov 2008 13:42 GMT
I have two programs in VFP8.

One program has the following code I used to test it with before I put it in
the real code.

*/  TEST CODE /*
set talk off
set echo off
set console off
set device to printer
set printer on
set printer font "PF BARCODE 128" , 25
{ DO SOME @..SAY STUFF TO PRINT }
set printer font "FoxFont", 9
set printer off
set console on
set device to screen
*/ END OF TEST CODE /*

The other pogram is the same except instead of it doing the { @..SAY STUFF
TO PRINT } right after the SET PRINTER FONT code it calls other functions
that calculate before printing and then it does the { @..SAY STUFF TO
PRINT } some of them inside the functions and some from the calling code.

So it reads something like this:

*/ SIMILAR TO MY REAL PROGRAM /*
set talk off
set echo off
set console off
set device to printer
set printer on
*
PrintJob
*
{ CALLS TO OTHER FUNCTION.. WITH SOME @..SAY STUFF TO PRINT IN THEM}
*
set printer font "PF BARCODE 128" , 25
{ ONE LINE WITH AN @..SAY STUFF TO PRINT }
set printer font "FoxFont", 9
*
{ SOME MORE @..SAY STUFF TO PRINT }
*
EndPrintJob
*
set printer off
set console on
set device to screen
*/ END OF "SIMILAR TO MY REAL PROGRAM" CODE /*

I have tried to review this over and over and I can't understand why it does
this.

I put the FONT files in the windows font folder also.

Is there a way I can DEFINE the printer fonts I will use before using them?

I can not see why one works and the other will not work.

Thank you in advance,

Juan.

> maybe your prgoram is not using PF Barcode 128? but i think you will need
> to give a lot more details before someone is going to be able to help you.
[quoted text clipped - 13 lines]
>>
>> Juan.
Mark Burgum - 20 Nov 2008 08:28 GMT
Hi Juan

I am afraid i don't know. this is a very old method of printing in foxpro,
the last time i dealt with it was a fox 2.6 package back in 2000, and i
never tried to get bar coding to work. Currently most of us use the inbuilt
report writer to do reporting, which works on a prepared data cursor or
table, and gives you a visual environment to layout your report. maybe
someone else can help, if they can remember back that far?

>I have two programs in VFP8.
>
[quoted text clipped - 78 lines]
>>>
>>> Juan.
Juan Alonso - 20 Nov 2008 19:42 GMT
Thank you Mark.

Unfortunately, I am obligated to remember back that far and, for the record,
sometimes as far back as the 1980s when people used DBase.  I have been
programming PCs since 1985.

I have been working in a Novell 3.12 Environment with Dos 6.22 workstations
for the past 8 years.  My super has decided to move it all to a windows
environment, so we start using it in our Citrix environment.  I know, what
the F - - k was he thinking..right?.. LOL

I have converted most of the code to VFP8 and I am working on a fresh one
from scratch at the same time that will be on Citrix and use SQL Server
using VFP Passthrough and some ADO programming.

Again, unfortunately, I don't make the rules, I just follow them.  I don't
know what the heck they were thinking to have stayed so long in this
environment, but they have.

I guess that old saying is true:  "IF IT AIN'T BAROK, DON'T FIX IT"  ... a
little humor there from the movie "Beauty and the Beast"..  LOL

Anyway, thanks anyway man.  I appreciate it.  I used a different way of
doing the barcode.

I use the FOXFONT setting for printer font so that it will accept ASCII
chars then I send an init string to the printer with
" ??? Chr(27)+Chr(64) "  I then use a procedure to create the binary of the
characters, create the start and end barcode bits Draw them using the ASCII
table codes and since my Printer Font setting now accepts ASCII codes it
prints just fine.

I do have another question if you are familiar with it.

If I am using the Define Window {window name} NAME {objectName}, can I
reffer to the "OBJECT NAME" to check if it has focus, I keep getting the
problem of key assignments getting over written because the user clicks
outside the window.

I at least would like to see if it is possible so then I can put in a LOST
FOCUS for the Object Name and that way key assignments are better controlled
if the user left that part of the window, the same if the GOT FOCUS, I can
re-assign the key assignments back.

Thanks in advance,

Juan.

> Hi Juan
>
[quoted text clipped - 88 lines]
>>>>
>>>> Juan.
swdev2 - 22 Nov 2008 02:45 GMT
I know - hindsight sometimes is helpful - but....

TSX-32-Online is great for DOS FOX 2.X apps - can nail down the security any
way you want (or the boss's want)... It's a bit pricey compared to Citrix -
but MAN the benefits (IMO) outweigh the cost.

see http://www.sandh.com/tsx32.htm for more info..

--
===================
William Sanders / EFG  VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.terrafox.net  www.viasqlserver.net

> Thank you Mark.
>
> Unfortunately, I am obligated to remember back that far and, for the record,
> sometimes as far back as the 1980s when people used DBase.  I have been
> programming PCs since 1985.[snip]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.