Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Raster Image in Forms and Labels

Status
Not open for further replies.

acepro

Programmer
Mar 17, 2001
30
US
For years I have been generating my own bar codes (UPC and
Code 39) by using HP PCL Raster conrol codes sent directly
to the Printer.
Is there anyway to pass this through a VFP9 label or form
control? I know there are fonts that would make it easier,
but I like the control provided when I can call it through a UDF.

Any Suggestions?


Charlie Huff
CJ's Homecenter












 

Charlie,

You should still be able to do that in VFP. By sending the control codes via VFP's triple question command (???), you will by-pass the printer driver, and the printer will be able to interpret the raw commands.

It is not something I would normally recommend doing, as it ties you to a particular type of printer. The whole point of barcode fonts is that they are device-independent. But since you already have your existing code in place, it should still work.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike,

Thanks

Yes I have successfully run the old code using ???,
but have only been working with VFP for a short time
and thought I might be missing something in label/report
designer that would allow passing control codes thru a
field or ole control.

Really like the new report/label capabilities otherwise.
If I understand you correctly there is no way to use ???
output within either.

Charlie Huff
CJ's Homecenter












 

Charlie,

If I understand you correctly there is no way to use ??? output within either

That's correct. The ??? syntax is really only supported for backward compatibility purposes. It doesn't fit well with the Windows way of dealing with printed output. It might be possible to find some way of sending control codes from reports or labels, but it would be very kludgy.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
You may try experimenting with a report runtime function.
Add a field to the report, and as a control source use MyFunction(). Then in a procedure file or calling program, add your function:
Code:
FUNCTION MyFunction
STORE ...(control codes or whatever)... TO cString

RETURN cString

Just a thought. Don't know how the printer driver would handle it though.

-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Dave,

That's what I tried, but unfortunately it simply
printed the control codes as characters.

Thanks anyway


Charlie Huff
CJ's Homecenter












 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top