Is there any API to read report(.rpt) file to BO ?

The SDK example just copy an existing report to another folder. now I have report on the server (same as BO), How i can add the new report to BO?
Thanks,
Forest

I find the solution.
<%
* This Java Server Pages (JSP) sample demonstrates how to publish
* a report and overwrite the si_files.  Instances of the original
* report are unchanged.
* Created by: TU
%>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.*,
                 com.crystaldecisions.sdk.framework.*,
                 com.crystaldecisions.sdk.exception.*,
                 com.crystaldecisions.sdk.occa.security.*,
                 com.crystaldecisions.sdk.plugin.desktop.report.*"
%><%
* BusinessObjects Enterprise Logon Credentials.
String boCMSName  = request.getParameter("cmsName");
String boAuthType = request.getParameter("authType");
String boUsername = request.getParameter("userName");
String boPassword = request.getParameter("password");
//Name of the published report
String boReportName = request.getParameter("reportName");
//Location and name of the report to update the published report with
String boNewReportFile = request.getParameter("updateReport");
* Point to installation path of Enterprise.  This is used to invoke the
* ReportAdd binary executable in the folder
* <BEXI_HOME>\<OS TYPE>\plugins\desktop\CrystalEnterprise.Report
final String BEXI_HOME  = "C:\\Program Files\\Business Objects\\BusinessObjects Enterprise 11.5";
* InfoStore Query for the Crystal Report to be updated.
String boQuery = "Select TOP 1 * From CI_INFOOBJECTS "
               + " Where SI_KIND='CrystalReport' "
               + " And SI_INSTANCE = 0 "
               + " And SI_NAME = '" + boReportName + "'";
