Solved

Printing problem

Posted on 2001-08-06
6
295 Views
Last Modified: 2008-02-01
I got two printer, one I put legal paper and the other one I put letter paper.

My legal paper printer is the one by default.

So some of the report I got in my database are letter format and somme legal format.

My question is it possible to tell access to print the report in letter format on one printer and the report legal format on the other printer.


Because now When I print my letter format report all my report take the printer by default so the legal paper one and change all my report vertical way and horizontal way.

Thanks
0
Comment
Question by:runner100
  • 4
6 Comments
 
LVL 4

Expert Comment

by:MacRena
ID: 6357766
I'm sorry, say that a little louder?  I can not hear you.
0
 
LVL 4

Expert Comment

by:MacRena
ID: 6357786
Here's what I learned.  It's way over MY head...

**********************************************************

PrtDevNames Property

You can use the PrtDevNames property to set or return information about the printer selected in the Print dialog box for a form or report.

Note   It is strongly recommended that you consult the Win32 Software Development Kit for complete documentation on the PrtDevMode, PrtDevNames, and PrtMip properties.

Setting

The PrtDevNames property is a variable-length structure that mirrors the DEVNAMES structure defined in the Win32 Software Development Kit.

The PrtDevNames property uses the following members.

DriverOffset:Specifies the offset from the beginning of the structure to a Null-terminated string that specifies the file name (without an extension) of the device driver. This string is used to specify which printer is initially displayed in the Print dialog box.

DeviceOffset:Specifies the offset from the beginning of the structure to the Null-terminated string that specifies the name of the device. This string can't be longer than 32 bytes (including the null character) and must be identical to the DeviceName member of the DEVMODE structure.

OutputOffset:Specifies the offset from the beginning of the structure to the Null-terminated string that specifies the MS-DOS device name for the physical output medium (output port); for example, "LPT1:".

Default: Specifies whether the strings specified in the DEVNAMES structure identify the default printer. Before the Print dialog box is displayed, if Default is set to 1 and all of the values in the DEVNAMES structure match the current default printer, the selected printer is set to the default printer. Default is set to 1 if the current default printer has been selected.

Microsoft Access sets the PrtDevNames property when you make selections in the Printer section of the Print dialog box. You can also set the property by using Visual Basic.

Remarks

Microsoft Access uses the DEVNAMES structure to initialize the Print dialog box. When the user chooses OK to close the dialog box, information about the selected printer is returned by the PrtDevNames property.


*******************************************************
PrtDevMode Property

You can use the PrtDevMode property to set or return printing device mode information specified for a form or report in the Print dialog box.

Note   It is strongly recommended that you consult the Win32 Software Development Kit for complete documentation on the PrtDevMode, PrtDevNames, and PrtMip properties.

Setting

The PrtDevMode property setting is a 94-byte structure that mirrors the DEVMODE structure defined in the Win32 Software Development Kit. For complete information on the PrtDevMode property members, consult the Win32 Software Development Kit.

The PrtDevMode property uses the following members.

DeviceName: A string with a maximum of 32 bytes that specifies the name of the device the driver supports ? for example, "HP LaserJet IIISi" if the Hewlett-Packard LaserJet IIISi is the specified printer. Each printer driver has a unique string.

SpecVersion: An Integer that specifies the version number of the DEVMODE structure in the Win32 Software Development Kit.

DriverVersion: An Integer that specifies the printer driver version number assigned by the printer driver developer.

