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????
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????