Suppress "Excel format options" dialog when call CRPE

I'm looking at pretty old CRPE dll (written in Nov 1991)l now, to find a way to export excel without "Excel Format Options" dialog.
I have a crystal report and want to export to excel. Before call API function "PEStartPrintJob", want to set up all excel format options and then run the print job without the dialog popping up.
I have CR 9.0 installed on my computer.
Any idea?
Thanks.
Edited by: JasonLi on Jul 16, 2010 4:45 PM

Hi Jason,
Be aware that CR 9 is the last version you are licensed to use crpe32 as your report engine. It's be deprecated. Moving forward you'll have to move to Visual Studio .NET and use the Report Application server as the report engine.
Also be aware that the exporting format changed as of CR 8.5.
Here's the code that should work for you:
          // Export to XLS
          // Initialize members of diskOptions
         memset(&diskOptions, 0, sizeof(UXDDiskOptions));
          diskOptions.structSize = UXDDiskOptionsSize;
          diskOptions.fileName = "c:
tmp
report.xls";
          // PEExportOptions
         memset(&XLSFormatOptions, 0, sizeof(UXFXlsOptions));
          XLSFormatOptions.structSize = UXFXlsOptionsSize;
          XLSFormatOptions.bExportAllPages = true;
          XLSFormatOptions.bUseFormatInDataOnly = true;
          //  Initialize members of XLS format
         memset(&exportOptions, 0, sizeof(PEExportOptions));
          exportOptions.StructSize = PE_SIZEOF_EXPORT_OPTIONS;
          lstrcpy(exportOptions.formatDLLName, "crxf_xls.dll");
          //exportOptions.formatType = UXFXlRecDumpType;  
          exportOptions.formatType = UXFXl97Type;  
          //     Initialize members of Destination Options
          lstrcpy(exportOptions.destinationDLLName, "u2ddisk.dll");
          exportOptions.destinationType = UXDDiskType;
          exportOptions.destinationOptions = &diskOptions;
          exportOptions.formatOptions = &XLSFormatOptions;
          // Start Exporting
          if (!PEExportTo(jobNumber, &exportOptions))
               CString temp;
               temp.Format("Error in PEExportTo %d", PEGetErrorCode(jobNumber));
               AfxMessageBox(temp);
               // Start the job
          if (!PEStartPrintJob(jobNumber,true))
               CString temp;
               temp.Format("Error in PEStartPrintJob %d", PEGetErrorCode(jobNumber));
               AfxMessageBox(temp);

