Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Print Report, how i change page size ????
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Print Report, how i change page size ????

 Post Reply Post Reply
Author
Message
gorras View Drop Down
Newbie
Newbie


Joined: 02 September 2009
Location: Argentina
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote gorras Quote  Post ReplyReply Direct Link To This Post Topic: Print Report, how i change page size ????
    Posted: 02 September 2009 at 10:21am
hello ..... I'm newie with these controls and would like to know how to change the page size (example A5), orientation, etc without ShowPrintPageSetup? because this form it presents its information in English and I need to present it in Spanish. thank a lot.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2009 at 10:41am
No need to, use the provided translations:

http://codejock.com/support/articles/com/general/g_1.asp

Also check out the resource editor for untranslated text:


Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2009 at 10:35pm
I guess the answer is not expected - you need to use standard API to setup your printer with all needed information - orientation, page size (type) and so on - if you set this printer as default - all this settings will be automatically used in your print / printpreview
 
For example - this is generic function to set mode and paper type (in MFC but you can port it on any language) ON DEFAULT PRINTER

void SetLandscapeMode(BOOL bLandscapeMode, CString sPaperType)

{

PRINTDLG pd;

pd.lStructSize = (DWORD) sizeof(PRINTDLG);

if (GetPrinterDeviceDefaults(&pd))

{

DEVMODE* pDevMode = (DEVMODE*)::GlobalLock(m_hDevMode);

if (bLandscapeMode)

pDevMode->dmOrientation = DMORIENT_LANDSCAPE;

else

pDevMode->dmOrientation = DMORIENT_PORTRAIT;

int iPT = 0;

if (sPaperType == "Letter 8 1/2 x 11 in")

iPT = DMPAPER_LETTER;

else if (sPaperType == "Letter Small 8 1/2 x 11 in")

iPT = DMPAPER_LETTERSMALL;

else if (sPaperType == "Tabloid 11 x 17 in")

iPT = DMPAPER_TABLOID;

else if (sPaperType == "Ledger 17 x 11 in")

iPT = DMPAPER_LEDGER;

else if (sPaperType == "Legal 8 1/2 x 14 in")

iPT = DMPAPER_LEGAL;

else if (sPaperType == "Statement 5 1/2 x 8 1/2 in")

iPT = DMPAPER_STATEMENT;

else if (sPaperType == "Executive 7 1/4 x 10 1/2 in")

iPT = DMPAPER_EXECUTIVE;

else if (sPaperType == "A3 297 x 420 mm")

iPT = DMPAPER_A3;

else if (sPaperType == "A4 210 x 297 mm")

iPT = DMPAPER_A4;

else if (sPaperType == "A4 Small 210 x 297 mm")

iPT = DMPAPER_A4SMALL;

else if (sPaperType == "A5 148 x 210 mm")

iPT = DMPAPER_A5;

else if (sPaperType == "B4 (JIS) 250 x 354 mm")

iPT = DMPAPER_B4;

else if (sPaperType == "B5 (JIS) 182 x 257 mm")

iPT = DMPAPER_B5;

else if (sPaperType == "Folio 8 1/2 x 13 in")

iPT = DMPAPER_FOLIO;

else if (sPaperType == "Quarto 215 x 275 mm")

iPT = DMPAPER_QUARTO;

else if (sPaperType == "10x14 in")

iPT = DMPAPER_10X14;

else if (sPaperType == "11x17 in")

iPT = DMPAPER_11X17;

else if (sPaperType == "Note 8 1/2 x 11 in")

iPT = DMPAPER_NOTE;

else if (sPaperType == "US Std Fanfold 14 7/8 x 11 in")

iPT = DMPAPER_FANFOLD_US;

/*

#define DMPAPER_ENV_9 19 " Envelope #9 3 7/8 x 8 7/8 "

#define DMPAPER_ENV_10 20 " Envelope #10 4 1/8 x 9 1/2 "

#define DMPAPER_ENV_11 21 " Envelope #11 4 1/2 x 10 3/8 "

#define DMPAPER_ENV_12 22 " Envelope #12 4 \276 x 11 "

#define DMPAPER_ENV_14 23 " Envelope #14 5 x 11 1/2 "

#define DMPAPER_CSHEET 24 " C size sheet "

#define DMPAPER_DSHEET 25 " D size sheet "

#define DMPAPER_ESHEET 26 " E size sheet "

#define DMPAPER_ENV_DL 27 " Envelope DL 110 x 220mm "

#define DMPAPER_ENV_C5 28 " Envelope C5 162 x 229 mm "

#define DMPAPER_ENV_C3 29 " Envelope C3 324 x 458 mm "

#define DMPAPER_ENV_C4 30 " Envelope C4 229 x 324 mm "

#define DMPAPER_ENV_C6 31 " Envelope C6 114 x 162 mm "

#define DMPAPER_ENV_C65 32 " Envelope C65 114 x 229 mm "

#define DMPAPER_ENV_B4 33 " Envelope B4 250 x 353 mm "

#define DMPAPER_ENV_B5 34 " Envelope B5 176 x 250 mm "

#define DMPAPER_ENV_B6 35 " Envelope B6 176 x 125 mm "

#define DMPAPER_ENV_ITALY 36 " Envelope 110 x 230 mm "

#define DMPAPER_ENV_MONARCH 37 " Envelope Monarch 3.875 x 7.5 in "

#define DMPAPER_ENV_PERSONAL 38 " 6 3/4 Envelope 3 5/8 x 6 1/2 in "

*/

if (pDevMode->dmFields & DM_PAPERSIZE)

pDevMode->dmPaperSize = iPT;

::GlobalUnlock(m_hDevMode);

}

else

{

AfxMessageBox("Default printer not found!\nBroken network connection?");

}

}

I guess that this API are language-independant
Back to Top
gorras View Drop Down
Newbie
Newbie


Joined: 02 September 2009
Location: Argentina
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote gorras Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 10:57am
thank a lot for all answers.....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.