dbTalk Databases Forums  

Printing to Custom Size Paper

comp.databases.ms-access comp.databases.ms-access


Discuss Printing to Custom Size Paper in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Bob Darlington
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-21-2010 , 07:45 PM






David,
I'm still testing in the mdb on my development PC and I can't get it to work
there.
Hopefully, if I can get it to work in the mdb, it will (might) work in the
mde at the client site.
That's my goal anyway.
I still haven't heard from anyone who has successfully done so in either
file form.

--
Bob Darlington
Brisbane
"David-W-Fenton" <NoEmail (AT) SeeSignature (DOT) invalid> wrote

Quote:
"Bob Darlington" <bob (AT) notheredpcman (DOT) com.au> wrote in
news:4cbfe5de$0$10379$afc38c87 (AT) news (DOT) optusnet.com.au:

It seems that no-one has successfully used the Printer object for
custom paper sizes.

Have you compared this in MDB vs. MDE? I recall that you're trying
to do this in an MDE, and I'm just wondering if that is the source
of the problem.

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
  #12  
Old   
yanto
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-23-2010 , 03:00 AM






Hi Bob,
I have the similar problem, so far I did what Tony suggested, I go to
client place, setup CUSTOM page on server properties, open my report
in design mode, change pagesize as CUSTOM and recompile it, so far
it's ok, but I prefer to do once a time so I use this way, I put my
report on backend database so you just set once for the custom page
then I call that report from my frontend so now everytime I copy my
modified fron'tend, I don't need to set the pagesize in my client
place even I can email it...but this doesn't works if I use Ms Access
Runtime in my client place
HTH

Yanto

On Oct 22, 7:45*am, "Bob Darlington" <b... (AT) notheredpcman (DOT) com.au>
wrote:
Quote:
David,
I'm still testing in the mdb on my development PC and I can't get it to work
there.
Hopefully, if I can get it to work in the mdb, it will (might) work in the
mde at the client site.
That's my goal anyway.
I still haven't heard from anyone who has successfully done so in either
file form.

--
Bob Darlington
Brisbane"David-W-Fenton" <NoEm... (AT) SeeSignature (DOT) invalid> wrote in message

news:Xns9E18C477462E8f99a49ed1d0c49c5bbb2 (AT) 74 (DOT) 209.136.99...



"Bob Darlington" <b... (AT) notheredpcman (DOT) com.au> wrote in
news:4cbfe5de$0$10379$afc38c87 (AT) news (DOT) optusnet.com.au:

It seems that no-one has successfully used the Printer object for
custom paper sizes.

Have you compared this in MDB vs. MDE? I recall that you're trying
to do this in an MDE, and I'm just wondering if that is the source
of the problem.

--
David W. Fenton * * * * * * * * *http://www.dfenton.com/
contact via website only * *http://www.dfenton.com/DFA/- Hide quoted text -

- Show quoted text -

Reply With Quote
  #13  
Old   
Phil
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-24-2010 , 02:45 AM



On 23/10/2010 09:01:00, yanto wrote:
Quote:
Hi Bob,
I have the similar problem, so far I did what Tony suggested, I go to
client place, setup CUSTOM page on server properties, open my report
in design mode, change pagesize as CUSTOM and recompile it, so far
it's ok, but I prefer to do once a time so I use this way, I put my
report on backend database so you just set once for the custom page
then I call that report from my frontend so now everytime I copy my
modified fron'tend, I don't need to set the pagesize in my client
place even I can email it...but this doesn't works if I use Ms Access
Runtime in my client place
HTH

Yanto

On Oct 22, 7:45*am, "Bob Darlington" <b... (AT) notheredpcman (DOT) com.au
wrote:
David,
I'm still testing in the mdb on my development PC and I can't get it to w
ork
there.
Hopefully, if I can get it to work in the mdb, it will (might) work in th
e
mde at the client site.
That's my goal anyway.
I still haven't heard from anyone who has successfully done so in either
file form.

--
Bob Darlington
Brisbane"David-W-Fenton" <NoEm... (AT) SeeSignature (DOT) invalid> wrote in message