// Set before getSessionMgr
System.setProperty(CeEnterpriseContext.BOBJ_ENTERPRISE_HOME, BEXI_HOME);
IEnterpriseSession boSession = null;
try{
    // Logon and create EnterpriseSession
     boSession = CrystalEnterprise.getSessionMgr()
            .logon(boUsername, boPassword, boCMSName, boAuthType);
    IInfoStore boInfoStore = (IInfoStore) boSession.getService("", "InfoStore");
    // Perform a query for the report
    IInfoObjects boInfoObjects = boInfoStore.query(boQuery);
    if ((boInfoObjects == null) || (boInfoObjects.isEmpty())) {
           out.print("Report not found.");
           return;  
    IReport boReport = (IReport) boInfoObjects.get(0);
    // Update the published report's SI_FILES with the contents of the
    // new report.
    IFiles boReportFiles = boReport.getFiles();
    IRemoteFile boReportFile = (IRemoteFile) boReportFiles.get(0);
    boReportFile.overwrite(boNewReportFile);
    boReportFile.commit();
    boInfoStore.commit(boInfoObjects);
    // Refreshes the properties of the report
    boReport.refreshProperties();
    // Put any further changes you'd like to make to the report here.
    // Commit changes to the CMS
    boInfoStore.commit(boInfoObjects);
    out.println("Refreshed report " + boReportName + ".");
} catch (Exception ex) {
     out.print(ex.getMessage());
} finally {
    if(boSession != null)
        boSession.logoff();
%>
Edited by: Forest lin on Dec 4, 2008 12:04 PM

Similar Messages

  • I have written a binary file with a specific header format in LABVIEW 8.6 and tried to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I have written a binary file with a specific header format in LABVIEW 8.6 and tried  to Read the same Data File, Using LABVIEW 7.1.Here i Found some difficulty.Is there any way to Read the Data File(of LABVIEW 8.6), Using LABVIEW 7.1?

    I can think of two possible stumbling blocks:
    What are your 8.6 options for "byte order" and "prepend array or string size"?
    Overall, many file IO functions have changed with LabVIEW 8.0, so there might not be an exact 1:1 code conversion. You might need to make some modifications. For example, in 7.1, you should use "write file", the "binary file VIs" are special purpose (I16 or SGL). What is your data type?
    LabVIEW Champion . Do more with less code and in less time .

  • Any API to read Microsoft Office files in CLDC devices?

    Hello,
    Is there any API(Like Apache POI API, for J2SE) available to read Microsoft Office files in J2ME (CLDC)? I think Apache POI API can not be used in J2ME. Am I right?
    Your comments and/or help will be greatly appreciated.
    Best Regards,

    To be able to edit files you need to purchase an additional application.
    Quickoffice is the app you need and it's available here:
    http://www.quickoffice.com/quickoffice_symbian/
    It may also be available in the ovi store.

  • Is there any way to read the pdf file in java

    Hai,
    i need some advice from anyone that is there anyway to read the pdf file directly from java...
    Without converting to other files(txt,html)
    if it is possible please help me..
    Thank you

    Or use the Adobe one (search the adobe site). Or search this forum, this is one of the Top Ten Qestions Asked here.

  • Is there any API available to read drm files in ios devices?

    Hi,
    I am ios developer and trying to read DRM files using my app.
    I want to know is there any API available for the same.
    Thanks in Advance.

    Hi Prathap,
    No, there is no Java API specific for RDF functionality available. However, Java client applications can use JDBC to access the RDF store. A partially relevant post is at How do you query Oracle RDF database using Java program? . The JDBC documentation will have detailed documentation on using JDBC.
    Code snippets for one way of accessing SDO_RDF_MATCH through Java is below:
    <..........>
    sbStmt.append("select * from TABLE( ")
    .append(" SDO_RDF_MATCH('(?S ?P ?O)',")
    .append(" SDO_RDF_Models('")
    .append( <model_name> )
    .append("'),")
    .append("null,null,null))")
    .append(" where rownum <= ")
    .append(iNumRows)
    ResultSet rs = stmt.executeQuery(sbStmt.toString());
    while (rs.next()) {
    System.out.print("\n");
    System.out.print(rs.getString("S"));
    System.out.print(" (");
    System.out.print(rs.getString("S$RDFVTYP"));
    System.out.print(") ");
    System.out.print(", ");
    System.out.print(rs.getString("P"));
    System.out.print(" (");
    System.out.print(rs.getString("P$RDFVTYP"));
    System.out.print(") ");
    System.out.print(", ");
    System.out.print(rs.getString("O"));
    System.out.print(" (");
    System.out.print(rs.getString("O$RDFVTYP"));
    System.out.print(") ");
    <............>
    <...... handling CLOB values that are returned ....>
    // read CLOB if applicable
    Reader reader = null;
    try {
    CLOB clob = ((OracleResultSet) rs).getCLOB("O$RDFCLOB");
    if (clob == null) {
    System.out.print("not a long literal ");
    else {
    reader = clob.getCharacterStream();
    char[] buffer = new char[1024];
    // reading 1K at a time (just a demo)
    int iLength = reader.read(buffer);
    for (int i = 0; i < iLength; i++) {
    System.out.print(buffer);
    System.out.print(" ...");
    finally {
    if (reader != null) reader.close();
    <..........>

  • Is there any API to add and remove certs from acrobat trusted identities?

    Is there any API to add and remove certs from acrobat trusted identities? if this is not possible any work around for this. Please help me

    No, there is not – that would be a security concern.

  • Is there any API's to create requisitions?

    Hi
    Is there any API's to create requisitions?
    Appreciated quick reply
    Regards,
    Ramesh.

    I am currently using a Sinetfactory thirdparty package from JScape for the Secure FTP functionality(FTP over SSH). But Sinetfactory package tranfer rate is much slower than the manual sftp(command-line run in linux server for manual ftp using ssh).
    Since it is very slower than ordinary sftp(ftp over ssh), I thought of using other thirdparty FTP package which supports FTP using ssh port. Can anyone please suggest me a thirdparty package which will has the sftp functionality and with better transfer rate.

  • Is there any API to insert/update RA_TERRITORIES table

    Hi
    I have to create diff territory combinations for new customer creation.
    Is there any API for inserting records to RA_TERRITORIES table.
    I did n,t find any thing related to this.
    Thanks&Regards
    RS

    Hi,
    Thanks for the reply,
    But JTF_TERRITORY_PUB is not updating ra_territories table.
    I think its not useful for my purpose.

  • Are there any APIs to create an Invoice in Oracle Payables?

    Hi,
    We have a requirement to import the invoices from the operational systems. We will be making approximately 7,000 checks a day. We need to import all these payments information into Oracle Payables as Invoices and then process the payments out of Oracle payments module. We are on EBS 12.1.1
    Were there any APIs to create the invoices directly in Payables as it comes from custom application? We could use payables open interface but as we would like to integrate the payables module with custom application it would be nice if invoice creates directly in Payables through APIs.
    Thanks,

    In the enterprise edition I am able to create all the below objects.But The job is not running after file arrival.
    Could you please me in this case also.
    BEGIN
      DBMS_SCHEDULER.create_credential(
        credential_name => 'LOCAL_CREDENTIAL',
        username        => 'upncommon',
        password        => '*******');
    END;
    BEGIN
      DBMS_SCHEDULER.create_file_watcher(
        file_watcher_name => 'test_file_watcher',
        directory_path    => '/home/upncommon/pub',
        file_name         => 'sample2.sh',
        credential_name   => 'LOCAL_CREDENTIAL',
        destination       => NULL,
        enabled           => FALSE);
    END;
    BEGIN
      DBMS_SCHEDULER.create_program(
        program_name        => 'file_watcher_test_prog',
        program_type        => 'STORED_PROCEDURE',
        program_action      => 'PROC_SCH',
        number_of_arguments => 1,
        enabled             => FALSE);
    END;
    BEGIN
      DBMS_SCHEDULER.define_metadata_argument(
        program_name       => 'file_watcher_test_prog',
        metadata_attribute => 'event_message',
        argument_position  => 1);
    END;
    BEGIN
      DBMS_SCHEDULER.create_job(
        job_name        => 'file_watcher_test_job',
        program_name    => 'file_watcher_test_prog',
        event_condition => NULL,
        queue_spec      => 'test_file_watcher',
        auto_drop       => FALSE,
        enabled         => FALSE);
    END;
    BEGIN
      DBMS_SCHEDULER.set_attribute('file_watcher_test_job','parallel_instances',TRUE);
    END;
    EXEC DBMS_SCHEDULER.enable('test_file_watcher');
    EXEC DBMS_SCHEDULER.enable('file_watcher_test_prog');
    EXEC DBMS_SCHEDULER.enable('file_watcher_test_job');

  • Are there any APIs to load FND and other objects

    Hi
    We are having HR2HR configured and running between EBS R12.1.3 and Fusion. But the HR2HR does not bring in data in EBS like in Descriptive Flex Fields (DFF), User Defined Tables (UDT), Extra Information Types (EIT) & Lookups. How can we bring in this data in to Fusion. Are there any APIs? If not what is the Support model from Oracle if we are directly updating the tables?
    Thanks!
    Srinivasa Sunchu

    Happy Camper: Based on doc 1482027.1 in support system:
    DFF is not currently supported by HR2HR.An Enhancement Request (ER) has been logged to request this functionality:
    ER: Bug 12883914 - ER REQUEST - DFF FLEXFIELDS AND EIT'S NEED TO BE INCLUDED IN THE HR2HR AND INTER
    >
    For alternatives and the Support model I do not have answer, will reach out to try to find out.
    Kiran: This is an external forum, so the readers would not have access to internal documentation. Are the HCM scripts available externally i.e. through the support system? If not are there plans for providing them externally ?
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • Is there any APIs for FND attachments

    Hi,
    Is there any API for FND Attachments. I would like to load the concurrent output generated as an attachment to the record.
    So I'm planning to write PLSQL to read the file and load in to fnd_lobs. Later I would like this attachment available thru UI.
    Looking for Public or Private APIs to achieve above task.
    Thanks,
    Satya

    Dear,
    I found this very Information Site...
    URL http://www.pvmehta.com/myscript.html
    Hope for future you will get benefit from it...
    Regards,
    Kamran J. Chaudhry.

  • Is there any API in J2ME sdk to get the moibile device ID?

    Hi,
    I am very new to J2ME. Is there any API in J2ME sdk to get the moibile device ID (mostly the phone number)? Does MIDP 2.0 provide this or is it there in someother optional JSRs? Does it portable across all the devices?
    Regards

    Use Device provider API if they support otherwise in J2ME its not permitted due to security issue.
    Sun-shine.

  • IPhone]Is there any API like PostMessage of MS?postNotificationName notwork

    I want to send message or event without waiting for the thread to process the message or event.
    I have used NSDistributedNotificationCenter,NSNotificationQueue,NSNotificationCenter,but
    NSDistributedNotificationCenter and NSNotificationQueue don't work,while NSNotificationCenter will be waitfing for processing the message.
    Any one could tell me which API to user? Thanks in advance!
    code for NSDistributedNotificationCenter as followings:
                   [[NSDistributedNotificationCenter defaultCenter] addObserver:self
                selector:@selector(finishWorkHandler:) name: @"BAIDU_GOOGE_BEST"
                 object: nil];
                 printf("try to send message\n");
                   NSMutableDictionary* info = [NSMutableDictionary dictionary];
                   [info setObject: @"pig" forKey: @"Pig"];
                   [[NSDistributedNotificationCenter defaultCenter] postNotificationName: @"BAIDU_GOOGE_BEST" object:nil  userInfo: info deliverImmediately: YES];
    -(void)finishWorkHandler:(NSNotification*)note
        NSLog(@"NSNotificationCenter name: %@", [note name]);
        NSLog(@"NSNotificationCenter object: %@", [note object]);
        // unregister
       // [[NSNotificationCenter defaultCenter] removeObserver:self];
    Message was edited by: coolhome

    Hi,
    I am making an stand-alone application that needs to
    connect to a database, create the necessary tables
    (if they are not already present ) and then add,
    remove update data from this database.Oracle DBAs will not appreciate your app attempting to create databases/entities.
    >
    The problem is that our customers may be using many
    different DBMS such as Oracle, MySQL or MS SQL
    Server. I don�t want to make them use any specific
    database so the application should adapt to the DBMS
    installed in the customer's system.
    Then performance must not be your goal at least in terms of data processing. Because attempting to process data off box versus on box with a database will, in the vast majority of cases, be magnitudes of order slower.
    My question is, is there any API or framework or
    something that would make the process of using
    different JDBC drivers invisible or easier for me to
    develop? Any advice would be welcomed.
    Hibernate will probably make it easy as long as your don't use any pass through SQL (and there goes performance again.)
    All of the databases you named have either free or very low cost devoper editions which you can use for testing. (Actually I think they are all free.)
    I would also like to know if there is any way to find
    out if a SQL statement will work properly in a set of
    different DBMSs.
    Not without testing.
    It is almost guaranteed that schema creations will not (like creating a table.)

  • Is there any API ( HTTP / WebService ) for listing the objects supported ?

    Hi
    I wish to know if there is some mechanism ( API ) that I can make use of to dynamically get the list of objects ( accounts , leads etc ) supported by Oracle CRM on Demand ?

    How to convert Vector elements into array of objects?
    Is there any API for this?
    For ArrayList class there is Method i.e.
    Object ob[]=arr.toArray();
    But i don't know abt vectors.
    plz give me the example.The toArray() method is available in the List interface. SInce ArrayList and Vector are both implementing classes... they should have this method. In short, the same would work for Vector. Logical, isn't it?
    ***Annie***
    (since when did I start thinking logically...)

  • Is there any API to assign values to a Value Set ?

    We have to assign many values to a Value Set - is there any APIs to do that quickly by a PL/SQL program ?

    We have scripts set up to use the FND_FLEX_VALUES_PKG.INSERT_ROW procedure to insert Flex Values to Value Sets.

Maybe you are looking for

  • How do I change the workspace background color?

    Hi all, I need to change the workspace background color from the default mid grey. But I can't find how to do this! Any ideas! Thanks in advance, Pedro.

  • Update Device Name in BAT

    Hi All, I've been struggling with this BAT problem for some time. I'm trying to update the Name for a phone (eg: CSF), device profile, Trunk device, etc, using BAT. The obvious problem with this using BAT, is that I'm trying to update the field which

  • Javascript dying on Sharepoitn 2010 site on Blackberry

    Hey Folks ,       I am stuck in a issue  and looking out for any helpfor which below are the details  I had created a Intranet Site and customized the Hime page so that  I could see my custom Home page for mobile devices. The site initially created o

  • What is Cartesian product in Oracle?

    "Cartesian product" often appear in the Oracle book, what is it?

  • Supervisor Approval in SSHR not going

    Gurus, I have oracle SSHR for my client. Whenever a person changes his/her address in Personal Information screen, a notification should go to 1st level supervisor for approval. It is not going at present. What can be the issue? Any pointers in this