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

Continuous paper in a matrix printer

Status
Not open for further replies.

Saners

Programmer
Jan 14, 2004
27
GB
Maybe someone can help!

This problem has been mentioned before in thread703-516681 but unfortunately no one replied. I have the same problem.

To recap I am printing to a dot matrix printer using continuous paper in Access 2000. The paper is 0.5cm longer than the usual A4 sheet so after printing the first page ok all subsequent pages are out of alignment.

I have run out of ideas and would really appreciate any help or suggestions anyone can give.

Thanks in advance.

Saners.



 
Go To Control Panel, Open "Printer and Faxes"
Choose the printer and
In the Printer Settings - Printing Preferences Change the Paper Size from A4 to "Custom Paper" / "User Defined Size"
Another Small Window Pops Up asking Paper Width and Height. Type the desired values.

In Access Report Design View,
Go To "File"->"Page Setup"->"Page" Tab
Select "Custom Paper" or "User Defined Size"
Save and Close the Report

Print the Report Now...

Let me know how it goes...

Regards,
 
Hi Guys,

i have the same problem right now with my label being too long (2 feet) and my longest choice is 1 feet, I tried the user defined but I got no pop up to ask me the height and width. Is there a way to set it by coding?
 
Yes, Ready Code is available in Access Help.
It is fully customisable and fully functional.
Anybody can use it instantly to set customer paper size.
Only thing you need to understand how it works,
Once you know its nuts and bolts, You will appreciate its functionality.

Go to MS-Access Help.
Type "PrtMip Property" in Index Tab.
Hit Enter.
Help on "PrtMip Property" is displayed.
Click on Example.
Full Code is available there.

All the best.

Regards,
 
Thanks for such a quick reply!

I too have tried to manually define the the printer settings and do not get the settings prompt. The printer is an EPSON DFX-8500.

I will try the coding option and let you know how I get on.

Thanks again for the help it's much appreciated.
 
Just a quick question about using the PrtMip property.

I have written the code and have set DefaultSize to False as my paper size is 0.5cm longer than A4 so I want to ignore the size value in the detail section in Design view and use the values I assign in ItemSizeWidth and ItemSizeHeight. I have set these values to the size of the detail section in the report. I want to print 3 detail sections per page. So my question is do I have to define the actual length of the the paper size?

Thanks in advance.
 
If the DefaultSize works fine with your length of paper, just leave it as it is.

Anyway I dont think 0.5cm will make major changes your report output.

Regards,
 
Hi again

HELP! Still having problems with this. I completely understand what should be happening with the code. To give more specifics I call the following function to print my continuous forms with detail sections of 8 inches x 4 inches each:

Function SetReportMarginDefault(strReportName As String)
Dim PrtMipString As str_PRTMIP
Dim PM As type_PRTMIP
Dim objRpt As Report
Dim tempPrtMip As String

DoCmd.Echo False
DoCmd.OpenReport strReportName, acDesign
Reports(strReportName).Painting = False
Set objRpt = Reports(strReportName)

PrtMipString.strRGB = objRpt.PrtMip

LSet PM = PrtMipString
'Use 1440 for inches
PM.fDefaultSize = False ' when true uses the size of the detail section in Design view, when false uses the values specified by ItemSizeWidth and ItemSizeHeight below
PM.yTopMargin = 0 ' 1440 twips = 1 inch
PM.yBottomMargin = 0
PM.xLeftMargin = 0
PM.xRightMargin = 0
PM.xItemsAcross = 1 ' Columns across = 1
PM.xRowSpacing = 0 ' the horizontal space btw detail sections
'PM.xRowSpacing = 0.25 * 1440 ' = Set 0.25 inch between columns.
PM.yColumnSpacing = 0 ' the vertical space btw detail sections
PM.xItemSizeWidth = 8 * 1440 ' width of the detail section (8 inches) in twips - 1440 twips = 1 inch
PM.yItemSizeHeight = 4 * 1440 ' height of the detail section (4 inches) in twips - 1440 twips = 1 inch
PM.rItemLayout = 1953 ' across, then down
'PM.rItemLayout = 1954 ' down, then across

LSet PrtMipString = PM

objRpt.PrtMip = PrtMipString.strRGB

'Make sure report has the focus
DoCmd.SelectObject acReport, strReportName
'Save the Report
DoCmd.DoMenuItem 7, acFile, 4, , acMenuVer70

'print the warrants
DoCmd.OpenReport strReportName, acViewNormal


CloseRpt:
DoCmd.Close acReport, strReportName
DoCmd.Echo True

End Function


BUT after printing the first page each subsequent page of details moves up slightly and is not aligned. Please I am pulling my hair out here and would really appreciate any help. Am I missing something from my code? After assigning the values am I opening/printing the report correctly?
I have tried assigning values to the top, bottom, left and right parameters but this makes no difference.

Aleathiel did you get this to work and can you suggest anything?

Thanks in advance.

Saners.
 
Dont Issue Print Command while the report is still open.
Remove this code.

'print the warrants
DoCmd.OpenReport strReportName, acViewNormal


Put it after calling the SetMargin Function, Like Example..

Private Sub BtnPrint_Click()
Dim RepName as String
RepName = <<Report Name>>
SetReportMarginDefault RepName
DoCmd.OpenReport strReportName, acViewNormal
End Sub
 
Thanks for the reply.

I have tried printing the report once it has been closed as suggested and this makes no difference.

Any other ideas?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top