news:Xns9E18C477462E8f99a49ed1d0c49c5bbb2 (AT) 74 (DOT) 209.136.99...



"Bob Darlington" <b... (AT) notheredpcman (DOT) com.au> wrote in
news:4cbfe5de$0$10379$afc38c87 (AT) news (DOT) optusnet.com.au:

It seems that no-one has successfully used the Printer object for
custom paper sizes.

Have you compared this in MDB vs. MDE? I recall that you're trying
to do this in an MDE, and I'm just wondering if that is the source
of the problem.

--
David W. Fenton * * * * * * * * *http://www.dfenton.com/
contact via website only * *http://www.dfenton.com/DFA/- Hide quoted text -

- Show quoted text -


Have you tried the old fashioned method (AK2) using things like PRTMIP &
DEVMODE?

Phil

Reply With Quote
  #14  
Old   
Bob Darlington
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-24-2010 , 05:33 PM



Phil,
The app is distributed as an mde.

--
Bob Darlington
Brisbane
"Phil" <phil (AT) stantonfamily (DOT) co.uk> wrote

Quote:
On 23/10/2010 09:01:00, yanto wrote:
Hi Bob,
I have the similar problem, so far I did what Tony suggested, I go to
client place, setup CUSTOM page on server properties, open my report
in design mode, change pagesize as CUSTOM and recompile it, so far
it's ok, but I prefer to do once a time so I use this way, I put my
report on backend database so you just set once for the custom page
then I call that report from my frontend so now everytime I copy my
modified fron'tend, I don't need to set the pagesize in my client
place even I can email it...but this doesn't works if I use Ms Access
Runtime in my client place
HTH

Yanto

On Oct 22, 7:45 am, "Bob Darlington" <b... (AT) notheredpcman (DOT) com.au
wrote:
David,
I'm still testing in the mdb on my development PC and I can't get it to
w
ork
there.
Hopefully, if I can get it to work in the mdb, it will (might) work in
th
e
mde at the client site.
That's my goal anyway.
I still haven't heard from anyone who has successfully done so in either
file form.

--
Bob Darlington
Brisbane"David-W-Fenton" <NoEm... (AT) SeeSignature (DOT) invalid> wrote in message

news:Xns9E18C477462E8f99a49ed1d0c49c5bbb2 (AT) 74 (DOT) 209.136.99...



"Bob Darlington" <b... (AT) notheredpcman (DOT) com.au> wrote in
news:4cbfe5de$0$10379$afc38c87 (AT) news (DOT) optusnet.com.au:

It seems that no-one has successfully used the Printer object for
custom paper sizes.

Have you compared this in MDB vs. MDE? I recall that you're trying
to do this in an MDE, and I'm just wondering if that is the source
of the problem.

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/- Hide quoted
text -

- Show quoted text -



Have you tried the old fashioned method (AK2) using things like PRTMIP &
DEVMODE?

Phil

Reply With Quote
  #15  
Old   
Bob Darlington
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-24-2010 , 05:36 PM



Thanks Yanto.
Unfortunately, I have a mixture of runtime and non runtime installations.
I hadn't thought about attaching the report to the backend though, so I'll
have a play with that idea.

--
Bob Darlington
Brisbane
"yanto" <yanto2000 (AT) gmail (DOT) com> wrote

Hi Bob,
I have the similar problem, so far I did what Tony suggested, I go to
client place, setup CUSTOM page on server properties, open my report
in design mode, change pagesize as CUSTOM and recompile it, so far
it's ok, but I prefer to do once a time so I use this way, I put my
report on backend database so you just set once for the custom page
then I call that report from my frontend so now everytime I copy my
modified fron'tend, I don't need to set the pagesize in my client
place even I can email it...but this doesn't works if I use Ms Access
Runtime in my client place
HTH

Yanto

On Oct 22, 7:45 am, "Bob Darlington" <b... (AT) notheredpcman (DOT) com.au>
wrote:
Quote:
David,
I'm still testing in the mdb on my development PC and I can't get it to
work
there.
Hopefully, if I can get it to work in the mdb, it will (might) work in the
mde at the client site.
That's my goal anyway.
I still haven't heard from anyone who has successfully done so in either
file form.

