How to set the page size and the margins programatically

Hello,
  I am working with crystal report XI Release2 and asp.net.
One of my report is having 4 graphs in a single report.In order to display all the graphs in one page i have set  the paper size as A3.(Via Crysta report ->File->Page set up)
But the page size A3 is not provided by all printers.So problem comes when the application is diployed on a machine which does not support A3 Printer.All the graphs will not be shown on a single page.
Also Each and Every time ,when the application is diployed on a machine,user has to open the crystal report and adjust the page size accordingly to get all the reports on a single page.
This is a kind of usability issue also.
Is it possible to set the page size and the margins programatically say for eg 11 X 17.so that with out doing anything all the 4 graphs will get displayed on a single page ?
Please let me know if you require more information regarding this issue.
Thanks in advance.
smitha.

Hi Ludek,
i could solve the issue by using the follwing code.
report = new ReportDocument();
PageMargins customPageMargin = report.PrintOptions.PageMargins;
report.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
report.PrintOptions.PaperSize = PaperSize.Paper10x14;
customPageMargin.rightMargin = 1;
customPageMargin.topMargin = 0;
customPageMargin.bottomMargin = 0;
report.PrintOptions.ApplyPageMargins(customPageMargin);
Thanks for you help.
Regards,
smitha.

Similar Messages

  • Getting the page size and knowing how many pages they are in PDF file

    Hi There,
    when i do this script (
    var myPDFFile = File.openDialog(["Choose a PDF File"]); ) 
    with JS via Windows it is used for opening a new PDF file when i import this file i need to
    get the page size and how many pages they are in PDF file. but i dont know how to do it.
    please help me.

    Ask here: http://forums.adobe.com/community/indesign/indesign_scripting

  • Pages 5.5.1: When opening a document created with Pages '09 (Version 4.0) with Pages 5.5.1 the page header and the page footer are deleted. How can this be prevented? Or is this a bug in Pages 5.5.1?

    Pages 5.5.1: When opening a document created with Pages '09 (Version 4.0) with Pages 5.5.1 the page header and the page footer are deleted. How can this be prevented? Or is this a bug in Pages 5.5.1?

    Same problem here (no graphics in header or footer) and the problem has been reported months ago. It is another bug/feature lost when Apple moves from 09 to the iCloud-compatible versions.  Complain to Apple, you may have better chance than me and they may finally listen to their users....

  • Extract the Page Size from the Document Properties

    I have multiple drawings of various sizes and need to extract the page size from the document properties of each drawing.
    this.info object can be used to extract the title, author, subject etc of a document but there is no property shown for extracting the page size.
    Can any one please advise a way of extracting the page size from the document properties of a file?
    Any assistance will be most appreciated.
    Once the page size can be extracted I will be using a script to place a stamp with onto the drawing depending on the page size.
    Thank you.

    Thank you for your help George.
    I have used the getPageBox script as follows:
    var aRect = this.getPageBox("Crop");
    var width = aRect[2] - aRect[0];
    var height = aRect[1] - aRect[3];
    console.println("Page 1 has a width of " + width + " and a height of " + height);
    The console reports back - Page 1 has a width of 1162 and a height of 814.
    The actual drawing shows in the document properties page size as 40.988 x 28.713 cm.
    Can you please advise why the getPageBox measurement is not reporting correctly?

  • Is there a way to increase the icon size (and the text below) without using zoom?  I am trying to help out someone who has moderate visual impairment that does not want to use zoom just to see the icons and their labels.

    Is there a way to increase the icon size (and the text below) without using zoom in iOS 7?  I am trying to help out someone who has moderate visual impairment that does not want to use zoom just to see the icons and their labels.

    Hello Apple.
    It seems you have gone to great lengths to improve accessibility in many areas of the iPad. Why was this obvious problem with icon text size missed?  (It's not with the Mac.). And for so long too.
    Do you employ people with actual accessibility problems to help you do UI design?
    I think too, that some buttons are too close for people who might have motor control problems.
    I love my iPad but I fear as I age, the iPad might not keep up with me.

  • How to set a fixed size for the browser window on startup?

    so the browser window has the same size and location on the desktop every time i open a new window???

    In a 2D coordinate system the horizontal values are represented by some letter, usually x. In the same coordinate system the vertical values are classically represented by y.
    Note: In your code, if you wish, you can replace x and y with anything you desire--p and q or perhaps jeff and alice or any variable name you wish, but for simplicity, and usually ease of understanding because almost everyone has had 100's of math problems drilled into their head with (x, y), x and y are used as convention.
    In Java the screen coordinates run from 0 to the width-1 for x and 0 to height-1 for y of the component you are using to display.
    So logically when you have a value of x or y that goes beyond the addressable bounds of your display, then you have to make some type of adjustment--when your value dips below 0, you reset it to 0, when your value goes above what ever width-1 or height-1 then you have to set that value to width-1 or height-1.
    This all assumes that when you hit the wall, floor, or ceiling you stick there until you change directions--if you wish to wrap then you set your value to the opposite bound--so if you go below 0, you would then pop out back in on the right side--your appropriate x would be set to width-1 instead of 0 and in the case of y going below 0 your y would be set to height-1. This is also to say that when you descend below your minimum, then you would pop back out on the opposite side you went out on--so x greater then width-1 would get set to 0 and y greater than height-1 would get set to 0.
    That is not even a start on if you want to include elastic collisions, angle of impact, any type of deceleration force, or anything else.
    In any case... I would recommend that you add more math to your studies, I've never met an engineer or computer science grad that said: "Wow, I really regret taking all that math in college (or HS), I never use it."

  • How to set Jspx page width and hight programatically ?

    Hi All ;
    i need to browse a jspx page has Different width & hight sizes ;
    Please Can SomeOne tell me ow to set Jspx page width and hight programatically ?
    Regards;

    In that case you need to use JavaScript.
    Resizing the browser window in JavaScript is done by using window.resizeTo(400, 400);
    I
    Thanassis

  • Need to reduce the page size, not the file size (shrink the page to allow for binding)

    I need to reduce the image size (text is too large to allow for binding).

    What is the output device - it is best to set scaling there, or scale while printing from Acrobat. The only means to accomplish
    I need to reduce the image size (text is too large to allow for binding).
    Print to Adobe PDF printer.
    Define a page size in the Properties of the PDF Printer
    Print from Acrobat to PDF Printer with scaling in effect.

  • 2 Question How to set the page size and  full screen

    I am looking to find out how to set the page to be 1024 by
    768 static and also how to force a browser window to go to full
    screen. Thanks

    Hi Ludek,
    i could solve the issue by using the follwing code.
    report = new ReportDocument();
    PageMargins customPageMargin = report.PrintOptions.PageMargins;
    report.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
    report.PrintOptions.PaperSize = PaperSize.Paper10x14;
    customPageMargin.rightMargin = 1;
    customPageMargin.topMargin = 0;
    customPageMargin.bottomMargin = 0;
    report.PrintOptions.ApplyPageMargins(customPageMargin);
    Thanks for you help.
    Regards,
    smitha.

  • The display on my screen has become too big.  I've tried adjusting the screen size and the zoom isn't set.  Can anyone help?

    I have an iMAC 7.1 running OS X  10.6.8.
    The display has become too big for the screen.  I've looked at the zoom and it is turned off.  I've tried adjusting the pixel setting (currently 1920 * 1200) to no effect.
    The bar at the top of the screen is elongated, and I can't see the time in the top right hand corner.
    This is affecting everything I lookmat, the dock in the bottom doesn't show until I bring the mouse down (hide dock is off).
    I have no idea what caused this and I can't fix it.
    Does anyone have idea what the problem is and how to fix it?
    ANy help would be greatly appreciated.
    Thanks.

    No wheel, it's a magic mouse.
    Tried safe start.  No difference. 
    The dock and the icons are off the bottom of the screen. 
    I I have finder open and move the cursor to the right to show the time, I lose finder / file /edit from the overhead banner.
    Still no closer to solving it.

  • HT201240 Red closes the page, green reduces the page size. green the enlarges the page but smaller than before. How to get page to full screen?

    How do I get the page back to screen size after using the Green icon[top LHS] Currently returns to 3/4 size??

    This (older) thread explains it well:
    https://discussions.apple.com/message/4613798#4613798

  • How to set  max-heap-size outside the jnlp file?

    Due to bug_id=6631056 It may not be possible to specify max-heap-size within
    the JNLP file for certain jnlp java applications.
    Are there other possibilities to specify this Jvm parameter?
    In the ControlPanel there is the possibility to specify Xmx for applets but not for jnlp.
    I have tried to add properties like
    "deployment.javaws.jre.0.args=Xmx\=128M" without success
    Many thanks

    Even in JNLP also you can specify the max heap size
    <j2se version="1.5+" initial-heap-size="128m" max-heap-size="512m"/>
    Thanks,
    Suresh
    [http://sureshdevi.co.in|http://sureshdevi.co.in]

  • The pages have not got the right size, and the scrollbuton dissappears. and the textboxes seems to have a "reverse tab-button atomatically applied... and the lit over previously vissited pages flashes right and left... what do I do to fix it?

    help me?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Help on how to Set a page length and width.

    Hi guys I'm kind a new to java JDBC and Jasper.
    I'm currently creating my senior project, developing a POS system using Java JDBC, MySql and JasperReport.
    I'm now on the finally stage of my project polishing stage.
    Now here is my problem.
    My adviser wanted my to print sale Invoice using and ordinary Printer let say Espon LX 300 which is available on our Cmpter Lab. He want me to print Sale Invoice using continues paper and try to simulate an actual thing. But I don't know on how to set up a custom paper size in Java or trying to select printer from your system or in your network.
    here is the sample of the code:
    void PrintInvoice(String databaseName,String userName,String password,String reportFile,String Invoice_Reprint)
            HashMap hm = new HashMap();
            hm.put("REPORT_DATE", saledate_tbox.getText());      
            hm.put("REPORT_VAT", vat_tbox.getText());
            hm.put("REPORT_SUBTOTAL", subtotal_tbox.getText());
            hm.put("REPORT_TOTALPAYMENT", total_tbox.getText());
            hm.put("REPORT_CASH", cash_tbox.getText());
            hm.put("REPORT_CHANGE", change_tbox.getText());
            hm.put("REPORT_POS",POS);       
            hm.put("REPRINT", "REPRINT");
            Connection connection = null;
            ResultSet resultSet = null;
            Statement statement = null;
            try{
            Class.forName(JDBC_DRIVER);     
            String query1 = "select invoice.idinvoice as 'Invoice No'" +
                    ",CONCAT(customer.firstname,' ',customer.lastname) as 'Customer'" +
                    ",invoice.date as 'Date-Time'" +
                    ",item.description as 'Description'" +
                    ",sum(invoice_items.quantity) as 'Quantity'" +
                    ",Format(item.regular_price,2) as 'Unit Price'" +
                    ",Concat((invoice_items.discount*100),'%') as 'Whl Disc'" +
                    ",Format(invoice_items.price,2) as 'Price'" +
                    ",employee.username as 'Employee'" +
                    ",Format(invoice.totaltax,2) as 'Vat'" +
                    ",Format(invoice.total,2) as 'Total'" +             
                    ",Format(invoice.cash,2) as 'Cash'" +
                    ",Format((invoice.total-invoice.totaltax),2) as 'Subtotal'" +               
                    ",Format((invoice.cash-invoice.total),2) as 'Change'" +
                    " from invoice,item, invoice_items,customer,employee " +
                    "where invoice.IDINVOICE = invoice_items.IDINVOICE " +
                    "AND invoice_items.UPC_CODE = item.UPC_CODE " +
                    "and invoice.idcustomer = customer.customerid " +
                    "and invoice.idemployee = employee.idemployee " +
                    "AND invoice.idinvoice = (select idinvoice from invoice " +
                    "where idemployee = (select idemployee from employee where username = '"+soldby_tbox.getText()+"') " +
                    "AND idinvoice = '"+Invoice_Reprint+"' ) GROUP BY item.DESCRIPTION";
            connection = (Connection) DriverManager.getConnection(databaseName,userName,password);
            statement = (Statement) connection.createStatement();
            resultSet = statement.executeQuery(query1);
            JasperDesign jasperDesign = JRXmlLoader.load(reportFile);
            JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);        
            JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, hm, new   JRResultSetDataSource(resultSet));        
            JasperExportManager.exportReportToPdfFile(jasperPrint, PDFEXPORT);        
            JasperViewer.viewReport(jasperPrint);
            JasperPrintManager.printReport(jasperPrint, false);       
          }catch(Exception ex) {
             String connectMsg = "Could not create the report " + ex.getMessage() + " " + ex.getLocalizedMessage();
             System.out.println(connectMsg);
          finally{
            try                                                       
                  statement.close();                                     
                  connection.close();                                    
               } // end try                                              
               catch ( Exception exception )                             
                  exception.printStackTrace();                           
               } // end catch    
        }My code print the report on the default printer and default printer setting.
    I hope someone out there can help me thx alot. by the way I uses Ubuntu as my OS.
    The theme of my Senior Project: POS System Using Open Source.
    Hey can someone suggest a project tag line or a better theme cause I believe in the ideals of Open Source,
    Thx

    Try to define ENTER this way & try
    class cl_abap_char_utilities definition load.
    DATA : BEGIN OF enter,
    x type c value cl_abap_char_utilities=>cr_lf,
    END OF enter.
    PS : I am not 100% sure about this.

  • How to set a page header and footer of an excel file i'm creating

    Hello !
    SORRY MY ENGLISH is very BAD.
    I tried to set page header and footer in Excel sheet with ABAP  ole
    DATA : BEGIN OF enter,
    x(1) TYPE x VALUE '0D',
    END OF enter.
    DATA : format(255) TYPE c.
    FORM set_page_sheet.
    CALL METHOD OF excel 'ActiveSheet' = sheet.
    CALL METHOD OF sheet 'PageSetup' = pagesetup.
    SET PROPERTY OF pagesetup 'Orientation' = xllandscape.
    SET PROPERTY OF pagesetup 'PrintTitleRows' = '$9:$12'.
    CLEAR format.
    ERROR
    CONCATENATE 'PAGESHEET' enter-x 'PAGE &P/&N' INTO format.
    ERROR
    SET PROPERTY OF pagesetup 'RightHeader' = format.
    CLEAR format.
    CONCATENATE ' Text 1 ' enter-x 'Text 2'
    enter-x 'Text 3 ' INTO format.
    SET PROPERTY OF pagesetup 'RightFooter' = format.
    FREE OBJECT pagesetup.
    ENDFORM. " set_page_sheet
    Activate report -
    ERROR - The enter-x must by data type c or another then data type x
    Thanks for answer.

    Try to define ENTER this way & try
    class cl_abap_char_utilities definition load.
    DATA : BEGIN OF enter,
    x type c value cl_abap_char_utilities=>cr_lf,
    END OF enter.
    PS : I am not 100% sure about this.

