Altering schema of tables/objects inside a crystal report through API

hi all,
        We run crystal reports through a Java application (using CR4E API) connecting to Oracle database. All the tables/views within the report do not use fully qualified names (i.e. schemaName.objectName) instead they use the object name alone. Earlier we would run all the reports logging in as the schema owner and hence all the objects would be accessible without issue. Per a new requirement we now log in as a non-schema owner ID and the objects are now not accessible to this user id unless a fully qualified object is not provided as the default context schema will now be different.
       We tried altering the schema through the API like so,
        ITable origTable = null;
        ITable newTable = null;
        String DB_USER_NAME = username;
        String DB_PASSWORD = password;
        String TRUSTED_CONNECTION = "true";
        String SERVER_TYPE = "JDBC (JNDI)";
        String USE_JDBC = "true";
        String DATABASE_DLL = "crdb_jdbc.dll";
        String JNDI_DATASOURCE_NAME = jndiName;
        String CONNECTION_URL = connectionURL;
        String DATABASE_CLASS_NAME = driverName;
Tables tables = clientDoc.getDatabaseController().getDatabase().getTables();
            for(int i = 0;i < tables.size();i++){
                origTable = tables.getTable(i);
                if (tableName == null || origTable.getName().equals(tableName)) {
                    newTable = (ITable)origTable.clone(true);
                newTable.setQualifiedName("TestSchema." + origTable.getAlias());    <--- Set actual schema here but it still takes the alias as "command"
Are we doing anything wrong here? It appears that the table name is always "command", internally I think CR uses the name command for its table and we are not allowed to change it. The table name, alias and qualifier name are be default set to "command" by CR. If I append schema name to the table name I get schemaName.command as against schemaName.objectName.
Synyonyms are not an option for us for various reasons. We will not be able to go down that road no matter what. However we are looking at an API related solution here so if anyone could advise in this regard it would be very helpful.

Lindell - your response was very helpful.  I was able to create a SQL Command on the subreport and change the subreport links on the main report to use the paramters in the SQL Command.  The report is now very fast - even when there are lots of detail records on the main report.  It is properly executing the query and not reading all 2M records into memory for each subreport.
I'm still totally confused as to why Crystal was misbehaving so poorly and changing how the subreport queried the database when the only change was the fields used for record selection on the main report.  It really looks like a bug to me, but maybe someone can still enlighten me.
thanks again so much.  We are in Parallel testing for a production rollout - and the users are MUCH happier now!  (which of course makes me much happier!)
Susan
PS I was not aware of the SQL Command - had never used it before.  Took me a little while to figure it out and how to do the linking - but it is very powerful.  Thanks again.

Similar Messages

  • How to add OLE wordpad objects to a crystal report through VB program

    Can we programmatically add OLE wordpad objects to a crystal report XI r 2. through VB.NET or VB6?
    And is there a way of treating a database binary/blob field as an ole object in CR?

    Hi Mohan,
    Try it in the Designer first. If it works in the designer then it will work in our SDK's but you'll have to use RAS. So when you post your question to the .NET Development - Crystal Reports Forum be sure to specify what version you are using and anything else as far as versions go.
    It may be easier to simply link the OLE Object in the designer, check the help file out on how to.
    Thank you
    Don

  • How to build Table of Content in Crystal Reports

    Hi,
    Initially, I am looking for an article about how to build Table of Content in Crystal Reports in table-based approach----including how to write to DB table from report:
    http://support.businessobjects.com/library/kbase/articles/c2011950.asp
    However, the link above is invalid. I also searched through SDN articles, but no luck.
    Can someone please forward me the link if you happend to know?---does not have to link to this specific article, any working solution is just fine.
    I am aware of another approach which put the TOC to the end of the report(http://www.ml-consult.co.uk/cryst-05.htm), which probably does not satisfy the requirement.
    If you have other solutions, your share is greatly appreciated.
    Thanks a ton!

    [Is it possible to create a table of contents in Crystal Reports?|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313335333133303330%7D.do]

  • How to create a clickable Table of contents using Crystal Reports 8.5

    How to create a clickable Table of contents using Crystal Reports 8.5. I was able to create the table of contents using subreport and temporary table. but not able to link to the pages.
    how to make it clickable ?
    -Vivek

    Hi Vivek,
    To you may create on demand sub report.
    In main report only the link will be shown when you click on the link the sub report will be opened in a new tab.
    It can be placed in a Group header and to show the data for that particular group only.
    Click on the Help menu in the crystal Reports Designer and open the Crystal Reports Help
    Go to Index tab and type in subreport
    Select Creating On demand you will get lot of information on that.
    Please let us know if that is enough to solve your problem
    Regards,
    Aditya Joshi

  • Setting tray selects inside the crystal report

    I am writing a report which will have 3 possible page layouts.
    I would like to print page 1 from a specific tray while page 2 and 3 from a  differenet tray.  Is there a way to control this or set
    the paper source/ printer tray from inside the crystal report itself?  
    Thank you so much for your time on this.

    Hi
    In Crystal Reports Designer we can not select the print tray at runtime for a single report however to workaround on this, you can insert different subreports.
    Insert subreport for different chunk of data for which you want different trays. Please note inserting multiple subreports can cause a slower execution of report.
    Go to file ->print -> set the tray from Printer paper -> source
    but it depends on the type of printer is in use and on the printer driver.As its printer dependent you need to check the printer options for trays in control panel.
    Hope this helps!!
    Amit

  • Creating Sap Crystal Report Through Oracle Stored Procedure Packages

    Hi,   
    1.How we can create crystal report through oracle stored
    procedure packages pls tell me the steps through adding command then
    tell me the syntax what should i write in command to call the stored
    procedure packages or if have some other option then also tell. 
    2.can
    we link stored procedure column to other table column that used in
    report.

    Hi Ganesh,
    As this error comes when you are trying to insert non-numeric value into a numeric column in db it seems that your field might be numeric and you are trying to send it as a string in database.
    Please check your Store Proc carefully..
    Reference Thread: Oracle/PLSQL: ORA-01722
    --Dhana

  • Crystal Reports through MSY

    Hi,
    I have to make a crystal report for the activities of type complaints in Mobile Sales Application through Mobile System Maintenance.
    How can I create connection to databse while designing the crystal reports through Mobile System Maintenance. Are there any special settings need to be done to connect individual business object?
    Thanks,
    Swarna Seeta

    Hello Falk,
    Thanks for your response.
    Here are some more details of my query.
    I would like to design a crystal report through Mobile System Maintenance->Report Maintenance for the activity details. For that I need to link the business objects (BOACTIVITY) through database expert. I need the procedure to link the business object when I design the crystal report.
    Hope I am clear now. Let me know any more details you need.
    Thanks,
    Swarna Seeta

  • Run crystal report through BI, can't locate par file on BOBJ server

    Attempting to run crystal report through BI iView. 
    Followed steps here: http://wiki.sdn.sap.com/wiki/display/BOBJ/CreateBOEXI3.1IntegrationKitIViewTemplateintoSAPEP+Portal
    successful until we try to locate the par file:
    com.businessobjects.pct.masteriview.par
    Is there something we need to install to be able to load this file, or is there somewhere we can download.
    As of now, stopped b/c can't find
    com.businessobjects.pct.masteriview.par

    Thanks Ingo, would this be the correct file to download and install?
    Download BusinessObjects XI 3.1 Java Portal Integration Kit - WAR 10 MB
    Located here:
    http://www.sdn.sap.com/irj/boc/enterprise;jsessionid=(J2EE3414800)ID1586935850DB11532971180627469992End?rid=/webcontent/uuid/503988db-58c5-2b10-f79d-cb96700417f9
    then click Download BusinessObjects XI 3.1 Java Portal Integration Kit - WAR 10 MB
    to get here:
    http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/f0c30ff1-4e75-2c10-a385-8eff81c946aa
    We currently have BOBJ set up, CMC/INFOVIEW, and crystal linked to SAP BI...so I thought we'd installed everything we need, I guess this is more for portal...b/c now our goal is to see what crystal reports look like in BI portal instead of infoview.
    thanks a lot,
    matt

  • How do you reference a Formular Object on a Crystal Report using Java

    Hi all,
    I am trying to reference an object on my report which contains a Formula field.
    I have read the following 2 threads, but they refer to textObjects:
    [How do you reference a textObject on a Crystal report using Java|Re: How do you reference a textObject on a Crystal report using Java?]
    [Changing the text of ITextObject programatically|Re: Changing the text of ITextObject programatically]
    But I cannot even get those to work. I can reference a object which refers to a database field but as soon as I try
    reference a textObject or reportObject I just get a NULL variable.
    Below is the code I am useing
    IReportObject dbField = reportClientDocument.getReportDefController().findObjectByName("BOB1");
    IReportObject textBob = reportClientDocument.getReportDefController().findObjectByName("BOB2");
    "BOB1" is the name of my DB field Object, and "BOB2" can be a Text box or a Formula item and I just get nothing.
    I have just tested it with a FieldHeadingObject and that returns a valid object, so clearly I am going about this the wrong way
    for objects I place on the reports which are not driven by the database items.
    Ultimately what I want to do is reference an object in the Report Footer which will contain the RecordCount of the number of
    records contained in the report, which I am them going to use to determine if the report holds data,
    if it does I will print it, else ignore it and move on the the next report. I am doing this so that I can at an extra filter to split
    a report up into groups and produce a sinlge PDF for each group instead of one massive PDF containing all the groups.
    So if someone has a solution to any of my problems I would be very greatful, and I dont mind being told Im an idiot and should
    rather do it another way, as long as you supply that other way
    Thanks for the help
    Darren
    Edited by: Darren Jackson on Dec 16, 2009 7:29 PM
    Forgot to add am using CR4Ev2 SP3

    Right I have made some headway.
    Firstly, Im an idiot. I was making changes and setting up test fields on my report, but then when running the app, I had it looking at
    the backup report, which would explain why all the new textbox fields were not being found.
    The stupiditity did force me to delve deep and work out a fair bit of how the reports work, so cant complain too much. BUT, I am still
    not able to return values of Formula fields and formulas extra. Could someone tell me if this is even possible. I get retrieve the formula field
    name, and properties but not its value once the report has been populated. Am I wasting my time?
    Well I will continue dismantling my reports till I find the answer, or someone points me in the right direction.
    If any one is interested this is the code I used to drill down to my text boxes:
    IReportObject recCount = reportClientDocument.getReportDefController().findObjectByName("TB1");
    ITextObject obj_RecCount = (ITextObject) recCount;
    System.out.println(obj_RecCount.getName());
    Paragraphs objP = obj_RecCount.getParagraphs();
    for (int i = 0; i < objP.size(); i++){
         ParagraphElements pE = objP.getParagraph(i).getParagraphElements();
         for (int j = 0;j < pE.size(); j++){
              IParagraphTextElement pEE = (ParagraphTextElement) pE.getParagraphElement(j);
              System.out.println(pEE.getText());
    Cheers

  • Where is the Manage Object function in Crystal Reports 2013 for the CMC?

    I recently upgraded to Crystal Reports 2013 after upgrading our Crystal Reports server to SAP Business Objects Platform 4.1. Before the upgrade, I could publish reports from Crystal Reports XI to the CMC then right-click on the report title in the Repository Explorer (in Crystal Reports) and I had the option to select Manage Object where I could set the default settings for the CMC. I am not seeing this option in the new version of Crystal Reports. Is there something I need to do to see this option or has this option been removed from Crystal Reports 2013?

    Hi Kelley,
    You're right, the option doesn't exist in CR XI R2 and above.
    All the options now need to be set in CMC.
    -Abhilash

  • Change the field object location in crystal report

    hello,
    i want to change the contols location in crystal report and the controls alignment in run time to make mirror ,how can i access this controls and this properties. we use two language English and arabic that have different alignment.
    thanks and best regards,
    Mahmoud awad

    <p>The best place to start would be on the <a href="http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm" target="_blank">DevLibrary</a> you can find the reference guide for the APIs for the CR .NET SDK. Generally speaking, you can access the particular field object using the corresponding class and modify it&#39;s left/right/top/etc properties to change placement.  For example, if you want to modify properties for a text object on a report, use the TextObject class and the members exposed by that class.</p><p>Depending on what properties you want to modify, you&#39;ll need to look at other classes such as the FieldFormat class or ObjectFormat class to access other properties.  So I recommend using the reference guide to help you find what you are trying to do.</p><p>-MJ</p>

  • How can we use business object (e.g. crystal report ) in webdynpro abap

    Hi All,
    We all know that business object has been part of sap products.
    But even though in SAP, I really don't know much about business object.
    and how can we use the great function of BO and integrate into our development to make
    user have much better function and user experience.
    Do we have some learning material of BO?
    Could someone share some material here?
    Thanks and Regards
    Aaron.

    One of the main ways that you can integrate some Business Objects content with WDA is via FlashIslands.  If you are on 7.01 or higher, you have the option to use FlashIslands UI element.  There are many tutorials on FlashIslands available on SDN. FlashIslands work well with Xcelsius content, since the output of Xcelsius is a Flex component.  It is pretty easy to set the Xcelsius interface to External Connection and then write a wrapper Flex Component around the generated output, so that it can be used in the FlashIslands interface.
    For Crystal Reports integration you will need NetWeaver 7.02 (comming early next year).  We have integrated Crystal Reports as an output option in the Web Dynpro ABAP ALV and the Classic Dynpro ALV.  You don't need to do any development to enable this.  You can use two different SAP delivered Crystal Reports templates for the ALV output, or create and add your own templates.
    Some of ther BOBJ integration is still in prototype and demo phase within SAP.  For instance we have a data interface to send data to Explorer onDemand from any ABAP application. We have a prototype FlashIsland for WebI to run in place within Web Dynpro ABAP.  Over future enhancement packages you will see increased integration opportunties with the BOBJ capabilites.

  • Business Objects Edge and Crystal reports integration.

    I'm new to the SAP BO application and I would like to know how to allow users to create and publish Crystal Reports via the Business Objects applicaiton.  Currently I have published some reports and the users are able to View then via the InfoViewer Web interface. Now I have a request to allow the users to create their own Crystal reports and publish them. The problem is that the users are not part of my companies network but we have a VPN connection that they user to login to the InfoViewer Web front end to view the reports I have published.

    Hi Ed,
    what for a Database do you mean ? The Repository Database or the Database with your productive Data for Designing the Reports?
    1.
    When they enter their username and password in InfoView the Application Server (Tomcat) does it.
    2.
    Via their ODBC connection. Or when you use Oracle via the native client.
    Regards
    -Seb.

  • Business Objects Enterprise vs Crystal Reports Server for Central Reporting

    A question for all the Architects and Administrators out thereu2026
    I have a vision of centrally managing operational reporting (reporting directly against applications and/or ODS databases).  The main reasons:
    - Management of Security
    - Management of Report Inventory
    - More efficient use of server resources and capacity (clustering/sharable)
    This will be Crystal Reports only.
    Is Business Objects Enterprise a feasible solution for this or is a series of Crystal Reports Servers?
    My understanding is that the server version does not cluster or scale and a series of them operates independently from each other.  Is there a concern of the over-kill or magnitude of Business Objects Enterprise for just Crystal Reports?
    What are everyoneu2019s thoughts?
    Thanks Much
    Ryan Shaw
    Enterprise Architect

    Hi Ryan,
    It really depends what meets your business needs.  If you require to scale and expand your BOE XI environment then BOE is what you'll need.  BOE will allow you to have clustered CMS' and have multiple processing servers that reside on remote servers.
    If your deployment does not require a lot resource and one server can handle the amount of reporting requests and logons,  then CR Server would be the better choice.  You are correct,  CR Server is not scalable and is a single server install only.  You cannot expand or add additional BOE servers on remote servers if you use CR Server.
    Regards,
    Wallie
    Edited by: Wallie Cheng on Aug 23, 2008 12:31 AM
    If you want to centralize this,  a series of CR Servers will not work as each installation will be its entity.

  • Failed to read parameter object when publish crystal report 11

    Hi,
    I created a dynamic parameter crystal report and while running in CR (XI) everything works fine.
    Once I am trying to publish to server (infoview & business objects) I am getting error message "Failed read data from report... Reason: Failed to read parameter object"
    (It works fine and was published sucesfully if I change to static parameter.)
    I already try to change 'Edit right' in Business View Manager as other people suggest in other place and I still can't publish it without error.
    Please help.

    Re: Failed to read parameter object using Dynamic Parameter  
    Posted: Sep 27, 2010 9:23 PM    in response to: sharonamt     Edit          Reply 
    Hi Sharon,
    I am facing same kind of issue with crystal report 12.2.0.290 and BO server 12.1.0 © 2008 Business Objects.
    While i am trying publish the report with dynamic parameter, its throwing the error "Failed to read parameter object ".
    I am not sure what to do..can you please guide me ?
    Where we need to install service pack at machine which having crystal report designer or at Bo server
    Regards,
    Johnes

Maybe you are looking for