Size: An Integer that specifies the size, in bytes, of the DEVMODE structure. (This value doesn't include the optional dmDriverData member for device-specific data, which can follow this structure.) If an application manipulates only the driver-independent portion of the data, you can use this member to find out the length of this structure without having to account for different versions.

DriverExtra: An Integer that specifies the size, in bytes, of the optional dmDriverData member for device-specific data, which can follow this structure. If an application doesn't use device-specific information, you set this member to 0.

Fields: A Long value that specifies which of the remaining members in the DEVMODE structure have been initialized. It can be any combination of specific constants or none of them. For available constants, see the Fields member constants.

Orientation: An Integer that specifies the orientation of the paper. It can be either 1 (portrait) or 2 (landscape).
PaperSize An Integer that specifies the size of the paper to print on. If you set this member to 0 or 256, the length and width of the paper are specified by the PaperLength and PaperWidth members, respectively. Otherwise, you can set the PaperSize member to a predefined value. For available values, see the PaperSize member values.

PaperLength: An Integer that specifies the paper length in units of 1/10 of a millimeter. This member overrides the paper length specified by the PaperSize member for custom paper sizes or for devices such as dot-matrix printers that can print on a variety of paper sizes.
 
PaperWidth: An Integer that specifies the paper width in units of 1/10 of a millimeter. This member overrides the paper width specified by the PaperSize member.

Scale: An Integer that specifies the factor by which the printed output will be scaled. The apparent page size is scaled from the physical page size by a factor of scale/100. For example, a piece of paper measuring 8.5 by 11 inches (letter-size) with a Scale value of 50 would contain as much data as a page measuring 17 by 22 inches because the output text and graphics would be half their original height and width.

Copies: An Integer that specifies the number of copies printed if the printing device supports multiple-page copies.

DefaultSource: An Integer that specifies the default bin from which the paper is fed. For available values, see the DefaultSource member values.

PrintQuality: An Integer that specifies the printer resolution. The values are ?4 (high), ?3 (medium), ?2 (low), and ?1 (draft).

Color: An Integer. For a color printer, specifies whether the output is printed in color. The values are 1 (color) and 2 (monochrome).

Duplex: An Integer. For a printer capable of duplex printing, specifies whether the output is printed on both sides of the paper. The values are 1 (simplex), 2 (horizontal), and 3 (vertical).

YResolution: An Integer that specifies the y-resolution of the printer in dots per inch (dpi). If the printer initializes this member, the PrintQuality member specifies the x-resolution of the printer in dpi.

TTOption: An Integer that specifies how TrueType fonts will be printed. For available values, see the TTOption member values.

Collate: An Integer that specifies whether collation should be used when printing multiple copies. Using uncollated copies provides faster, more efficient output, since the data is sent to the printer just once.

FormName: A string with a maximum of 16 characters that specifies the size of paper to use; for example, "Letter" or "Legal".

Pad: A Long value that is used to pad out spaces, characters, or values for future versions.
 
Bits: A Long value that specifies in bits per pixel the color resolution of the display device.

PW: A Long value that specifies the width, in pixels, of the visible device surface (screen or printer).

PH: A Long value that specifies the height, in pixels, of the visible device surface (screen or printer).

DFI: A Long value that specifies the device's display mode.

DFR: A Long value that specifies the frequency, in hertz (cycles per second), of the display device in a particular mode.


You can set the PrtDevMode property using Visual Basic.

This property setting is read/write in Design view and read-only in other views.

Caution   Printer drivers can add device-specific data immediately following the 94 bytes of the DEVMODE structure. For this reason, it is important that the DEVMODE data outlined above not exceed 94 bytes.

Remarks

Only printer drivers that export the ExtDeviceMode function use the DEVMODE structure.

An application can retrieve the paper sizes and names supported by a printer by using the DC_PAPERS, DC_PAPERSIZE, and DC_PAPERNAMES values to call the DeviceCapabilities function.

Before setting the value of the TTOption member, applications should find out how a printer driver can use TrueType fonts by using the DC_TRUETYPE value to call the DeviceCapabilities function.

**********************************************************
PrtMip Property

You can use the PrtMip property in Visual Basic to set or return the device mode information specified for a form or report in the Print dialog box.

Setting

The PrtMip property setting is a 28-byte structure that maps to settings on the Margins tab for a form or report in the Page Setup dialog box.

The PrtMip property has the following members.

LeftMargin, RightMargin, TopMargin, BottomMargin: A Long that specifies the distance between the edge of the page and the item to be printed in twips.

DataOnly: A Long that specifies the elements to be printed. When True (?1), prints only the data in a table or query in Datasheet view, form, or report, and suppresses labels, control borders, grid lines, and display graphics such as lines and boxes. When False (0), prints data, labels, and graphics.

ItemsAcross: A Long that specifies the number of columns across for multiple-column reports or labels. This member is equivalent to the value of the Number Of Columns box under Grid Settings on the Columns tab of the Page Setup dialog box.

RowSpacing: A Long that specifies the horizontal space between detail sections in units of 1/20 of a point.
ColumnSpacing A Long that specifies the vertical space between detail sections in twips.

DefaultSize: A Long. When True, uses the size of the detail section in Design view. When False, uses the values specified by the ItemSizeWidth and ItemSizeHeight members.
ItemSizeWidth A Long that specifies the width of the detail section in twips. This member is equivalent to the value of the Width box under Column Size on the Columns tab of the Page Setup dialog box.

ItemSizeHeight: A Long that specifies the height of the detail section twips. This member is equivalent to the value of the Height box under Column Size on the Columns tab of the Page Setup dialog box.

ItemLayout: A Long that specifies horizontal (1953) or vertical (1954) layout of columns. This member is equivalent to Across, Then Down or Down, Then Across respectively under Column Layout on the Columns tab of the Page Setup dialog box.

FastPrint: Reserved.

Datasheet: Reserved.


The PrtMip property setting is read/write in Design view and read-only in other views.
0
 
LVL 4

Expert Comment

by:MacRena
ID: 6357792
Hmmm, I see that EE can't print the Dash character so it replaces it with the ?

As far as I can tell, that's what that is all about.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 4

Expert Comment

by:MacRena
ID: 6357800
runner100,
I'm not going to bother to copy the example here - it's very complicated.
Let me know if you want help implementing this and I will do my best to figure it out.

Mac
0
 
LVL 54

Expert Comment

by:nico5038
ID: 6996586
for runner100

It's time to clean up this TA, so I will leave a recommendation in Community Support that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7021449
Points removed from account and question closed.

Netminder
CS Moderator
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now