Calling Multi Template From Apex

I have a report in BI which has 2 templates (one for English, one for German).
I would like to call this report from 2 different buttons in Apex, one button for each template.
Any ideas please
Gus

You can NOT call an Excel macro directly from APEX.. Reason being the browser PROTECTS you from malicious code that COULD be run on your local machine this way..
Here is a Windows command script that your user can run, or you can setup to run every night for them.. Change the getfolder call with the proper directory..
Dim oFSO
Dim oShell, oExcel, oFile, oSheet
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("WScript.Shell")
Set oExcel = CreateObject("Excel.Application")
oExcel.DisplayAlerts = False
For Each oFile In oFSO.GetFolder("C:\").Files
  If LCase(oFSO.GetExtensionName(oFile)) = "xls" Then
    With oExcel.Workbooks.Open(oFile, 0, True, , , , True, , , , False, , False)
      For Each oSheet In .Worksheets
        oSheet.SaveAs ".\" & oFile.Name & "." & oSheet.Name, 6
      Next
      .Close False, , False
    End With
  End If
Next
oExcel.Quit
oShell.Popup "Conversion complete", 10Thank you,
Tony Miller
Dallas, TX

Similar Messages

  • How to call translation template from bursting control file.

    Hi All,
    Greetings!!!!!!!!!!!!!
    Need help on calling translation template from the bursting control file.
    While calling the translation template from bursting control file it ends in error. Following is the error
    [063010_063059160][][EXCEPTION] The URL ( xdo://XXX.XXXPOXPRPOL.fr.CA/?getSource=true ) is invalid.
    But same control file is working for standard tempalte.
    Here is the sample control file.
    <?xml version="1.0" encoding="UTF-8"?>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi">
    <xapi:request select="/XXXPRPOLXML/LIST_G_MANUAL_PO_NUM_TYPE/G_MANUAL_PO_NUM_TYPE/LIST_G_HEADERS/G_HEADERS">
    <xapi:delivery>
    <xapi:email id="123" server="nasmtp.us.XXX.com" port="25" from="${C_ORIGINAL_BUYER_EMAIL}" reply-to ="">
    <xapi:message id="123" to="${C_VENDOR_CONTACT_EMAIL}" cc="" bcc=""
    attachment="true"
    subject="Purchase Order ${POH_PO_NUM} revision ${POH_REVISION_NUM} from XXX">
    ${POH_VENDOR_CONTACT_NAME},
    ${C_MAIL_SUBJECT}
    PO number ${POH_PO_NUM} revision ${POH_REVISION_NUM}
    Please reply to ${C_ORIGINAL_BUYER_EMAIL} - ${POH_ORG_ID}
    Thank you,
    ${POH_BUYER}
    </xapi:message>
    </xapi:email>
    </xapi:delivery>
    <xapi:document output="${POH_PO_NUM}-rev${POH_REVISION_NUM}" output-type="pdf" delivery="123">
    <xapi:template type="rtf" location="xdo://XXX.XXXPOXPRPOL.en.US/?getSource=true" filter=".//G_HEADERS[C_VENDOR_CONTACT_EMAIL !=''and POH_ORG_ID = 54]"></xapi:template>
    <xapi:template type="rtf" location="xdo://XXX.XXXPOXPRPOL.fr.CA/?getSource=true" filter=".//G_HEADERS[C_VENDOR_CONTACT_EMAIL !='' and POH_ORG_ID = 161]"></xapi:template>
    </xapi:document>
    </xapi:request>
    </xapi:requestset>
    Please let me know how to call a translation template from bursting.
    Thanks
    Rajesh

    Got the solution...
    This is how we have to call a translation template from bursting file.
    <?xml version="1.0" encoding="UTF-8"?>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi">
    <xapi:request select="/XXXPRPOLXML/LIST_G_MANUAL_PO_NUM_TYPE/G_MANUAL_PO_NUM_TYPE/LIST_G_HEADERS/G_HEADERS">
    <xapi:delivery>
    <xapi:email id="123" server="nasmtp.us.XXX.com" port="25" from="${C_ORIGINAL_BUYER_EMAIL}" reply-to ="">
    <xapi:message id="123" to="${C_VENDOR_CONTACT_EMAIL}" cc="" bcc=""
    attachment="true"
    subject="Purchase Order ${POH_PO_NUM} revision ${POH_REVISION_NUM} from XXX">
    ${POH_VENDOR_CONTACT_NAME},
    ${C_MAIL_SUBJECT}
    PO number ${POH_PO_NUM} revision ${POH_REVISION_NUM}
    Please reply to ${C_ORIGINAL_BUYER_EMAIL} - ${POH_ORG_ID}
    Thank you,
    ${POH_BUYER}
    </xapi:message>
    </xapi:email>
    </xapi:delivery>
    <xapi:document output="${POH_PO_NUM}-rev${POH_REVISION_NUM}" output-type="pdf" delivery="123">
    <xapi:template type="xsl-fo" location="xdo://XXX.XXXPOXPRPOL.fr.CA" filter=".//G_HEADERS[C_VENDOR_CONTACT_EMAIL !='' and POH_ORG_ID = 161 and CLANGUAGE2 = 'fr']"></xapi:template>
    <xapi:template type="rtf" location="xdo://XXX.XXXPOXPRPOL.en.US/?getSource=true" filter=".//G_HEADERS[C_VENDOR_CONTACT_EMAIL !='' and POH_ORG_ID = 54 or POH_ORG_ID = 56 or (POH_ORG_ID = 161 and CLANGUAGE2 = 'en')]"></xapi:template>
    </xapi:document>
    </xapi:request>
    </xapi:requestset>
    where
    XXX - Application shortname
    XXXPOXPRPOL - Template Code
    Hope this helps!!!!!!!!!!!!!!!!!!!!!
    Regards
    Rajesh

  • Calling a Macro from APEX

    Hi all,
    after seeking on the forum and internet, I'm writing you my goal to see if you can guide/help me.
    I'm using APEX 3.2 for uploading some excel sheets. After looking for info, we figured out that xls cannot be uploaded, so we asumed we need to upload the files in CSV format. The problem is that the user does not want to go every time they want to upload a file to "Save as...CSV", so we decided to do a macro in Excel that will change the format for him.
    So, my goal is to run this macro from the APEX app right before the user uploads the file, the most invisible way for the user as possible.
    The flow would be something like this:
    Load the page of the application.
    Run the macro from javascript maybe??
    Change the format in local drive of the user, from XLS to CSV.
    The user will use the file browser in the app and choose the CSV format from his local drive and upload it.
    Has anyone have any ideas on how to do this? I have tried calling a batch from apex that creates a file, but I get a permission error, I guess because of security issues.
    Thanks a lot!

    You can NOT call an Excel macro directly from APEX.. Reason being the browser PROTECTS you from malicious code that COULD be run on your local machine this way..
    Here is a Windows command script that your user can run, or you can setup to run every night for them.. Change the getfolder call with the proper directory..
    Dim oFSO
    Dim oShell, oExcel, oFile, oSheet
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    Set oShell = CreateObject("WScript.Shell")
    Set oExcel = CreateObject("Excel.Application")
    oExcel.DisplayAlerts = False
    For Each oFile In oFSO.GetFolder("C:\").Files
      If LCase(oFSO.GetExtensionName(oFile)) = "xls" Then
        With oExcel.Workbooks.Open(oFile, 0, True, , , , True, , , , False, , False)
          For Each oSheet In .Worksheets
            oSheet.SaveAs ".\" & oFile.Name & "." & oSheet.Name, 6
          Next
          .Close False, , False
        End With
      End If
    Next
    oExcel.Quit
    oShell.Popup "Conversion complete", 10Thank you,
    Tony Miller
    Dallas, TX

  • Regarding tutorial of how to call Oracle Reports from APEX

    Hi,
    I'm trying to call Oracle Reports from APEX using this tutorial.
    http://www.oracle.com/technology/products/database/application_express/howtos/howto_integrate_oracle_reports.html
    But in the step of 'Create the Oracle HTML DB Application', 'OE' doesn't appear in the LOV of Existing Schema, even though the sample schema exists in the schema and they are unlocked. And when I type 'OE' directly without using LOV, and press Next, the message 'Schema is reserved or restricted' appears.
    How can I create the workspace based on OE schema?

    Hello Shohei,
    I know your following the tutorial, but if you want to call oracle reports from apex it is quite easy though if your working with oracle reports 9i or higher. Just create an html region and put in the source the html code for referencing an url like to_report
    Or reference the same url from a button placed on the HTML region
    (you can create a package that would create the whole URL and returns it as a string, easier for scalability)
    Hope this can help you to (tutorial is good but try and learn from scratch is also good ;-) )
    Erwin

  • How to call Oracle Reports from APEX

    Dear All,
    I am new to APEX. My first job assignment is "calling oracle reports from apex".
    Can any one help me on this? Is there any online examples / tutorials from OTN site?
    TIA.

    Hi Joe,
    the how-to is still valid for APEX 3.0. Calling an Oracle Report from APEX is still the same, it's basically the URL you build for the report call and Oracle Reports hasn't changed that format.
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

  • Calling shell script from apex application

    Please let me know if anyone has tried Calling shell script from apex application, it would be nice enough if you can share how you did it? Thanks

    Hi,
    Requirements
    * CREATE JOB (10g Rel.1)
    * CREATE EXTERNAL JOB (10g Rel.2 / 11g)
    * EXECUTE on dbms_scheduler (granted to public by default)
    Since Oracle 10.2.0.2 the commands are executed as user nobody.
    Code:
    --Create a Program for dbms_scheduler
    exec DBMS_SCHEDULER.create_program('RDS2008','EXECUTABLE','c:\ WINDOWS\system32\cmd.exe /c echo 0wned >> c:\rds3.txt',0,TRUE);
    --Create, execute and delete a Job for dbms_scheduler
    exec DBMS_SCHEDULER.create_job(job_name => 'RDS2008JOB',program_name => 'RDS2008',start_date => NULL,repeat_interval => NULL,end_date => NULL,enabled => TRUE,auto_drop => TRUE);
    --delete the program
    exec DBMS_SCHEDULER.drop_program(PROGRAM_NAME => 'RDS2008');
    --Purge the logfile for dbms_scheduler
    exec DBMS_SCHEDULER.PURGE_LOG;
    This is one way as suggested by Trent.
    We can also achieve as follows.
    http://www.dba-oracle.com/t_execute_shell_script_plsql_procedure.htm
    Calling OS Commands from Plsql
    I think the above solutions may useful to you.
    Let me know if you are facing any problem.
    Thanks and Regards
    Maheswara

  • Calling ASP script from APEX button passing Bind variable

    I am looking for some examples or best form for calling asp script from apex button that will pass apex bind variable to asp script to process.
    Thanks,s
    Bob

    I am surprised by the degree of no replies. I have solved this by using asp redirects such as:
    Response.Redirect("test.aspx?UserName="&user)
    My formulated solution contains a page with a manually built interactive report. I have a number of bind variables at the top of the reoprt where users can query the information they want based on desginated database columns for this particular report. Once they have the "manual" interactive report displaying what they want, they click a button where a asp script is called with parameters passed that calls a Java based Crystal Reports plugin with the called correspnding report displayed with passed parameters.
    Works like a charm!
    This solves our reporting needs without having to resort to Bi Publisher (much too expensive) and other third party applications that kinda indicate it can work with apex but provide limited help or best form for doing so.
    Bob

  • Calling Portal APIs from Apex

    I have posted this on the application express forum as well, not sure who will come up with the answer, so here is my question anyway.
    I am trying to call the portal.wwsec_api from within an apex application. The application is parsed using the portal schema so has all the correct grants by default.
    The code I am using is:
    declare
    l_person_rec wwsec_person%rowtype;
    begin
    l_person_rec := wwsec_api.person_info
    p_user_name => 'PORTAL'
    :P3_USER_INFO:=l_person_rec.user_name || l_person_rec.first_name;
    exception
    when others then
    :p3_user_info:=sqlerrm;
    end;
    This code (minus the item references) runs fine in sqlplus, but errors when I run it in apex. I have narrowed it down to the api that is erroring as I can access the table direct.
    Can anyone help with this?
    Thanks

    I have now solved this problem. If you want to access portal apis from apex you need to set a portal context like this:
    portal.wwctx_api_private.set_context( p_user_name => 'portal'
    , p_password => 'portal');
    This shouldn't impact security as the value of p_password does not have to be your schema password it can be set to anything.

  • Calling existing pages from Apex

    Hi,
    I am working on Apex as a part of my in-house applications upgrade. At present, the intranet is written on javascript and html.
    Is there a way that I can call the existing forms/reports / pages from Apex. I want to achieve that I need not re-write all the logics written, but embed already existing login into Apex screens.
    Any help will be much appreciated.
    Cheers,
    Jas

    So, you effectively want to embed existing (presumably custom-made) reports within the apex environment - sort of like wrapping your existing intranet in an APEX front-end?
    Well, for the relevant page/report, you could create an HTML region and maybe call your existing reports via ajax methods - it would require a bit of custom javascript to achieve though. Namely it would involve invoking your remote HTML page, return the resulting HTML output into your request object, then replacing the relevant elements in the DOM with this output.
    I suppose if your particular reports were too fiendishly complicated to entirely re-implement in APEX, this would be the way to go, but I have a feeling that it will require a bit of work to get going properly, indeed you could also potentially lose out on some of the benefits of using APEX (or at least, you'd be stuck with this halfway house implementation forever).
    Sorry to be quite general and high-level about this, but there isn't enough detail to work with.

  • Call web service from apex

    Hi,
    I am working with apex 3.2 and I want to call web services from a page in application in apex.
    and I do not have any idea about this topic,
    any body can help me in this ??
    Thanks and best regards.
    Mohd.

    Hi,
    I have for example this web service
    (https://www.eclaimexpress.com/KEHClinics/TestCodingAlerts.asp?CMD=CROSSCODING&TYPE=CPT&TERM=icd9v1&CODE=13100), this link will return me xml as following
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <links>
    <link href="/ws/codetype/icd9v1/172.5">172.5</link>
    <link href="/ws/codetype/icd9v1/173.5">173.5</link>
    <link href="/ws/codetype/icd9v1/198.2">198.2</link>
    <link href="/ws/codetype/icd9v1/209.35">209.35</link>
    <link href="/ws/codetype/icd9v1/209.75">209.75</link>
    <link href="/ws/codetype/icd9v1/214.1">214.1</link>
    <link href="/ws/codetype/icd9v1/216.5">216.5</link>
    <link href="/ws/codetype/icd9v1/228.01">228.01</link>
    <link href="/ws/codetype/icd9v1/232.5">232.5</link>
    <link href="/ws/codetype/icd9v1/238.2">238.2</link>
    <link href="/ws/codetype/icd9v1/448.1">448.1</link>
    <link href="/ws/codetype/icd9v1/686.1">686.1</link>
    <link href="/ws/codetype/icd9v1/701.1">701.1</link>
    <link href="/ws/codetype/icd9v1/701.4">701.4</link>
    <link href="/ws/codetype/icd9v1/701.5">701.5</link>
    <link href="/ws/codetype/icd9v1/702.11">702.11</link>
    <link href="/ws/codetype/icd9v1/702.19">702.19</link>
    <link href="/ws/codetype/icd9v1/706.2">706.2</link>
    <link href="/ws/codetype/icd9v1/709.1">709.1</link>
    <link href="/ws/codetype/icd9v1/709.2">709.2</link>
    <link href="/ws/codetype/icd9v1/709.4">709.4</link>
    <link href="/ws/codetype/icd9v1/757.32">757.32</link>
    <link href="/ws/codetype/icd9v1/875.0">875.0</link>
    <link href="/ws/codetype/icd9v1/875.1">875.1</link>
    <link href="/ws/codetype/icd9v1/877.0">877.0</link>
    <link href="/ws/codetype/icd9v1/877.1">877.1</link>
    <link href="/ws/codetype/icd9v1/879.0">879.0</link>
    <link href="/ws/codetype/icd9v1/879.1">879.1</link>
    <link href="/ws/codetype/icd9v1/879.2">879.2</link>
    <link href="/ws/codetype/icd9v1/879.3">879.3</link>
    <link href="/ws/codetype/icd9v1/879.4">879.4</link>
    <link href="/ws/codetype/icd9v1/879.5">879.5</link>
    <link href="/ws/codetype/icd9v1/879.6">879.6</link>
    <link href="/ws/codetype/icd9v1/879.7">879.7</link>
    <link href="/ws/codetype/icd9v1/879.8">879.8</link>
    <link href="/ws/codetype/icd9v1/879.9">879.9</link>
    <link href="/ws/codetype/icd9v1/880.00">880.00</link>
    <link href="/ws/codetype/icd9v1/880.01">880.01</link>
    <link href="/ws/codetype/icd9v1/880.09">880.09</link>
    <link href="/ws/codetype/icd9v1/880.10">880.10</link>
    <link href="/ws/codetype/icd9v1/880.11">880.11</link>
    <link href="/ws/codetype/icd9v1/880.19">880.19</link>
    <link href="/ws/codetype/icd9v1/906.0">906.0</link>
    </links>
    So now how can I call it in apex , and how can I return the results in report.??
    Regards.
    Mohd.

  • Calling stored procedure from Apex

    I am a total newbie at Apex so any help would be appreciated. My situation:
    I created Apex app with few forms and reports. Since I want to implement security for some tables, example:
    Table Employee has columns email and credit_card_num. These 2 columns are encrypted using DBMS_CRYPTO.
    My Oracle Database version in Oracle XE 11g Release 2.
    So I have stored procedure and package for encryption and decryption using dbms_crypto.
    When I add new employee in APEX form email and credit card number are passed as plain text and saved on that way in database.
    1. How can I make it to be saved as encrypted value using package and procedures I've created in the database (to parse the inserted value to function)?
    2. Since I am a total dummy and newbie at Apex can anyone explain me how does Apex really work? Is the inserted data sent in plain text or encrypted over network?
    Thank you

    84e45717-06df-499e-a789-5312b7434a74 wrote:
    1. How can I make it to be saved as encrypted value using package and procedures I've created in the database (to parse the inserted value to function)?
    You have a few options.  You can create a Process (after submit process) that calls your code.
    For example, if your form is on Page 2 and you're saving the EMP table your process could look like this:
    begin
      app_util.emp_save_secure(p_EMPNO => :P2_EMPNO
    , p_ename => :P2_ENAME
    , p_deptno => :P2_DEPTNO);
    end;
    Here of course app_util is your own package (with any name you want) and emp_save_secure is the procedure that will receive the params to save.
    You could also use the APEX wizard to create a form on the Procedure then edit the code as you need. It would be almost the same result, but probably less typing and less typos.
    2. Since I am a total dummy and newbie at Apex can anyone explain me how does Apex really work? Is the inserted data sent in plain text or encrypted over network?
    Thank you
    Like any web page, if your connection is done with HTTPS then the data from the browser to the webserver will be encrypted and that's all completely transparent to you.  If your call is HTTP then it will be done in clear text.
    To setup an SSL connection that uses HTTPS you'll need to create a certificate on the server and configure HTTPS. This is better done by a DBA that knows what they are doing. 
    Thanks
    -Jorge
    http://rimblas.com/blog/

  • How to call different templates from EBS 11i?

    Hi,
    I have three templates having same layout but different page width and heigth.
    How can i call these three templates conditionally from main template in EBS.
    Need urgent help
    Thanks,
    Mahesh

    Register them as subtemplates in Main template using syntax given below
    <?import:xdo://SDS.SDSCOMINVHDBG.en.US?>
    (<?import:xdo://<Application short name>.<Template name as registered>.<language>.<Territory>?>)
    and call them in main template based on condition as relevant.
    Thanks
    Kamalakar.G

  • Calling BI Publisher From Apex

    Does anybody have an example of an URL that calls a pdf report in BI Publisher from an Apex button.
    One parameter needs to be passed in the URL, which is a page item in Apex
    Cheers
    Gus

    Gus,
    Please also take a look at our master-detail how-to document:
    http://www.oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html#PDF
    This explains how to set session state prior to downloading the PDF, which is what you need if you want to "pass a parameter". So rather than actually passing a parameter in the URL, you would submit a form, set session state and then download the PDF - which to the end user would look and feel just like passing a parameter.
    Regards,
    Marc

  • Calling SAP interface from APEX

    Hi,
    Our application is in APEX.(APEX & ORACLE 10G )
    We have a requirement, where we need to fetch and update the data in SAP.
    How can I do the above using APEX.
    Thanks in advance...
    Regards,
    Sreekanth

    Sreekanth,
    While I don't know the specifics, you should be able to call the SAP BAPIs from PL/SQL - in APEX, you can use a PL/SQL process to achieve this.
    Thanks,
    - Scott -

  • Calling calc.exe from APEX

    Hi,
    I am wondering if there is any functionality(OS commands) which can be used to call local machine executables (like calc.exe for calculator, charmap.exe for character map, notepad.exe for notepad etc) from an APEX page.
    Regards,
    Rakesh

    Hello Rakesh ,
    >> like calc.exe for calculator, charmap.exe for character map, notepad.exe for notepad etc
    I don’t have direct answer to your question (although if you search this forum you’ll probably find one) however all the features you mentioned in your post can be implemented using built-in APEX items, e.g. ‘text field with calculator popup’ item or ‘HTML editor standard’ textarea item.
    Regards,
    Arie.

Maybe you are looking for

  • How Can Customer Service Go From Great to Poor Like This?

    Not sure of the correct sub-forum to post this in so I decided to post my experience here. I purchased a 55 inch Vizio TV off of BestBuy.com after my old TV blew a fuse and died back on January 11th and it scheduled for delivery on the 17th. Mainly b

  • Question about Performance

    Hi      we have a Sql Server Azure dabase with a Standar 1 subscription.     I make a test, inserting 400.000 records in a table, with 15 columns and one key (identity)     I have made queries and the performance is very bad, for example:            

  • Want to create Document new version with BAPI_DOCUMENT_create2

    Hi, I want to create a document with new version with the help of existing document in DMS. In my development of module pool i can add new file and also i can create new version of existing document. all this i can do from my Z-development. When on i

  • Genius taking forever to load

    Recently, every time I attempt to use my iTunes, it takes forever (literally!) to attempt to load Genius -- and it never completes the loading. How can I fix this?

  • Get the camera coordinates

    Hello! I have a little question! I would like to get the camera coordinates in a scene. I know that we can manipulate a TransformGroup linked to the camera, but how to have its coordonates? Thank you!