Set Table Location for Reports(Command Objects)

Hi SAP Gems,
I would like to thank TED,Merry,Jonathan, Shawn, and all the developers contributing to this community.
I would really appreciate any help on following question:
1. I have a report designed in CR 2008 against DB2(JDBC Connectivity).
2. The report is working fine in the designer.
3. There are five sub reports in the main report.
4. The main report doesnt have any command object however every child/sub report has command object with paramaters.
5. Every subreport is linked.
6. I would like to change runtime datasource location for this report using CRJ 2.0 SDK'S.( from AIX to Windows BOX)
7. Both BOX's have same database schema.
8. I am able to view the report in the jsp page using SDK's, however "set table location doesnt works and prompts me the error:
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected database connector error---- Error code:-2147467259 Error code name:failed
*There is no problem with the code because the sample code is taken from sdn.sap as it is and it works for other report without subreport and command objects.
I tried using the following code piece but again same problem.
if(table instanceof com.crystaldecisions.sdk.occa.report.data.CommandTable)
                    IProcedure command = (IProcedure)table;
                    ParameterField commandParam = (ParameterField) command.getParameters().get(0);
                    Values values = new Values();
                    ParameterFieldDiscreteValue pfdv = new ParameterFieldDiscreteValue();
                    pfdv.setValue("ANTON");
                    values.add(pfdv);
                    commandParam.setCurrentValues(values);
I would like to know if I dont want to set the command level param using:
ParameterField commandParam = (ParameterField) command.getParameters().get(0);
                    Values values = new Values();
                    ParameterFieldDiscreteValue pfdv = new ParameterFieldDiscreteValue();
                    pfdv.setValue("ANTON");
                    values.add(pfdv);
                    commandParam.setCurrentValues(values);
would the parameter would be prompted automatically?
how do I find what paramaeter to set and how ?
Regards,
Jonathan Roy

Hi ,
Can any one help please?
Ted !! I would really appreciate an answer from you.
Regards,
Jon

