Displaying report in PDF with Zoom level at 100%

Hi,
I am using ReportDocument.ExportToHttpResponse() to export the desired reports to the PDF format. The report is being displayed on the screen immediately. I want to show the report at 100% zoom level every time the user export the report. My existing code segment for this purpose as follows:
                ExportOptions exportOpts = new ExportOptions();
                PdfFormatOptions pdfOpts = ExportOptions.CreatePdfFormatOptions();
                pdfOpts.UsePageRange = true;
                pdfOpts.FirstPageNumber = 2;
                pdfOpts.LastPageNumber = Int32.MaxValue;
                exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat;
                exportOpts.ExportFormatOptions = pdfOpts;
                rptDoc.ExportToHttpResponse(exportOpts, Response, false, "");
tried to find out any related setting in PdfFormatOptions object but to no avail. Please suggest any possible option to force the viewer to open the report at 100%.
Regards,
Ali
Edited by: ali.net on Jan 11, 2012 2:17 PM

Hi Ali,
Please refer to the 'Rules of Engagement' alwas provide enough information.
- Version of Crystal Reports with detail patch level.
- Version of Visual Studio
- Do you see the same behaviour when the report is exported from CR viewer export button?
- Try using [ExportToStream|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333133393338333533383337%7D.do]
rd.ExportToDisk(ExportFormatType.PortableDocFormat, "C:
ep1.pdf");
See if it reproduces the issue.
- Bhushan.

Similar Messages

  • Displaying report in .pdf format while Running oracle reports over the web

    I am running a report over the web via IE. I am suing .pdf
    format as the file type. The problem I am facing is that the
    report comes out with a blank in acrobat reader if there are
    just one or two records - i.e less thatn one pagefull. THe
    reports displays output only when there ar more than one
    pagefull of records.
    Any explanation for this bezarre behavior and any suggestions?
    I will very much appreciate your help.
    Regards
    Prasad.

    in R12 I found 2 choice
    1) when submitting requests (if available) you can set the output format by using the Options button (upon sompletion section):
    layout --> format --> select format you need (RTF/HTML/EXCEL/PDF)
    2) in the request form (view->request) selecr the report you want to reprint in the Tools menu select print/republish, in the html page that pop up select output format you want, number of copies =1 submit
    www2p

  • Display report in PDF w/o save

    Hi,
    I want to display Report on xmii browser without saving , I tried PDF action but it is giving error when calling url "File doesn't begin with %PDF-". When using image saver for saving file it saved on given path successfully.
    I also used isBinary=true in url paremeter, which I found in forum for one of the reason of this error but still it didn't work.
    Steps I am following for test case:
    1. Create PDF document action block
    2. Create PDF page action block - link to pdf document
    3. Craete PDF text action block with some value - link to pdf document
    4. Assign output parameter of PDF document action to BLS transaction output of type string.
    5. call url:
    http://servername/Lighthammer/Runner?Transaction=TestBLS/TestPDF&OutputParameter=Output&isBinary=true&Content-type=application/pdf
    Please advise if I am missing something, I am using xMII 11.5.
    Thanks and Regards,
    Alok

    Muzammil - Indeed Runner works with 11.5 too and its the Key to trigger a BLS trx via URL.
    You can use Illuminator to execute Query templates so on via URL.
    Alok - Your URL looks good but still if you are getting same error "%PDF" then check whether you are providing exact Output parameter you have mapped in BLS trx.
    Also you can refer to below few threads on the same issue.
    [Thread1|Displaying PDF files created with BLS in xMII 12]
    [Thread2|Creating PDF]
    [Thread3|Stream a PDF using Runner ?]
    Hope this helps!!
    Regards,
    Adarsh

  • Download ALV report to PDF with Lights

    Hi,
    I have a requirement wherein, when i download ALV report to PDF which has Lights in the first column.  My problem is these lights are not displayed instead i get the following in the PDF
    PDF o/p:
    XOO RED SIGNAL
    OXO YELLOW SIGNAL
    OOX GREEN SIGNAL
    Please let me know how to get the lights in the PDF o/p
    Thanks & Regards,
    Sandhya

    Hi Sandhya,
    U can convert any type of display(SF,ALV) to PDF.....
    User Program rstxpdft4 to convert it first the O/P need to be converted into spool.
    cheers,
    Naveen.

  • Get report into PDF - with header logo

    I want to batch generate Discoverer reports into PDF files, with the company logo in the header.
    So, for batch generation - the easiest thing is to write a script which calls Desktop. Ok, no problem.
    Oh, sorry, you can't export to PDF using desktop. Grrr. So okay, I use a utility named Neevia to take the html export from Desktop and covert that to PDF.
    Oh, so sorry! Export to html from Desktop does not output the logo!
    This is on version 10.1 (not that things sound improved more recently).
    I'm tempted to try using a print to pdf print driver, but I need to run hundreds of reports... typically those print drivers (PrimoPDF for example) will pop up and ask for the file name to be specified. I don't see a way to have the batch script answer that prompt with a unique name for each report.
    Ideas folks? It all seems like a Catch-22 to try to get PDF + Logo + Batch generation. Pick 1.

    Hi,
    We use print to PDF print driver to generate PDF. You can set the default directory so that the PDF driver does not prompt for the filename. The filename defaults to the same name as the .DIS file. We use Adobe Professional for this but I am sure you can do the same with other print drivers. What is a pain, and I really wish Oracle would fix this, is that you cannot print from a workbook stored in the database so all the workbooks have to be stored locally. Using a VBScript we can generate dozens of PDF reports overnight without any problems.
    Rod West

  • I need to set the zoom level at 100% so the drop downs on my work site will work. How do I set this?

    I go to a web site to turn in my work hours. This site has drop downs to select information. These drop downs will not work. I called the company I work for and they said that the zoom level needs to be set at 100% on Firefox for these to work. I need to know what I have to do to set this. There system uses Adobe Reader, I have the 9.0 version on my computer.

    View menu => Zoom => Reset (or Ctrl-0 [zero] ) - but I doubt that's the problem. Eg. zoom in or out on this page and menus work fine.
    Could be Adobe versions are out of sync.

  • CRVS2010 Beta - Cannot export report to PDF with unicode characters

    My report has some unicode data (Chinese), it can be previewed properly in the windows form report viewer. However, if I export the report document to PDF file, the unicode characters in exported file are all displayed as a square.
    In the version of Crystal Report 2008 R2, it can export the Chinese characters to PDF when I select a Chinese font in report. But VS2010 beta cannot export the Chinese characters even a Chinese font is selected.

    Barry, what is the specific font you are using?
    The below is a reformatted response from Program Management:
    Using non-Chinese font with Unicode characters (Chinese) the issue is reproducible when using Arial font in Unicode characters field. After changing the Unicode character to Simsun (A Chinese font named 宋体 in report), the problem is solved in Cortez and CR both.
    Ludek

  • Export report to PDF with RDC, ASP

    <p>I use asp on windows 2003 server and Crystal reports XI, service pack 3.</p><p>When I export a report to a PDF file, it creates a 0kb file. No error messages are received. The directory allows for writing files. I can manually export a file via the viewer. When I try to open this file I get an error that another application is using the file (Crystal?)</p><p>Code I use:</p><p><%<br />  reportname = "Radar.rpt"<br />  ExportFileName = "Radar.PDF"<br /></p><p>If Not IsObject (session("oApp")) Then                              <br />  Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.11")<br />End If                                                               </p><p>Path = MID(request.ServerVariables("PATH_TRANSLATED"), 1, (LEN(request.ServerVariables("PATH_TRANSLATED"))-22)) & "Reports\"                   </p><p>If IsObject(session("oRpt")) then<br /> Set session("oRpt") = nothing<br />End if</p><p>On error resume next</p><p>Set session("oRpt") = session("oApp").OpenReport(Path & reportname, 1)</p><p>session("oRpt").MorePrintEngineErrorMessages = False<br />session("oRpt").EnableParameterPrompting = False<br />&#39;session("oRpt").DiscardSavedData</p><p>With session("oRpt").Database.Tables(1).ConnectionProperties <br />&#39; .Item("DSN") = "test"<br />  .Item("User ID") = "test" <br />  .Item("Password") = "test" <br />End With <br />  session("oRpt").ParameterFields(1).AddCurrentValue(Cint(request.Querystring("CustomerID")))<br />End Select</p><p>If Err.Number <> 0 Then<br />    Response.Write "An Error has occured. Please check the ASP page.<BR>"<br />    Response.Write "Error " & Err.number & " " & Err.description  & "<br>"<br /> Response.Write "Report: " & ReportName<br />End If</p><p>session("oRpt").ReadRecords<br />If Err.Number <> 0 Then                                               <br />  Response.Write "Error Occurred Reading Records: " & Err.Description<br />  Set Session("oRpt") = nothing<br />  Set Session("oApp") = nothing<br />  Session.Abandon<br />  Response.End<br />Else<br />  If IsObject(session("oPageEngine")) Then                              <br />   set session("oPageEngine") = nothing<br />  End If<br />  set session("oPageEngine") = session("oRpt").PageEngine<br />End If</p><p>Set CrystalExportOptions = session("oRpt").ExportOptions<br />ExportDirectory = MID(request.ServerVariables("PATH_TRANSLATED"), 1, (LEN(request.ServerVariables("PATH_TRANSLATED"))-22)) & "Docs\"<br />ExportType = "31"<br />CrystalExportOptions.DiskFileName = ExportDirectory & ExportFileName<br />CrystalExportOptions.FormatType = CInt(ExportType)<br />CrystalExportOptions.DestinationType = CInt(1)<br />session("oRpt").Export False<br />%><br /></p><p>&#160;</p>

    Hi Ludek,
    I trid the SP, but doesn't work. I can send the font to you, it is only 50K. If you would like to try I can send it to you, but i am not sure how i can upload the font file. I guess any none Windows standard font will have same issue, i guess.
    For now, i am going to give up and use image file instead.
    Thanks,
    Lan
    Do you know if it is well-known issue in CR?
    - No I do not.
    where i can get any SP of CR for VS2008?
    https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe
    Runtimes for SP1:
    CRRedist2008_ia64.msi
    https://smpdl.sap-ag.de/~sapidp/012002523100006255262008E/CRRedist2008_ia64.zip
    CRRedist2008_x64.msi
    https://smpdl.sap-ag.de/~sapidp/012002523100006255272008E/CRRedist2008_x64.zip
    CRRedist2008_x86.msi
    https://smpdl.sap-ag.de/~sapidp/012002523100006255282008E/CRRedist2008_x86.zip
    I would not mind testing this, but I need to know if there is a free download of this font available. I Googled the font name, but a quick search did not come up with anything.
    Alternatively, you could try CR 2008 (12.x) and see if that will do the trick for you. An Eval of CR 2008 is available here:
    http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx

  • Display reports on PDF file on the client.

    I'm generating reports on web enviroment.
    I want to know how to display the report output on the client using a pdf file?????. Because by default the server generate an html file displayed on the web browser.
    David Alarid.

    Add "desformat=pdf" to your URL. Typically you're URL will look like:
    http://<server>:<port>/reports/rwservlet?report=<reportName>&destype=cache&desformat=pdf&...

  • Save a pdf with zoom 150%

    I convert a few jpg as a pdf and i want that every time i send it or some one open it the acarobat will open it on zoom 150%; the reason is that the pictures looks small on the 66% zoom thats open automatically with the acrobat
    thank you
    J.N

    Hi,
    Something to try.
    Edit > Preferences > select the Category "Documents" > tick "Restore last view settings when reopening documents"
    Be well...

  • Bad files when exporting reports to PDF with CR4E

    <p>Hello,</p><p>Have any of you successfully used CR4E to create a report and report viewer that produces a valid PDF export?  I attempted this and the report looks fine, but when I export it to a PDF and attempt to open it, I get an Adobe Reader error message stating "There was an error opening this document.  The file is damaged and could not be repaired."  I am using Adobe Reader 7.0.8.</p><p>Thanks,</p><p>Matt</p>

    <p>Thank you Sean!  I am using WAS 6.0.2, but I can&#39;t verify the fix you mention as I am not sure which JSP I need to remove the whitespace from.  Can you give me some more info on this?  </p><p>I am experimenting with CR4E as I am in the architectural design stage for a new project, so I don&#39;t really understand the CR4E object model yet.   I created my report viewer JSP from the report, and the following JSP code was generated.  I need to remove the white space from this JSP?</p><p>Thank you again.</p><p>Matt</p><font size="2" color="#bf5f3f"><%@</font><font size="2" color="#3f7f7f">page </font><font size="2" color="#7f007f">import</font><font size="2">=</font><font size="2" color="#2a00ff">"com.businessobjects.samples.JRCHelperSample,</font><font size="2" color="#2a00ff"> <p align="left">com.crystaldecisions.report.web.viewer.CrystalReportViewer,</p><p align="left">com.crystaldecisions.reports.sdk.ReportClientDocument,</p><p align="left">com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,</p><p align="left">com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase,</p><p align="left">com.crystaldecisions.sdk.occa.report.reportsource.IReportSource,</p><p align="left">com.faweb.Company,</p><p align="left">java.util.ArrayList,</p><p align="left">java.util.List"<font size="2" color="#bf5f3f">%><%</font></p></font><font size="2"><p align="left"><font size="2" color="#3f7f5f">// This sample code calls methods from the JRCHelperSample class, which </font></p></font><font size="2"><p align="left"><font size="2" color="#3f7f5f">// contains examples of how to use the BusinessObjects APIs. You are free to </font></p></font><font size="2"><p align="left"><font size="2" color="#3f7f5f">// modify and distribute the source code contained in the JRCHelperSample class. </font></p></font><font size="2" color="#7f0055">try</font>{ String reportName = "Report2.rpt";
    ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
    <font size="2" color="#7f0055">if</font>(clientDoc ==<font size="2" color="#7f0055">null</font>) {
    // Report can be opened from the relative location specified in the CRConfig.xml, or the report location
    // tag can be removed to open the reports as Java resources or using an absolute path
    // (absolute path not recommended for Web applications).
    clientDoc =<font size="2" color="#7f0055">new</font>ReportClientDocument();
    // Open report
    clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
    // ****** BEGIN LOGON DATASOURCE SNIPPET ****************
    // Database username and password
    String userName = "db2inst1"; // TODO: Fill in database user
    String password = "######"; // TODO: FIll in password
    // logon to database
    JRCHelperSample.logonDataSource(clientDoc, userName, password);
    // ****** END LOGON DATASOURCE SNIPPET ****************
    // ****** BEGIN POPULATE WITH POJO SNIPPET ****************
    // **** POPULATE MAIN REPORT ***</font></p></font><font size="2"><p align="left">{</p><p align="left"><font size="2" color="#3f7f5f">// Populate POJO data source</font></p></font><font size="2">String className = </font><font size="2" color="#2a00ff">"com.faweb.Company"</font><font size="2">;</font><font size="2"> <p align="left"><font size="2" color="#3f7f5f">// Look up existing table in the report to set the datasource for and obtain its alias. This table must</font></p></font><font size="2"><p align="left"><font size="2" color="#3f7f5f">// have the same schema as the Resultset that is being pushed in at runtime. The table could be created</font></p></font><font size="2"><p align="left"><font size="2" color="#3f7f5f">// from a Field Definition File, a Command Object, or regular database table. As long the Resultset</font></p></font><font size="2"><p align="left"><font size="2" color="#3f7f5f">// schema has the same field names and types, then the Resultset can be used as the datasource for the table.</font></p></font><font size="2">String tableAlias = </font><font size="2" color="#2a00ff">"Company"</font><font size="2">;</font><font size="2"> <p align="left"><font size="2" color="#3f7f5f">//Create a dataset based on the class com.faweb.Company</font></p></font><font size="2"><p align="left"><font size="2" color="#3f7f5f">//If the class does not have a basic constructor with no parameters, make sure to adjust that manually</font></p></font><font size="2">List dataSet = </font>new<font size="2"> ArrayList();</font><font size="2"> <p align="left">dataSet.add(new* Company(0, "Dummy"));
    // dataSet.add(new Company());
    // dataSet.add(new Company());
    // dataSet.add(new Company());
    // dataSet.add(new Company());
    //Push the resultset into the report (the POJO resultset will then be
    the runtime datasource of the report)
    JRCHelperSample.passPOJO(clientDoc, dataSet, className, tableAlias, "");
    // ****** END POPULATE WITH POJO SNIPPET ****************
    // Store the report document in session
    session.setAttribute(reportName, clientDoc);
    // ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
    // Create the CrystalReportViewer object
    CrystalReportViewer crystalReportPageViewer =<font size="2" color="#7f0055">new</font>CrystalReportViewer();
    // set the reportsource property of the viewer
    IReportSource reportSource = clientDoc.getReportSource();
    crystalReportPageViewer.setReportSource(reportSource);
    // set viewer attributes
    crystalReportPageViewer.setOwnPage(<font size="2" color="#7f0055">true</font>);crystalReportPageViewer.setOwnForm(<font size="2" color="#7f0055">true</font>);
    // Apply the viewer preference attributes
    // Process the report
    crystalReportPageViewer.processHttpRequest(request, response, application,<font size="2" color="#7f0055">null</font>);
    // ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
    // ****** BEGIN EXPORT PDF SNIPPET ***************</font></p></font><font size="2"><p align="left">{</p><p align="left">IReportSource reportSource = clientDoc.getReportSource();</p>JRCHelperSample.exportPDF(reportSource, request, response, config.getServletContext(), </font>true*);
    // ****** END EXPORT PDF SNIPPET ***************</font></p></font><font size="2">} </font>catch* (ReportSDKExceptionBase e) {
    out.println(e);

  • Print MS Access report to PDF with digital signatures.

    I know it is possible to print a Microsoft Access report to a PDF file.  However, we need to be able to add digital signatures to the resulting PDF.  Is it possible to predefine the PDF signature fields in the Access database so that when the report is printed to PDF it is ready from employees to sign off on the PDF?

    This is doable with the ability to do a security.importfromfile which provides the ability to import a certificate.
    This is critical.
    Just create the PDF and then open it up in Access. Be sure to have a reference to the Acrobat Type library.

  • Crystal Report generate PDF with J2EE problem

    Dear All
    I am having a great problem on generating PDF file by Crystal Report in J2EE.
    I have my J2EE application runs Crystal Report to generate PDF files.
    However for a report, i hit the following error (red color) when the PDF is generating.
    But is no problem for the other reports.
    Here is the code  that i used to generate the PDF
    My OS and Java version as follows
    Window 2003 server.
    Java 1.4.2_04
    Please Kindly Help
    Thanks very much
    public static void export(HttpServletRequest request, HttpServletResponse response, String reportPath, ArrayList paramList, ReportExportFormat outFormat) throws Exception{
         System.gc();
      HttpSession session = request.getSession(false);
      Object reportSource = getReportSource(request, reportPath);
      ReportExportControl exportControl = new ReportExportControl();
      if(paramList != null && paramList.size()>0){
       exportControl.setParameterFields(getParamFields(paramList));
      ExportOptions exportOptions = new ExportOptions();
      exportOptions.setExportFormatType(outFormat);
      PDFExportFormatOptions pdfexpopts = new PDFExportFormatOptions();
      exportOptions.setFormatOptions(pdfexpopts);
      exportControl.setReportSource(reportSource);
      exportControl.setExportOptions(exportOptions);
      exportControl.processHttpRequest(request, response, session.getServletContext(), null);
      exportControl.dispose();
        public static IReportSource getReportSource(HttpServletRequest request, String reportPath) throws Exception{
      ReportClientDocument oReportClientDocument = new ReportClientDocument();
      HttpSession session = request.getSession(false);
      oReportClientDocument.open(reportPath, 0);
      return oReportClientDocument.getReportSource();
    00:57:08,671 ERROR reportdefinition Thread-28 - Report printer was not valid, switching to default printer.
    00:57:08,687 ERROR objectformatter Thread-28 - com.crystaldecisions.reports.dataengine.k: |Y
    00:57:09,343 ERROR b Thread-28 - Disk Exporter: no output file was created by an exporter
    00:57:09,343 ERROR b Thread-28 - PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob (from destination?); java.lang.IllegalArgumentException

    Hi,
    I have tried this code but stil the same.
    However i tried setup another tomcat and application in the other machine and the only job for  the application is exporting the report that has problem, then the error is gone.
    So i guess that is the memory size problem.
    Thanks for this
    One more question about the memory size between Tomcat and Crystal report.
    I have set in catalina.bat as
    set JAVA_OPTS = "-Xms2048M -Xmx1024M"
    and CRConfig as
    <JVMMaxHeap>1024000000</JVMMaxHeap>
    <JVMMinHeap>512000000</JVMMinHeap>
    1. Is that the correct setting.?
    2. The memory in the JAVA_OPT and is the MAX and MIN memory that java would use,
        then is the Max memory in CRConf is 1024M out of the java heap size or the application use another 1024 memory

  • Error when export report to PDF with a none standard Windows font

    Hi,
    I got this error when trying to export PDF under VS2008 with an special true type font in the code behind. The error says:
    ...temp_9550ab94-02fc-4362-b259-cc6de8d6c04b {32E546F5-C6A3-44FC-B8EF-D5E37A1118FA}.rpt:\nOperation not yet implemented.
    In the crystal reort under VS2008, I use a special font which is true type and it is already installed in the system, I can see the font in many other software like Word, Notepad, etc... without any problem.
    Is anyone know how to fix it? please help.
    Many thanks!!!
    Lan

    Hi Ludek,
    I trid the SP, but doesn't work. I can send the font to you, it is only 50K. If you would like to try I can send it to you, but i am not sure how i can upload the font file. I guess any none Windows standard font will have same issue, i guess.
    For now, i am going to give up and use image file instead.
    Thanks,
    Lan
    Do you know if it is well-known issue in CR?
    - No I do not.
    where i can get any SP of CR for VS2008?
    https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe
    Runtimes for SP1:
    CRRedist2008_ia64.msi
    https://smpdl.sap-ag.de/~sapidp/012002523100006255262008E/CRRedist2008_ia64.zip
    CRRedist2008_x64.msi
    https://smpdl.sap-ag.de/~sapidp/012002523100006255272008E/CRRedist2008_x64.zip
    CRRedist2008_x86.msi
    https://smpdl.sap-ag.de/~sapidp/012002523100006255282008E/CRRedist2008_x86.zip
    I would not mind testing this, but I need to know if there is a free download of this font available. I Googled the font name, but a quick search did not come up with anything.
    Alternatively, you could try CR 2008 (12.x) and see if that will do the trick for you. An Eval of CR 2008 is available here:
    http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx

  • Print Report to PDF with columns vertical instead of horizontal

    I enabled report printing for a report region but the PDF lists the columns horizontally even though the columns are listed vertically on the report page. Is there a way to list the columns vertically on the PDF so that it matches the layout on the report page. Thanks for your help.

    Hi hhsu68
    Wondering how you are arranging columns listed vertically on the report page?
    You mean just selecting any vertical report template, or
    you mean just column headers are vertical and the data as normal (horizontal)?
    If its the second case could you please let me know how you did that?
    Off course I would also like to know if you have found a solution to your problem as well.
    Thank you
    Ligon

Maybe you are looking for