Maybe you are looking for

  • My excel report is not working in executable file ,however,it works well in vi

    Hi all ,      Could any one please help me in getting the reason behind the executable file not working for excel report generation,however I can get the same function without any problem in main vi. I am attaching my code and executable file also ,p

  • Getting 404 error when try to access website

    Hello...I have an iweb created website hosted at GoDaddy. Yesterday I did major changes on the site and uploaded it. If I use the bookmark I have established I can access the site just fine, and it is the current site. if i type in the url I get a 40

  • Fixed Cloned video dislays for movies/avi/divx

    My nForce system is primarily used for entertainment, games, movies. It is heavily integrated to my audio/entertainment system. I used clone mode exclusivly to feed both displays with DVD video.  I was recently frustrated to find "clone mode" was bro

  • Calculating the GR and IR quantity

    Hi Experts,      My requirement is to calculate the Goods Receipt  and Invoice Receipt quantity for single Purchase order. for eg :  1 PO has quantity - > 25. { if GR < IR } it should go to block .    consider 3 GR'S are there for single PO and 1 IR

  • Spline Engine returns zero with all possible inputs

    Hello, The Spline Engine in my FPGA code for my controller appears to not be working under any inputs. I have set both reset position and spline data updated to TRUE and made the spline data output equivalent to the highest possible number. The docum