Execute t-sql before retrieving report data

Hi,
Is there a way to execute t-sql, with the connection from within the report, before the report retrieves it's data?
I need this to initialize the connection's context_info.
After searching the web I have found a solution to my problem which is instead of using a View, use a stored procedure which takes care of initializing the context_info and return the result of the view.
Is there any other solution using crystal reports XI (sp none)?

Download the service Pack or upgrade to CR XI R2 ( 11.5 ) for free and use your XI keycode to install it.
Only other way would be to possibly use a SQL Expression, it may work. Only one data source can be used if using an expression.
Thank you
Don

Similar Messages

  • Error retrieving reporting data

    Hi,
    After I enter to https://afcs.acrobat.com/ I getting this error :
    "Error retrieving reporting data"
    What to do?
    Thanks, Eyal.

    Hi Eyal,
    We're aware of this one - we hit a glitch last night with the reporting
    servers and had to take them down for maintenance. They should be back up
    later today.
      nigel

  • Region sql query(updateable report) data entry in non db columns

    In a tabular report type updateable report
    What is the best way to provide data entry into a non db column a) (to accept parameters for some on demand pl/sql processes)?
    Only when setting a) as a standard report column the db insert/update transaction can be processed
    When changing a) to text field the db insert/update transaction fails with en error (screen/db are not in sync which is not actually the case)
    a) should not be part of the db insert/update transactions but still allow data entry
    How can this be achieved?
    Thanks
    Peter

    Hi Peter,
    I think the easiest solution is to use an updateable view instead of the direct table access.
    Here is an example:
    CREATE OR REPLACE VIEW V_EMPLOYEES
    AS
    SELECT EMPLOYEE_ID
         , FIRST_NAME
         , LAST_NAME
         , FIRST_NAME||' '||LAST_NAME AS FULL_NAME
      FROM EMPLOYEES
    CREATE OR REPLACE TRIGGER TRG_V_EMPLOYEES
        INSTEAD OF INSERT OR UPDATE OR DELETE
        ON V_EMPLOYEES
        REFERENCING NEW AS new OLD AS old
        FOR EACH ROW
    BEGIN
        IF UPDATING
        THEN
            UPDATE EMPLOYEES
               SET FIRST_NAME = :new.FIRST_NAME
                 , LAST_NAME  = :new.LAST_NAME
             WHERE EMPLOYEE_ID = :old.EMPLOYEE_ID
        -- insert and delete is not allowed
        ELSIF INSERTING
        THEN
            NULL; -- there would be a insert code
        ELSIF DELETING
        THEN
            NULL; -- there would be the delete code
        END IF;
    END;
    /FIRST_NAME||' '||LAST_NAME AS FULL_NAME in the example view simulates your function call.
    There might be a possibility to do it in APEX as well, but that was the first solution which came into my mind.
    Patrick
    Check out my APEX-blog: http://inside-apex.blogspot.com
    Check out the ApexLib Framework: http://apexlib.sourceforge.net

  • How can I execute a script before connection?.

    Hi ,
    I want to execute a script before retrieving the data.How can I do this?.
    Thanks...

    When you say create a command line, what exactly are you referring to? I assume you have a logical schema mapped to the ebs instance you want to run the fnd_global function in (the same one you will have reverse engineered the models from etc), just set that as the schema on the step parameters and ODI will connect through for you as a SQL session.
    Technology set to Oracle ?
    What does the error actually say in the operator log?
    ETA : might be worth checking a few of these links as the refer to EBS with ODI : Oracle EBS and ODI
    Some of the pre-shipped KM's must do something similar to what you are trying to achieve for the apps security.

  • OBIEE EXECUTE PHYSICAL sql as Data Model Query

    The following SQL was generated using OBIEE. I'd like to use it as the SQL query for my data model. It works fine it I hard code all of the values into the where clase. However when I attempt to pass parameter values (:ACCOUNTING_PERIOD & :FISCAL_YEAR) into the below SQL statement, I get an error and the report will not generate. The error is the typical "The report can't be rendered. Check with your administrator". Any ideas on how I can pass parameter values into this SQL?
    EXECUTE PHYSICAL CONNECTION POOL SDEVDW SELECT A.BUSINESS_UNIT,A.PROJECT_ID,A.PROJECT_STATUS,A.EFFDT FROM SPSDW.PS_PROJECT_STATUS A WHERE A.EFFDT = (SELECT MAX(B.EFFDT) FROM SPSDW.PS_PROJECT_STATUS B WHERE B.BUSINESS_UNIT = A.BUSINESS_UNIT AND B.PROJECT_ID = A.PROJECT_ID AND B.PROJECT_STATUS<>'C' AND B.EFFDT <= (SELECT PPERIOD_END_DT FROM SPSDW.PS_D_DET_PERIOD WHERE PPERIOD_CD = 6 AND PYEAR_NUM = 2008 AND DT_PATTERN_CD = '01' AND SRC_SYS_ID = 'FSCM')
    ) ORDER BY 1,2,3

    I turned on debug and bounded OC4J. After I ran the report, I did not see any link.
    The error that returns is:
    "The report cannot be rendered because of an error, please contact the administrator."
    Where will the link be located. Is there are log file that I can review. We are using BI Publisher enterprise (10.1.3.3.0).

  • Cursor query retrieves records in anon pl/sql block but no data in store pr

    Hello,
    Can any one please help me,
    I am using the below query, to get the table name and constraint name
    select table_name,constraint_name
    from all_constraints
    where constraint_type in ('R','P')
    and status = 'ENABLED'
    and owner='IRIS_DATA'
    order by constraint_type desc;
    The below query retrieves data in anonymous pl/sql block and retrieve no data when i use the same cursor with the same query in procedure inside the package.
    CREATE USER CLONEDEV
    IDENTIFIED BY CLONE123
    DEFAULT TABLESPACE IRIS
    TEMPORARY TABLESPACE TEMP;
    GRANT DBA TO CLONEDEV;
    the user from which i am executing this query is granted dba role.
    My oracle version is 10.2.0.4
    Please update if you any other information.
    Please advice.
    Thanks

    >
    Roles cannot be used by pl/sql.
    >
    NOT TRUE!
    That is an oft quoted myth. There are many posts in the forum that mis-state this.
    Roles can be, and are used by PL/SQL. In fact, OP stated and demonstrated that in their question: their anonymous block worked.
    The Oracle docs provide a very clear explanation - the core restriction is for NAMED PL/SQL blocks that use DEFINER's rights (the default):
    >
    Roles Used in Named Blocks with Definer's Rights
    All roles are disabled in any named PL/SQL block (stored procedure, function, or trigger) that executes with definer's rights. Roles are not used for privilege checking and you cannot set roles within a definer's rights procedure.
    >
    The Database Security Guide has the information in the section 'How Roles Work in PL/SQL Blocks (which, of course, wouldln't be needed if they didn't work. ;) )
    http://docs.oracle.com/cd/B28359_01/network.111/b28531/authorization.htm#i1007304
    >
    The use of roles in a PL/SQL block depends on whether it is an anonymous block or a named block (stored procedure, function, or trigger), and whether it executes with definer's rights or invoker's rights.
    Roles Used in Named Blocks with Definer's Rights
    All roles are disabled in any named PL/SQL block (stored procedure, function, or trigger) that executes with definer's rights. Roles are not used for privilege checking and you cannot set roles within a definer's rights procedure.
    The SESSION_ROLES view shows all roles that are currently enabled. If a named PL/SQL block that executes with definer's rights queries SESSION_ROLES, then the query does not return any rows.
    See Also:
    Oracle Database Reference
    Roles Used in Named Blocks with Invoker's Rights and Anonymous PL/SQL Blocks
    Named PL/SQL blocks that execute with invoker's rights and anonymous PL/SQL blocks are executed based on privileges granted through enabled roles. Current roles are used for privilege checking within an invoker's rights PL/SQL block. You can use dynamic SQL to set a role in the session.

  • Date parameter does not work in SharePoint 2010 report using SQL 2008 Server Reporting Service

    Here is the settings:
    SharePoint 2010 with SQL server 2008 reporting services configured
    When create a report for a SP list using SQL server report builder (3.0) the date parameter does not work.
    The data parameter is set as "date and time" type and field name equals the col name in the SP list
    When run the report, the whatever dates I select, the result is always the same, so the parameters do not take any effect.
    Is any step missing?
    Thanks for any advice !

    Hi ,
    How did you configure you "date and time" type parameter and field name equals the col name in the SP list?
    Have you tested if other type parameter worked?
    Have you tried typing the date format as 20140722 in your date parameter filed before run the report?
    http://whitepages.unlimitedviz.com/2012/02/using-sharepoint-filters-with-reporting-services-parameters-for-personalized-reports/
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Daniel Yang
    TechNet Community Support

  • SQL ENTERPRISE: The edition of Reporting Services that you are using requires that you use local SQL Server relational databases for report data sources and the report server database

    The error below makes absolutely no sense! I'm using Enterprise Core...yet I'm being told I can't use remote data sources:
    w3wp!library!8!03/05/2015-19:08:48:: i INFO: Catalog SQL Server Edition = EnterpriseCore
    w3wp!library!8!03/05/2015-19:08:48:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: , Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: "The edition of Reporting
    Services that you are using requires that you use local SQL Server relational databases for report data sources and the report server database." is not supported in this edition of Reporting Services.;
    Really? This totally contradicts the documentation found here:
    https://msdn.microsoft.com/en-us/library/ms157285(v=sql.110).aspx
    That article says remote connections are completely supported.
    ARGH! Why does this have to be so difficult to setup?!?

    Hi jeffoliver1000,
    According to your description, you are using Enterprise Core edition and you are prompted that you can’t use remote data sources.
    In your scenario, we neither ignore your point nor be doubt with what you say. But actually we have met the case before that even though the SQL Server engine is Enterprise but the reporting services is still standard. So I would recommend you to find the
    actual edition of reporting services you are using. You can find Reporting Services starting SKU in the Reporting Service logs ( default location: C:\Program Files\Microsoft SQL Server\<instance name>\Reporting Services\LogFiles). For more information,
    please refer to the similar thread below:
    https://social.technet.microsoft.com/Forums/en-US/f98c2f3e-1a30-4993-ab41-acbc5014f92e/data-driven-subscription-button-not-displayed?forum=sqlreportingservices
    By the way, have you installed the other SQL Server edition before?
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Retrieve SQL Query from report without RAS.

    We have a fat client application which uses Crystal Reports.  We upgraded from the RDC/ActiveX viewer to the .Net SDK/.Net Viewer.  One feature that we miss is that we used to read the SQL Query that a report used and wrote it to our log file.  This helped with debugging and with troubleshooting problems in the field.
    Since we only deploy the freely distributable Crystal Reports model and I don't think that RAS falls into this category is there a way which we can read the SQL Query from a report?  If not, could you add this to a list of requested features for future versions.
    I understand why you removed the ability to set the SQL query, but simply reading it does add value.  Maybe it is difficult for you to return this before the report is run in which case giving us the ability to read the value after the report has been run would also be fine.
    Alternatively some sort of event that is fired each time a query is executed would also be helpful as this would allow Crystal Reports clients to monitor SQL from sub-reports.  You could even build a robust logging mechanism which could report additional information (i.e. number of rows returned, formula evaluations, or anything related to report execution).  All of this would make troubleshooting report issues easier for those of us who use Crystal Reports.

    Need to know what version of CR you are using?
    You can use InProc RAS, it comes with CR and is distributed with the runtime files.
    If you are using CR Basic or the version that comes with Visual Studio .NET then no this will not be added to that product line. It is basic functionality only. You will need to upgrade to a Developer version of Crystal reports to take advantage of the the RCAPI features as well as more general API's.
    There is logging for our DB drivers but the log files get very large. If you use ODBC then you have the option to turn on tracing also. Using RAS you don't need to turn on logging as you can get the SQL. This won't be added either.
    Thank you
    Don

  • Pb retrieving sorted data from Table in SQL.

    Hi,
    I get problem to retrieve data in the right order from table in database SQL.
    See code attached: code.png
    I want to sort data according to ID number And then to retrieve those data and fill out a ring control in the right order "descending" .
    But i got always ID 2 instead of 1. See attached  picture : control.png
    it seems that the select statement (see under) is not woking properly. But it is working well in a query in Access DataBase .  
    //Select statement
       hstmt = DBActivateSQL (hdbc, ("SELECT * FROM %s ORDER BY ID DESCENDING",szTableName));
       if (hstmt<= DB_SUCCESS) {ShowError(); goto Error;}
    Some idea ??
    Lionel.
    Attachments:
    code.PNG ‏39 KB
    control.png ‏32 KB

    Hello Lionel,
    According to the document Robert linked, the prototype of DBActivateSQL() is:
    int statementHandle = DBActivateSQL (int connectionHandle, char SQLStatement[]);
    For the 2nd parameter(SQLStatement), you're sending:
    ("SELECT * FROM %s ORDER BY ID DESCENDING",szTableName)
    Probably your intention is to substitute %s with szTableName, but that's not what it happens.
    By using comma operator, ("SELECT * FROM %s ORDER BY ID DESCENDING",szTableName) is evaluated to szTableName, so you call is equivalent to:
    hstmt = DBActivateSQL (hdbc, szTableName);
    In order to substitute %s with szTableName you need to first build the string you're passing as the 2nd parameter:
    char query[512];
    sprintf(query, "SELECT * FROM %s ORDER BY ID DESCENDING",szTableName);
    hstmt = DBActivateSQL (hdbc, query);

  • The report I published on the SQL server report server is not showing in the application we use to retrieve reports.

    The report I published on the SQL server report server is not showing in the application we use to retrieve reports. My cell phone number is {removed}
    Thanks.

    Hello Roger Tenn,
    Thank you for posting in the TechNet Forum.
    As this issue is related to SQL server report server, to receive better report, it is recommended to ask in the SQL server forum.
    https://social.technet.microsoft.com/Forums/en-US/home?category=sqlserver
    The professionals here will be glad to help you.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • How can i save and retrieve blob data through forms and reports...

    I have blob data type column and I want to save word, html, gif
    document in oracle database through forms 6 and retrieve the
    data into forms and reports.
    Details : I want to open .doc,.html,.gif file through a button
    and save it ..and i want retrieve the data into text item same
    in reports....
    If anybody have the answer then send me at
    [email protected]

    use ole container
    initialize the container with the filename (doc or gif)
    Edited by: arshid on Feb 8, 2009 1:57 PM

  • How to catch event before retrieving data in table?

    Hello
    I use Oracle JDeveloper 11.1.1.2.0
    I need to set parameters session (Package Vars) before any refresh my page (I retrieve data from views that use this vars).
    For this reason I have created method setUserSessionParameters(int[] parameters) in AppModuleImpl.java and I am able to call it from my backing bean.
    It's working fine, but I need to call it before any retrieving data in my tables.
    May be, there is a usual way to catch event before retrieving data is started?
    I'd call my method in that place. I think it would be perfectly well decision.

    Hi,
    you can define a PhaseListener method on the f:view component (it has pre and post properties for this). In the after RestoreView phase, you can access the binding container and call teh AM method to set the values. This way, before the page renders, the value is set
    Frank

  • Write / store xml data in Xe and retrieve stored data using pl/sql

    Hi to all,
    i'm searching a tutorial on:
    A - how to write / store xml data in Xe and retrieve stored data using pl/sql
    I don't want to use other technologies, because i use htmldb and my best practice is with pl/sql.
    I was reading an ebook (quite old maybe) however it's about oracle 9 and it's talking about xmltype:
    1 - I don't understand if this is a user type (clob/varchar) or it's integrated in Oracle 9 however i will read it (it's chapter 3 titled Using Oracle xmldb).
    Please dont'reply here: i would be glad if someone can suggest me a good tutorial / pdf to achieve task A in Oracle XE.
    Thanx

    Thank you very much Carl,
    However my fault is that i've not tried to create the table via sql plus.
    Infact i was wrong thinking that oracle sql developer allows me to create an xmltype column via the create table tool.
    however with a ddl script like the following the table was created successfully.
    create table example1
    keyvalue varchar2(10) primary key,
    xmlcolumn xmltype
    Thank you very much for your link.
    Message was edited by:
    Marcello Nocito

  • Reports based on SQL view contain no data. Reports based on tables work just fine

    When we load a report into Crystal reports server that is based on a SQL view the report will run but will contain no data. A report that pulls data from SQL tables works just fine. Running the crystal report on standalone crystal reports works just fine.
    I am completely lost on this one. If you have any ideas please send them my way.

    Are you missing an ODBC / TNS entry on your CMS (or report processing, if clustered env) server?  This could definately be an issue if the report will run locally within CR client, but not when hosted on the enterprise environment.  Another test would be to run the report from CR client ON the CRS / BOE server..

Maybe you are looking for

  • Free Goods : Category/Group wise

    Hello Experts, Greetings. I have a sincario where by we give the freegoods on category basis.for ex.combination of (5-6) material codes will make one category/group.Our condition is that if customer pickes 25 cartons of that particular category,he is

  • How to Update HUMAN TASK Payload SOA/BPM 11G

    Hi , I need to update the Expiration time based on the escalation level for Human task . I trying to update the TaskExpiration time on the Java call back when onAssign activity is triggered. Even though the execution is successful the task will not b

  • Making a playlist the same as a alb

    I have had my Nomad Jukebox Zen Extra going on 3 years now and have finally decided to try the Creative Media Souce, I just did all the software updates through Creative and I believe that my Media Source is 5 although I see another that just says me

  • Printing Playlists

    Hi I am into house music and I cannot work out how to print a playlist so that the title, artist, mix and length of tune is showing. I usually use CD Jewel case insert and I can only usually see either 1.) the title + Artist+ and half the mix or 2.)

  • My photo albums added to Mobile albums have all photos older then 1970 showing dates (in Photoshop elements) of 12/31/1969 6:59 PM [was: 12/31/1969]

    argggh.   Not sure if this bug is new with Adobe Photoshop Elements 13 or existed in 12 which I skipped.  My photo albums added to Mobile albums have all photos older then 1970 showing dates (in Photoshop elements) of 12/39/1969 6:59 PM.   This is a