Similar Messages

  • Using a Variable in SSIS - Error - "Command text was not set for the command object.".

    Hi All,
    I am using a OLE DB Source in my dataflow component and want to select SQL Query from the master table  I have created variables v_Archivequery
    String packageLevel (to store the query).
    <Variable Name="V_Archivequery" DataType="String">
         SELECT a.*, b.BBxKey as Archive_BBxKey, b.RowChecksum as Archive_RowChecksum
         FROM dbo.ImportBBxFbcci a LEFT OUTER JOIN Archive.dbo.ArchiveBBxFbcci b
         ON (SUBSTRING(a.Col001,1,4) + SUBSTRING(a.Col002,1,10)) = b.BBxKey
         Where (b.LatestVersion = 1 OR b.LatestVersion IS NULL)
        </Variable>
    I am assigning this query to the v_Archivequery variable, "SELECT a.*, b.BBxKey as Archive_BBxKey, b.RowChecksum as Archive_RowChecksum
    FROM dbo.ImportBBxFbcci a LEFT OUTER JOIN Archive.dbo.ArchiveBBxFbcci b
     ON (SUBSTRING(a.Col001,1,4) + SUBSTRING(a.Col002,1,10)) = b.BBxKey
    Where (b.LatestVersion = 1 OR b.LatestVersion IS NULL)"
    Now in the OLE Db source, I have selected as Sql Command from Variable, and I am getting the variable, v_Archivequery .
    But when I am generating the package and when running I am getting bewlo errror
     Error at Data Flow Task [OLE DB Source [1]]: An OLE DB error has occurred. Error code: 0x80040E0C.
    An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E0C  Description: "Command text was not set for the command object.".
    Can Someone guide me whr am going wrong?
    Please let me know where am going wrong?
    Thanks in advance.
    Thankx & regards, Vipin jha MCP

    What happens if you hit Preview button in OLE DB Source Editor? Also you can use the same query by selecting SQL Command option and test.
    Could you try set the Delay Validation = True at Package and re-run ?
    If set the query in variable expression (not in value), then Set Evaluate As Expression = True.
    -Vaibhav Chaudhari

  • How to dynamically set connection string for report in C# code?

    Hi,
    I have installed CRVS2010. I have created new Crystal Report WPF Application and new report. I would like to set connection string for report in code dynamically.
    Is this possible?
    Thanks
    Ivana

    Lots of posts in this forum on how to set database connections. WPF should not be a consideration as it's just a viewer. The report engine is still the same. Search these forums. Use the search box at the top right corner of this page. Look at samples here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    Note that none of the samples above are using WPF, but like I said, the WPF is just a different viewer and will not impact how the report engine logs on to a database. (I think of it as a gray car vs. a red car. Same engine, just the color is different)
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Error reading cluster table COIX for report 13BUD1A

    Hi All,
    We have issue when display report 13BUD1A using t.code CJE0 in ECC6 system. The error message appear as per below:-
    Error reading cluster table COIX for report 13BUD1A (ID=13BUD1A     KP  01RPSCO_X                        0)
    Message no. KH050
    Diagnosis
    The report structure for report 13BUD1A is stored in the cluster table COIX. An error occurred while the system was reading this data (ID = 13BUD1A     KP  01RPSCO_X                        0).
    Table TKEB1 (Report List) contains administration information for report 13BUD1A. Consequently, table TKEB1 has an entry for the report, but table COIX does not.
    The error may have resulted following a transport -- COIX has not yet been transported to the current client but TKEB1 is already there.
    Procedure
    If it is a transport problem, see if you can execute report 13BUD1A in client 000. If so, import it to the current client again.
    If it is not a transport problem, delete report 13BUD1A from Tables TKEB1 and TKEB2.
    Need you advice, how can we solve this error.
    Thank You.

    Dear AP,
    Thanks for your reply. FYI, we dont have access to client 000. And how to resolve this issue without access client 000?

  • Set backgroung image for report

    Post Author: Hamid
    CA Forum: General
    Hai all,is there any way to set background image for report?in my report there is some lines and i want to set image back of themmany thanks 

    Post Author: synapsevampire
    CA Forum: General
    Sorry, the service went crazy there.
    Right click the poage header and select insert section below.
    Place the imnage in the lower page header (B probably), and then right click the page header b and select format section (section expert) and select the underlay following sections.
    This will give you an idea of the underlay following sections use, then in future posts try including your software version and technical infomation.
    -k

  • How to set database location for stored procedure

    Post Author: Pavel
    CA Forum: Data Connectivity and SQL
    I've already found out that setting location is not only my problem, but I can't understand the correct decision. We using CR to create reports, accessing the data in MSSQL by ODBC.
    Previously (up to version 8) I set location directly, editing the "Table" field in "Set Location" form. Command after report creation was:
    Proc(DBNAME.dbo.PROCEDURE_NAME;1)
    I erased "DBNAME.dbo.", so the correct command was
    Proc(PROCEDURE_NAME;1)
    After that, the report can run on any database name, any ODBC datasource with any owner name of procedure.
    Now we had to upgdate to CR 11 Developer Edition.
    Here I can't erase database location. But when I change database location to ODBC datasource for another database, the properties of stored procedure "Catalog" and "Owner" remain the same as they initiated when report was created! So, when report runs, it call
    exec OLD_DB_NAME.dbo.PROCEURE_NAME;1 ....
    So, the report doesn't work on customer database, because it has different name.
    How can I erase any database location in the report?We run reports using API from Gupta Team Developer applications, may be it is possible to set database location by API before running report?
    Plese help, any tips are usefull.

    Post Author: Pavel
    CA Forum: Data Connectivity and SQL
    When I set location to another database (i.e. another ODBC datasource) by clicking Update button, "Catalog" property is not changing! It remains unaltered. I had to remove procedure from report and then add procedure from another database, so there was a lot of formatting fileds after that.
    This is not a right decision. I didn't solved current problem, I only temporary patched it.
    The correct desision is to set location programmatically from application.But function PEGetNthTableLocation returns empty strings in CR11, or I incorectly declared this function (from CR8.5):
    BOOL CRPE_API PEGetNthTableLocation ( short printJob,  //handle to print job short tableN,  //number of table struct PETableLocation FAR *location     //structure pointer);typedef struct PETableLocation {    WORD StructSize;    char Location &#91;PE_TABLE_LOCATION_LEN&#93;; //256    char SubLocation&#91;PE_TABLE_LOCATION_LEN&#93;; //256    char ConnectBuffer&#91;PE_CONNECTION_BUFFER_LEN&#93;; //512} PETableLocation;

  • Crystal 8.5! Set table locations at run time to queries

    Hopefully some people still remember version 8.5...
    I have a number of reports which all work from a single database, this can be either Access or SQL Server, I'm currently testing on Access. I would like to use the same reports but print them for multiple databases, all of which have the same schema. To do this I'm creating UNION queries in one of the databases and I now want to change the location of the tables in the report to use these union queries instead.
    For example, say the report uses table "Customer" in db1 but I have also have db2 and db3 with the same table, I'm enumerating all fields used in the report and creating a union in db1 something like:
    SELECT field1, field2 FROM Customer IN 'db1.mdb'
    UNION SELECT field1, field2 FROM Customer IN 'db2.mdb'
    UNION SELECT field1, field2 FROM Customer IN 'db3.mdb'
    Now I've tested this in Crystal Reports itself, i.e. setting the location to the new tables, and it works OK. I'm having to use an OLEDB connection otherwise the links get removed. When I try to set the location in code I just get no data on the report even though there is data available.
    In code I'm going through all tables (and all tables in all sub reports) and I've tried setting the Location property to the name of the union, I've tried SetTableLocation "<path to db>", "<union name>" and I've tried both using SetLogOnInfo "<path to db>" as well.
    I'm thinking perhaps converting the report to active data and plugging in an ADO recordset could be a solution but I'm not sure how feasible that is from code (i.e. converting the database driver from either pdsoledb.dll or pdbdao.dll to pdsmon.dll and creating a ttx on the fly...).
    Any help much appreciated.

    Hi,
    SetTableLocation should work but you need to make sure you call it for each of the tables in the report or in this case the Union. 
    Just like in the report designer when you set the location you need to point to the table you want to change.  Even though you get the prompt asking to set the same location for all the tables, it's doing the same thing for you. 
    Hope this helps,
    Brian

  • How to use BAPI_OBJCL* to set classification data for Techn. Objects - PM ?

    Good afternoon !
            I´m working in a project to integrate some legacy system with the ECC 6.0, and I need to do some activities like, create functional locations and equipments in SAP PM, I have done this creating Z RFC modules that call bapis like BAPI_FUNCLOC_CREATE and BAPI_EQUI_CREATE, but these BAPIs doesn´t fill classification data, so, in a first moment, I solved this using BDC, but I would like to solve these needs using standard BAPIs if possible.
            To solve the classification, I tried to do it using the BAPI_OBJCL* BAPIs(BAPI_OBJCL_GET_KEY_OF_OBJECT, BAPI_OBJCL_CREATE_KEY), but I didn´t find any example of using these bapis with technical objects, so I tried to test the BAPI_OBJCL_GET_KEY_OF_OBJECT in a first moment and, when I call it passing '003' as classtype(003 is the classtype for the functional locations), this bapi returns me "Class type 003 requires additional objects"(the same occurs if I try it with 002, for equipment). What means this message ? Need I to do some customization in img/spro, or cannot these bapis be used with PM technical objects ?
            Thank you for your attention,
            Wilson

    Hi all !
            I have found the solution for this problem, I found that I was trying to use the wrong functions for my case, so, to solve my needs here, I will use BAPI_OBJCL_CREATE to set the classification data for Functional Locations and Equipments, and I can use BAPI_OBJCL_GETCLASSES to list all classes assigned for a Technical Object, and BAPI_OBJCL_GETDETAIL to get all characteristics assigned to a Technical Object for a specific class.
            Thank you all for your attention !
            Wilson

  • Set table location

    Post Author: midav
    CA Forum: Data Connectivity and SQL
    Hi, CR 8.5 had   a menu option where one could manually modify table location from &#91;db_name&#93;.&#91;owner&#93;.table_name to just table_name by deleting &#91;db_name&#93;.&#91;owner&#93; prefix which would make your report portable between different databases. It seems Crystal 11.5 doesn't have this option any more.How can I achieve the same in CR 11.5 designer?Thank you, Midav 

    Post Author: zen69
    CA Forum: Data Connectivity and SQL
    Are you sure you can delete it or it was creating  an alias for the table? eg: SELECT * FROM &#91;dbname&#93;.&#91;owner&#93;.table MyTable  Then you can use MyTable.field ? Maybe you should use ODBC to connect to the DB ?  

  • Setting bind variable for a view object from the Managed Bean

    Hi,
    i am using JDeveloper 11g, i have to create LOV in the JSF. To show the LOV, it has to populate data using View object and its query parameter need to be sent from the Managed Bean.
    For the View object i want to set the bind variable parameter from the managed bean value. bename is stored in a managed bean (session scope)
    #{beantest.bename}
    But it gives the following exception.
    JBO-29000: Unexpected exception caught:
    org.codehaus.groovy.control.MultipleCompilationErrorsException,msg=startup failed, Script1.groovy: 1: expecting '!',found '{'@ line1, column 2.
    I have followed the link http://kr.forums.oracle.com/forums/thread.jspa?threadID=615474 like Frank wrote on 8.2.2008:
    But steps are not clear.
    How to input the VO bind parameter with Managed bean variable?
    Any Help
    Regards
    Raj
    Edited by: user9928180 on Dec 17, 2008 9:51 AM

    Hi,
    a bind variable in a VO needs to be exposed as an executeWithParams operation in the pageDef file. Just add a new action binding to the pageDef file (context menu) and select the executeWithParams operation on teh VO. Then in the argument field, reference the managed bean property for the value
    Frank

  • Do we have any option to set time limit for report execution

    Hi Experts,
    Please Could any one clarify is there atime  limit to set  for report execution and if it crosses the limit it wud not display a data,
    Thanks in advance
    Nitya

    Hi,
    Basis should be help you in timeout settings on various cases. Time out setting while execution from portal is there.
    Regards,
    Akshay

  • Setting Default Variant for Report Trans

    Hi All,
    Is there a way to set a default Variant to a reporting transaction? for example for ME2N how do I set a default Variant to be imported to the selection screen automatically once the report transaction is called?
    This is useful if the user uses the same variant all the time.
    Thanks in advance!

    Pls try the below example
    I give you one example,
    Enter t-code ME2N, Then click on Dynamic field selection button.
    Then double click on created by field enter enter any user id in it.
    Then click on save button.After click on this screen your can see one other screen for variant.
    Here you have to assign variant name and meaning. You can also change field status for report with help of this screen.
    Before click on save button, tick on protect check box button and then click on save.
    Then exit from transaction and enter ME2N.
    Click on Get variant button. Here you can see list of variant, select your variant and get report as per your requirement.
    by
    Rajj

  • Set a description for a File object

    Hello, I have to do a File saving task. I have a directory when I place my files. When i press "Save", a dialog appears and a table lists all my files from that directory. Each file must have a description. My question is how to set a description for a file, and also, how to get back that description. 10ks

    public class ExtractionSetFile extends File {
         private String description;
         public ExtractionSetFile( String pathname ) {
              super( pathname );
         public void setDescpription( String descpription ) {
              this.description = descpription;
         public String getDescription() {
              return description;
    }

  • Problems setting "table reference" for TopLink relationships

    I'm trying to use TopLink to create Java objects over two tables that are linked in a many-to-many relationship. I followed the instructions on the 10g tutorial page (drag all three tables into a database diagram), then created a new field (of type Collection) in each of the tables that I'm joining. I then set them both to be many-to-many, and tried to configure the first one. On the general tab, I've set the 'Reference Descriptor' to point to the other table. I've set the 'Relation Table' to point to the associative entity, and disabled indirection.
    When I go to the 'Source Reference' tab, there's nothing in the 'Table Reference' dropdown, and there's no button to create anywhere I can find on that screen. From what I've found looking at old TopLink documentation online, there were new, add, and remove buttons off to the right on older versions of TopLink.
    What do I have to do in this version to create a table reference I can use for the join?
    If I run the 'mapping status report' for the object I'm working with (persons), I get the following:
    Mapping persons -> Table reference is invalid because of the target table chosen.
    Mapping persons -> No table reference is selected.
    Mapping persons -> No source reference is selected.
    Mapping persons -> No target reference is selected.
    I don't really know enough about TopLink to know if these error messages are pointing at something other than the fact that I can't get a table reference to show up or not.
    I'm using the JDeveloper 10g preview (build 1375).
    Thanks in advance for any ideas you might have,
    Jonathan

    I'm trying to use TopLink to create Java objects over two tables that are linked in a many-to-many relationship. I followed the instructions on the 10g tutorial page (drag all three tables into a database diagram), then created a new field (of type Collection) in each of the tables that I'm joining. I then set them both to be many-to-many, and tried to configure the first one. On the general tab, I've set the 'Reference Descriptor' to point to the other table. I've set the 'Relation Table' to point to the associative entity, and disabled indirection.
    When I go to the 'Source Reference' tab, there's nothing in the 'Table Reference' dropdown, and there's no button to create anywhere I can find on that screen. From what I've found looking at old TopLink documentation online, there were new, add, and remove buttons off to the right on older versions of TopLink.
    What do I have to do in this version to create a table reference I can use for the join?
    If I run the 'mapping status report' for the object I'm working with (persons), I get the following:
    Mapping persons -> Table reference is invalid because of the target table chosen.
    Mapping persons -> No table reference is selected.
    Mapping persons -> No source reference is selected.
    Mapping persons -> No target reference is selected.
    I don't really know enough about TopLink to know if these error messages are pointing at something other than the fact that I can't get a table reference to show up or not.
    I'm using the JDeveloper 10g preview (build 1375).
    Thanks in advance for any ideas you might have,
    Jonathan

  • Datamodeler 4 cannot set table classification for individual table

    Hi,
    using version 4.0.0.816 I am unable to set or change the classification type of a table in the tables property dialog. I have created a relational model based on a database schema, and added custom classification types. I can select and assign the classification types at model level using "set classification types" dialog but not at the table level. At table level in the properties dialog the drop down dialog at the top "Base  Classification" is always grayed out. The list boxes below with the arrows initially work as intended, but if I make a selection, close the dialog and then reopen it my selection is gone. Am I doing something wrong or is this a bug?
    Thanks,
    Thomas

    Hi Philip,
    there is a small icon that looks like an infinity symbol turned 45 degrees in the top left corner of every table in the diagram which I assume is the link symbol. I created this model from an existing schema in the database. I have exported the model to a reporting schema.  I have not knowingly created any other models except to make a copy with save as. How can I find out what other model my tables are linked to? Can I remove the links so that I can edit the table properties?
    Thanks for your quick answers so far.
    Thomas

Maybe you are looking for