Similar Messages

  • Excel format options

    We're using Crystal 11.5 & 12 .NET interface.
    We want to set certain export formatting options for the Excel Data Only export format and have not been able to find the appropriate properties or methods in the documentation.  We have used the following code with the COM interface which works properly.  However we have been unable to make this work in .NET.  The list of the properties are as follows:
    ExportOptions.ExcelExportAllPages = True
    ExportOptions.ExcelExportImagesInDataOnly = True
    ExportOptions.ExcelUseWorksheetFunctions = True
    ExportOptions.ExcelMaintainRelativeObjectPosition = True
    ExportOptions.ExcelMaintainColumnAlignment = True
    ExportOptions.ExcelExportPageAreaPair = True
    Does anyone know what the appropriate .NET methods/properties are for Excel Data Only export?

    You will have to use the RAS SDK. Download the Report Application Server 12 SDK help file from here:
    http://help.sap.com/businessobject/product_guides/boexir31/en/rassdk_net_apiRef_12_en.chm
    and then search for export. Then see ExcelExportFormatOptionsClass properties.
    For more info re. RAS see:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10b840c0-623f-2b10-03b5-9d1913866b32
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b050afe0-2fa5-2b10-658d-98f214ba6a4a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f006a5e6-7e64-2b10-8a84-8b15ca5cacfc
    https://www.sdn.sap.com/irj/boc/businessobjects-samples?rid=/webcontent/uuid/b02c1cac-ad86-2b10-88ae-cb36551bab06 [original link is broken]
    Ludek

  • Export to Excel Formating Option Problem

    Hi all!
    I create a Crystal Reports.when i export to Excel File in a winform app,there has the 'Create page breaks for each page' option,but in asp.net web page.there is only two option,and not include the 'Create page breaks for each page' .I excpet the Excel File was page breaked.
    has any ideas?
    Thanks!
    Ray

    You can use the ExcelFormatOptions to specify what you want the export to look like.
    Look for it here:
    [http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm]
    You can also set up the reports export options that you want to always be used by opening the report in Crystal and going to File|Export|Report Export Options.
    I am not sure about the 2nd question.  You will want to create a new thread for that and someone else may know the answer.  Can you do it when you export it from Crystal Reports? If not, then you won't be able to do it from your application.

  • CUPS print job options fail when called from lp (UNIX command line)

    Under Leopard this command-line print request fails to respect the specified job options:
    lp -o number-up=2 -o page-border=double <filename>
    Though it worked great in Tiger, the number-up and page-border job options are now disregarded. I have tried lots of things (and wasted lots of paper) such as setting them permanently with lpoptions (and they do appear changed when the lpoptions command is repeated), using lpr instead of lp, reinstalling the printer via the CUPS localhost web interface, enabling non-Bonjour scanning with the hack to the CUPS preference file, deselecting "Last Printer Used" for the default printer in the System Preferences -- nope.
    I have not tried other job options; I assume that whatever is breaking these two is breaking all the others, and even if it isn't, these two are what I want.
    Is something new in Leopard overriding lpoptions job options? How do I make it stop? It is sooooo aggravating when something that used to work fine breaks. The printer is an HP LaserJet 4000N connected by Ethernet and discovered with AppleTalk.
    Thanks for any advice!

    Thanks John, I did search but somehow missed that thread.
    However it did not help. With or without the "-p printername" argument lpoptions does make a persistent change to its own data:
    +$ lpoptions+
    +media=Letter sides=one-sided finishings=3 copies=1 job-hold-until=no-hold job-priority=50 number-up=2 auth-info-required=none job-sheets=none,none printer-info=Barrow printer-is-accepting-jobs=1 printer-is-shared=0 printer-location='Local Zone' printer-make-and-model='HP LaserJet 4000 Series' printer-state=3 printer-state-change-time=1209495301 printer-state-reasons=none printer-type=2134228 page-border=double+
    You can see that the printer "Barrow" has remembered "number-up=2" and "page-border=double". Regardless if I give any of these commands:
    +lpr <filename>+
    +lpr -P Barrow <filename>+
    +lp <filename>+
    +lp -d Barrow <filename>+
    none of them show the results of these option settings (and somewhere in the forest another tree is cut down).

  • How to avoid the printer device option screen when calling smartform?

    Dear gurus
    i have create a smartform and i have called it from my program.
    i dont want to show the printer device options how can i achieve that ?
    below is the code for calling my smartform.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = 'ZSNAK_VF03_PRINTING'
       IMPORTING
        fm_name                  = smart_form_function_nm
       EXCEPTIONS
         no_form                  = 1
         no_function_module       = 2
         OTHERS                   = 3
      CALL FUNCTION smart_form_function_nm
        EXPORTING
          itab1              = itab1
          temp4              = temp4
          temp3              = temp3
          ref_doc_no         = ref_doc_no
          po_no              = po_no
          printno            = printno
        TABLES
          itab_tab           = itab_tab
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
    Regards
    Saad Nisar.

    Hi,
    check this link
    smartforms  -   print option
    Regards and Best wishes.

  • How to supress Export Option dialog while exporting

    Hi All;
    I have upgraded my application from CR 10 to CR XI R2. I am using Crystal report for exporting. After upgrading while exporting to excel format it is popping up dialog for export options.Earlier it was not asking for that. Can anyone suggest how to suppress this dialog.My application is in c++. I am also setting IExportOptions in the code.

    Hi,
    I'm using the RDC interface to batch run reports and export to PDF or Excel. The Excel one always shows 'Excel Format Options' dialog. This is offcourse not what I want.
    How can I suppress this dialog?
    Crystal 10.
    Cheers,
    Marco

  • Excel Export Options Window

    I am using CR Basic with VB2008. Is there a way to display the Excel Export Options dialog when the user selects to export a report to Excel? I am wanting to do this through code, but is it even possible? This is the same dialog that pops up when you select to export a report to excel from within the IDE.
    Thanks,
      Steve

    The below, are the only exposed export option APIs:
    Private Sub ExportReportInExcel(ByVal reportDocument As ReportDocument, _
          ByVal fromPage As Integer, ByVal toPage As Integer)
          Dim myExportOpts As New ExportOptions
          myExportOpts.ExportFormatType = ExportFormatType.Excel
          Dim myExportFormatOptions As ExcelFormatOptions = _
          ExportOptions.CreateExcelFormatOptions()
          myExportFormatOptions.ConvertDateValuesToString = True
          myExportFormatOptions.ExcelAreaGroupNumber = 1
          myExportFormatOptions.ExcelAreaType = AreaSectionKind.Detail
          myExportFormatOptions.ExcelConstantColumnWidth = 9.5
          myExportFormatOptions.ExcelTabHasColumnHeadings = True
          myExportFormatOptions.ExcelUseConstantColumnWidth = True
          myExportFormatOptions.ExportPageBreaksForEachPage = True
          myExportFormatOptions.ExportPageHeadersAndFooters = ExportPageAreaKind.OnEachPage
          myExportFormatOptions.FirstPageNumber = fromPage
          myExportFormatOptions.LastPageNumber = toPage
          myExportFormatOptions.ShowGridLines = True
          myExportFormatOptions.UsePageRange = True
          myExportOpts.ExportFormatOptions = myExportFormatOptions
          reportDocument.Export(myExportOpts)
        End Sub
    The sample app vbnet_win_export.zip availbale from [here|https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples] may help.
    The InProc RAS has the property MaintainColumnAlignment in addition to what the CR SDK has which is probably the colsest to "Maintain relative object position"
    [This|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e041f772-9d3b-2c10-a790-e3ea083a3dce] is a RAS excel export sample app.
    Developer help file is [here|http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_dg_12_en.chm].
    API reference is [here|http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_apiRef_12_en.chm]
    The above are for Crystal Reports. RAS is at the following links:
    http://help.sap.com/businessobject/product_guides/boexir31/en/rassdk_net_dg_12_en.chm
    http://help.sap.com/businessobject/product_guides/boexir31/en/rassdk_net_apiRef_12_en.chm
    Ludek

  • Bring Excel 2007 to the front when called from LabView v9 in Windows 7

    I am building a duplicate system using Windows 7, LabView v9 and Excel v2007.  The original system used WinXP, Excel 2007 and LabView v8.6.  The issue is that the original system was able to bring Excel to the front when called from Labview using the property node -application-> visible.  This new configuration runs Excel, loads the data, runs the macros but does not bring Excel to the front.  The icon blinks in the Win7 taskbar and when selected displays over LabView.  If I minimize the Labview window, Excel is there.  This leads me to conclude that Excel is visible, as requested but will not come to the front until selected from the taskbar.  The only differences, besides the versions, is the original system template files used the .xls extension in and was run in Excel in compatible mode.  At the customers request, the new system uses the .xlsm extension on the Excel template files.  I have tried using application.visible = True in the macro as well.  Could be a setting in Labview?  Could be a setting in Excel? Could be .xls vs. .xlsm? Or an issue with Windows 7 and the newer version of Labview. 
    HP workstation - Labview v9 - Windows 7 - Excel 2007 sp2
    Thank you in advance
    Stephen
    Solved!
    Go to Solution.

    I will try the windowstate change.  Were these done in succession? (i.e. property node -> property node -> property node) Or were they done along the way such as call the ActiveX open and a property node then in a worksheet modification area etc. so there was some time between calls? 
    I am not sure about the API since the discussion there is with regard to DDE.  (Taken from the link document:  If you want to call a DLL that contains ActiveX
    objects, use the Automation
    Open VI with the Property
    Node and the Invoke
    Node.).  I am calling Excel as an application not as a library call unless I am mistaken, which I could certainly be.  Are you thinking that once Excel is active through the Automation Open VI that a DLL call to set the application visible would work?  I may be trying this already but in Excel through the use of the macro I call from LabView.  It contains application.visible = True at the beginning before reading files and plotting data.  
    I may try sprinkling Property node with application->visible in various locations in the LabView diagram as I do update cells after the call to the plot macro.  The puzzle for me is the blinking Excel icon in the task bar.  This means active and running but not visible or something wrong as well.  There are a few #VALUE cells if not all test in the system are run.  Again not a problem in Excel 2007-WinXP-LV8.6
    Thank you again one and all.

  • Download alv report in excel format in Linux

    Hi All,
    I am working on SAP GUI for Java in Linux PC. I have installed
    Open Office.
    After executing an alv report there is no spreadsheet option
    to download the report in excel format .
    Also, when doing Save as Local File -> Spreadsheet ,
    the report is not downloaded in proper format.
    So, how to download the alv reports in excel format ?

    Hi Vinod ,
    Save as Local File -> Spreadsheet
    It will ask for Directory and file name with .xls format . Give proper name e.g. test.xls and save, and after saving file right click on the file and click on Open with "OpenOffice.org calc".
    It will definetly work.
    Abhijeet

  • Java execution failed.  Please check the Java Option in the option dialog.

    I recently installed BI Publisher MS Word Add-In.
    After installing I get the error "Java execution failed. Please check the Java Option in the option dialog" when trying to preview a template in (pdf, word, excel...).
    I tried changing a java parameter as suggested by the following thread but it did not get past the error.
    Java execution failed.  Please check the Java Option in the option dialog.
    Here are my settings to the Word Add-In under "Oracle Bi Publisher > Options... > Preview (tab)
    Java Home = C:\Program Files\Java\jre6
    Java Option = -Xmx512M
    Any help would be appreciated.
    Todd

    Is there a log I can see more about this Java error? I've looked for a log but can't see one.
    TIA,
    Todd

  • Error in BI Publisher when generating excel format

    Hi,
    I was facing an issue in BI Publisher where I was getting this error message when trying to generate the excel format for a report.
    oracle.apps.xdo.template.fo.area.BlockArea.
    BIP Version : Oracle BI Publisher 10.1.3.4.1
    Template used : XSL-FO
    Data source : XML file
    However, if I turn off the "Enable Document Caching" option in the Report node , the excel report is getting generated. The issue is resolved now, but am trying to understand what the issue was and how turning off the cache resolved it.
    If anyone has faced this issue before, and knows the reason - please let me know
    Thanks in advance
    Sujith

    Sujith
    So the doc cache, does just that it caches the document. I assume there might be some issue with caching Excel files. Have to admit I can not reproduce it. Turning cache on and constantly calling for the Excel (either type) is not failing.
    Ahh just noticed that you have an XSL-FO template, can you share it and some data so I test and maybe log a bug?
    Thanks
    Tim

  • UnknownExportFormat when trying to export Excel format

    Hi, I'm getting UnknownExportFormatException when trying to export the crystal report to Excel format. But I can export the
    report to Word, PDF or RTF without any problem.
    The manifest file of the CrystalReportsRuntime.jar has below information.
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 1.5.0_12-b04 (Sun Microsystems Inc.)
    Product-Name: Crystal Reports Runtime Components
    Implementation-Title: Crystal Reports Runtime Components
    Implementation-Version: 12.2.200.454
    Implementation-Vendor: Business Objects, Inc.(C)
    Can the experts point out whether this version of jar file supports the Excel or not? If not, then whether there is a service pack to fix it. Or which version we need to upgrade to to get this fixed.
    Thanks very much in advance.
    Eric
    Caused by: com.crystaldecisions.reports.exportinterface2.exceptions.UnknownExportFormatException: UnknownExportFormat
         at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.for(Unknown Source)
         at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.a(Unknown Source)
         at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(Unknown Source)
         at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(Unknown Source)
         at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.businessobjects.sdk.erom.jrc.a.a(Unknown Source)
         at com.businessobjects.sdk.erom.jrc.a.execute(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ds.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         ... 33 more

    We export it from java servlet. But we used ReportExportFormat._MSExcel (which is constant value 2 defined in crystal report SDK) for excel export. As I looked at your code sample in JSP page, I changed the "Excel" value from 2  to 6 which is ReportExportFormat._recordToMSExcel as in the sample code
    We have this code snippet to set the export options.     (No change)
                 ExportOptions exportOptions = new ExportOptions();
                 exportOptions.setExportFormatType(ReportExportFormat.from_int(exportType.getId()));
                 exportOptions.setFormatOptions(formatOptions);
    And now CRExportType enum is defined as below with value changed from 2 to 6 for Excel.
        WORD("Word",1),
        EXCEL("Excel",6),   //_recordToMSExcel; _MSExcel=2 didn't work with error UnsupportedFormatException
        RTF("RTF", 3), //_RTF
        PDF("PDF", 5); //_PDF
    After the change, it did work. So I'm still not clear why _MSExcel didn't work and what's the difference between _MSExcel(2) and _recordToMSExcel (6). But I'm good for now and thanks for your help.

  • Cells merge issue when extracting webi report in excel format

    Hi Experts,
    We have some WEBI reports in BO XI 3.1.
    The reports have header where we are showing report name and some values which user selects in prompt.
    Now the issue is that when we save our webi report in excel format, many cells get merge.
    I have read many post on scn which suggest some solutions like changing the autofit width option to no and aligning the header width with colums.
    Tried both the option but no success.
    Is there any other way to achieve this.
    Thanks in advance,
    Regards,
    Rishabh

    Hi,
    We managed to find the workaround for this merge cell issue.
    Sharing it might be helpful for someone.
    - Align the report name and other block in report in such a way that the ends are in line with the end point of any column. The only limitation is that when applying pivot to the excel output we neet to click on any of the ccolumn so that excel identify the data set.
    - Second workaround is to break the webi document in two parts report1 will contain the report name and the block to show the prompt values selected by the user where as report2 will contain the table withactual data. The only limitation with this workaround is that when exporting the repot output to excel we will get two tabs in the excel sheet one containing the prompt values and secont tab containing the actual data.
    Regards,
    RS

  • Change the Locale settings when scheduling the report with an Excel format?

    Hi,
    My reports have been scheduled with Excel format, however, when the report is viewed in Excel, the date fields are in the format "mm/dd/yyyy" i.e. English(United States) and they need to be in the format "dd/mm/yyyy" i.e. English (Ireland).
    I am wondering if there is any way to change the Locale settings within Business Objects?
    For the time being users have been advised to manually change the format within excel, however, this is not the preferred option.
    Any ideas?

    Hi,
    Thanks for the reply.
    The cell format is set as "Date dd/mm/yyyy" but it still runs as an Excel doc with the format mm/dd/yyyy.
    When I schedule the report to run as a Web Intelligence document and then manually export it to Excel, the Date format is correct i.e. dd/mm/yyyy.
    Any more ideas?
    Regards.

  • Suppress add-on dialog when launching Firefox

    When launching Firefox with new extensions installed, it comes up with a dialog box telling of the new extensions. I'd like a way to completely suppress this for our users, as we (in IT dept) already know it was installed and don't need our users to see anything about it.
    Is there a way to completely suppress the add-on dialog so it doesn't come up at all? Maybe a command-line switch, javascript extension, or setting in an ini file?
    Target is Debian and Ubuntu Linux with Firefox 3.6.
    thanks!

    This is stupid. Not only is the way to install plugins now basically a hack (unzipping an xpi file into a dir? really?), but getting rid of the notification is as well. I came up with three ways around this problem: a) install all plugins right after a fresh install, before any profile dirs are created, b) remove all profile directories, or c) edit the prefs.js file for the desired profile. Option "a" is obviously easiest but not always doable.
    to fully automate on linux for option b (assuming kioskfox-0.4-fx.xpi is your extension file):
    mkdir kf
    unzip kioskfox-0.4-fx.xpi -d kf/
    sudo mv kf /usr/lib/firefox-addons/extensions/`cat kf/install.rdf |grep em:id|head -1 | cut -d '>' -f 2|cut -d '<' -f 1`
    rm -rf /home/*/.mozilla/firefox/*default
    alternate to an rm -rf for option c (if firefox has been started already, and this line appears in the prefs.js):
    mv /home/<user>/.mozilla/firefox/*default/prefs.js /home/<user>/.mozilla/firefox/*default/prefs.js.orig
    cat /home/<user>/.mozilla/firefox/*default/prefs.js.orig | grep -v "extensions.newAddons" > /home/<user>/.mozilla/firefox/*default/prefs.js
    dork around with it a bit to understand what I'm doing, to make sure you don't mess yourself up. obviously if you don't use the default profile, change *default to whatever the profile is named.
    hth

Maybe you are looking for