--
Bob Darlington
Brisbane"David-W-Fenton" <NoEm... (AT) SeeSignature (DOT) invalid> wrote in message

news:Xns9E18C477462E8f99a49ed1d0c49c5bbb2 (AT) 74 (DOT) 209.136.99...



"Bob Darlington" <b... (AT) notheredpcman (DOT) com.au> wrote in
news:4cbfe5de$0$10379$afc38c87 (AT) news (DOT) optusnet.com.au:

It seems that no-one has successfully used the Printer object for
custom paper sizes.

Have you compared this in MDB vs. MDE? I recall that you're trying
to do this in an MDE, and I'm just wondering if that is the source
of the problem.

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/- Hide quoted text -

- Show quoted text -

Reply With Quote
  #16  
Old   
Phil
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-24-2010 , 06:02 PM



On 24/10/2010 23:33:04, "Bob Darlington" wrote:
Quote:
Phil,
The app is distributed as an mde.

Don't think that is a problem

Phil

Reply With Quote
  #17  
Old   
Bob Darlington
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-24-2010 , 07:02 PM



Phil,
I thought that those methods required the reports to be able to be opened in
design mode, which you can't do in mde.

--
Bob Darlington
Brisbane
"Phil" <phil (AT) stantonfamily (DOT) co.uk> wrote

Quote:
On 24/10/2010 23:33:04, "Bob Darlington" wrote:
Phil,
The app is distributed as an mde.


Don't think that is a problem

Phil

Reply With Quote
  #18  
Old   
Phil
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-25-2010 , 11:18 AM



On 25/10/2010 01:02:12, "Bob Darlington" wrote:
Quote:
Phil,
I thought that those methods required the reports to be able to be opened
in design mode, which you can't do in mde.

Er um deep crimson

Of course you're right

apologies

Phil

Reply With Quote
  #19  
Old   
Bob Darlington
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-25-2010 , 06:38 PM



Thanks to all for their help on this one.
I've reluctantly come to the conclusion that I can't use the Printer object
to reset a custom paper page size after migrating my front end to the client
PCs, so I've given up on that tack.
Instead, I moved along the line suggested by Yanto (in this thread) and
created a new db to hold the Cheque report with attendant queries, linked
relevant tables to the backend db and loaded it into the user's 'CurrentDir'
folder.
I can then open it with OpenCurrentDatabase as follows:

Set objAccess = New Access.Application
With objAccess
lngRet = apiSetForegroundWindow(.hWndAccessApp)
lngRet = apiShowWindow(.hWndAccessApp, SW_NORMAL)
lngRet = apiShowWindow(.hWndAccessApp, SW_MAXIMIZE)
.OpenCurrentDatabase CurrentDir & "cheques.mdb"
.DoCmd.OpenReport strReport, acViewPreview, , , , gblPropNum
End With


--
Bob Darlington
Brisbane
"Bob Darlington" <bob (AT) notheredpcman (DOT) com.au> wrote

Quote:
I've already explored this through a different 'Subject' line, and
received some helpful replies, but unfortunately I still can't get it to
work.
So, my question now is:
Has anybody successfully used code similar to that below to change paper
size to a custom size when printing to specialised forms?

Application.Printer = Application.Printers("Cheque Printer")
DoCmd.OpenReport "rCheque", 2, , "PropNum = " & gblPropNum
Set rpt = Reports!rCheque
With rpt.Printer
.DefaultSize = False
.PaperSize = acPRPSUser
.ItemSizeHeight = 5301
.ItemSizeWidth = 15252
End With

The code runs without generating an error, but invariably opens the report
in 'Letter' paper size.
I have set up a custom paper size called 'Cheque' which I can manually set
and all works fine.
But I need to distribute the app in an mde, so want to change the paper
size when the report is opened as above.
Has anyone got this to work?
--
Bob Darlington
Brisbane

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.