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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Margin settings to Datacard Printer in VB.NET

Status
Not open for further replies.

Corinne30

Programmer
Mar 24, 2011
16
0
1
US
I'm developing in VB.NET 2005 and trying to utilize a Crystal Report. I'm posting here because I've narrowed my problem down to the .NET app is somehow resetting my page margins once the report is loaded and goes to print. The printer I'm using is a Datacard printer that prints ID badges. It has the ability to print edge to edge and thats where the problem comes in. I can design a report for the badge in crystal XI and send it to the card printer and it prints right to the edge on all 4 edges (from Crystal). When I try to print the same report thru VB.NET project it prints like the origin of the top left corner is shifted about an eigth of an inch to the left and to the top.

I have tried setting the margins in code but nothing seems to work.


First I tried this:

cryRpt.PrintOptions.ApplyPageMargins(New CrystalDecisions.Shared.PageMargins(0, 0, 0, 0))

Then I tried like this:

Margins = cryRpt.PrintOptions.PageMargins
Margins.bottomMargin = 0
Margins.leftMargin = 0
Margins.rightMargin = 0
Margins.topMargin = 0


' Apply the page margins.
cryRpt.PrintOptions.ApplyPageMargins(Margins)


Neither seem to work. I made sure that the report was created while the Datacard printer was my default printer.

Can someone shed some light on this for me????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top