Repository variable with report level prompts

Hi Gurus,
i want to display previous year ,current year into one prompt.
i have created two repository variables with the name of previous year and current year . i have tried for sql results its giving me odbc error.
SELECT @{biServer.variables['currentyear']['previousyear']}  "year"."year ID" FROM "table a" these query is giving odbc error. could you please help me out to resolve these issue?

Why two create two variables,Go head and create one presentation variable and embed the below sql
SELECT saw_0 FROM ((SELECT Year(CURRENT_DATE) saw_0 FROM "SampleSales") UNION (SELECT Year(CURRENT_DATE)-1 saw_0 FROM "SampleSales")) T1 ORDER BY saw_0
Where SampleSales is my Subject Area.
Mark if helps.

Similar Messages

  • New Repository variable failing with 'Unresolved Identifier' error

    Hi,
    I created a new repository variable and when used in the Segments/Reports it is failing with 'Unresolved Identifier' error. This is happening intermittently and sometimes it is getting the results as expected, Can you please let me know where I am wrong?
    Thanks,
    Viswanath K M

    Couple things to check here are :
    1) Make sure you have spelled the variable name correct.
    2) Make sure you are using the repository variables with appropriate data type columns.
    Regards,
    -Amith.

  • Problem with a initialization block for a repository variable

    This is a very strange problem, some queryies which are issued on behalf of a Repository Variable give a succesfull completion but with 0 rows selected where it should select 1 row.
    I have a query like this
    select var1, var2, var3, var4 from table1
    where var1 = (select max(var1) from table2);
    When i test the query it gives nicely a result 1 row and the repository variables are filled correctly. The initialization block has a schedule so it will run once an hour.
    In the logfile I can see that the query is fired on behalf of my repository variable with a result of 0 rows.
    I thougt i could work around the problem by puttting the query in a view, import this view in my physical layer and do a simpel select var1, var2, var3, var4 from view in the initialization block.
    This still had the same result, testing it works fine I get nicely one record, when it is fired as a result of a schedule it gets a result of 0 rows selected.
    I've tried the query in different formats, the query that i started with was this (see below). When that didn't work i started testing with simplere query's like above
    select var1, var2, var3 , var4 from (
         select var1
         from table2
         where type='x'
    and datum = (select max(var1) from table2 where type='x')
    ) join table2 using (var1)
    Other init blocks work fine. Those init block differ from the one with the problem, they have no join between two tables. The only join I have in one of the working blocks is a join with something from dual.
    The other point is, this init block did work on a previous version of obiee, but after an upgrade it doesn't work anymore.
    The OBIEE version is 10.1.3.4.1.090414.1900
    The database is version 10.2.0.1.0
    I was able to test it myself on a 10.2 database with a 10.1.3.4.0 obiee there it worked fine. Also with 10.1.3.4.1 with a 11g database and that worked ok to.
    Has anybody else stumbeled on this problem and how can i solve it. Also workarounds are welcome. Preferably not changing to a session variable cause in that case i have to change all the reports that use this variable.
    Kind regards,
    Yvon

    Have your DBA put a trace on your OBIEE sessions to see what SQL is OBIEE firing and to confirm the rows do exist. Are you sure this data is always there?

  • How set value for more than one variable using a single prompt

    There is a way to set more than one variable with a single prompt?
    e.g. set @CurrentYear and @PasteYear using just a single prompt for @CurrentYear.
    Some hint?
    Thanks
    Luc

    Using repository variables you can set like that.
    Check this link http://gerardnico.com/wiki/dat/obiee/set_variable
    If helps pls mark

  • Command level parameters and report level parameters

    Hi All,
    I know it is a basic question.But please guide me.

    Hi Divya,
    Please be specific about what you're looking for help on. Are you trying to understand the difference between the two?
    - Command Level promps are created in the 'Add Command' option and are usually added in the where clause to filter records on the database based on the value/s entered by the user
    - Report Level prompts are created in the report via the Field Explorer and serve the same purpose as the Command Level prompts however offer greater functionality and options for the prompts - e.g creating a date range prompt
    P.S: There are of course many other differences too.
    -Abhilash

  • How to pass the prompt value to repository variable in obiee 11.1.1.7

    Hi All,
    I am given a tabular report to build in OBIEE 11.1.1.7 version using insurance data.
    I have to show different types of claim names and their corresponding count in the table. One of the calculations require me to use the total no of claims(i.e sum of all the claims).
    Example:
    Total No of claims: 600
    Total No of Auto Claim: 60
    I have to create a table on Auto Claim like:
                   claim types       count
                        X                    10
                        Y                    20
                        Z                    30
    I was calculating total no of claims by using dynamic repository variable as it was a constant value. Example: repository_variable1: select count(claim ID) from Insurance; In report I was just using value of (repository_variable1)
    Now client has asked us to give date prompt so the total no of claims (assumed as 600) will change with respect to period. I can calculate total no of claims with respect to different claim type (as shown in the table above) with respect to period filter in the report.
    The problem I am facing now is, I need the count of all the claims on a partucular period too. Repository variable is giving always calculating the count as 600. But the count should change with respect to period selected. How to get this value?
    Can I create a presentation variable in the prompt and pass this value as an argument for repository variable?
    Please help. I am in urgent need of the solution.
    Thank you.

    Hi Srini,
    I tried creating it as metric. But the problem is my pivot table is on Auto Claims.
    Let me try to make myself a bit more clear.
    Total No of claims in fact table: 600
    Total No of Auto Claims in fact table: 60
                    claim types(auto claims)       count        Calculation
                        X                                        10             10/600
                        Y                                        20             20/600
                        Z                                        30             30/600
    So I need to access total no of claims to calculate. I cant use a metric as the count will take group by with respect to auto claim type and give value only for X claim.

  • BO/BW Report Level Calculation and Prompts

    Hi,
    There is an infoprovider in BI , delta enabled.Start Date and End Date are two fields in Infoprovider.
    The requirement is to have an Use Indicator Prompt having values Y or N.
    if the prompt input is Y , then display only those records where the current date is between start and end date,
    and if the prompt input is N, then display all values.
    Since the infoprovider will have delta loading, this needs to be done in BI/BO Report Level.
    If I have a Keyfigure in BI (using the above logic, having values 0 and 1), then this keyfigure needs to be selected in Web I Report(since the Use Indicator Prompt will be on this keyfigure), if not selected then all the keyfigures will be blank.
    I have changed the aggregation of the Keyfigure to 'None' in Universe, but still it doesnt work

    Hi,
    first of all you should not leverage the InfoProvider directly but instead use the BEx Query and this type of prompting could then be done as an EXIT variable in the BEx query.
    ingo

  • How to initialize a Prompt drop-down list using a Repository Variable.

    Hi,
    the aim is to fill a drop-down list of a Year prompt only with year values that can provide data.
    This Show list SQL statement works:
    SELECT Time."Year" FROM "AnalysisCatalog"
    WHERE Time."Year" <= 2007
    Using the maxYear Repository Variable does not work:
    SELECT Time."Year" FROM "AnalysisCatalog"
    WHERE Time."Year" <= @{biServer.variables[’maxYear’]}
    Error Codes: G689FFB3:SDKE4UTF
    Expression: biServer.variables[’maxYear’]
    How can I achive the result without hardcoding the Year 2007?
    Mny thx Thomas

    Hi,
    Actually this error does not cause any harm except a presentation inconvenience. In my multi-select prompt I am using variable expression with dynamic repository variable. Dashboard results are correct. Just variable's value does not appear on page (error Error Codes: G689FFB3:SDKE4UTF
    Expression: @{biServer.variables['CUR_CAL_PER_MONTH_NAME']}). Pushing "GO" button on the prompt fixing the error but it's actually second execution of the dashboard.
    Any ideas ??

  • Using prompt results in formuls.Is it good to have them in a report level or universe level?Here is the requirements.

    User enters year for which sales need to be shown for entire year and past year.Most of the time this would be current year and past year.
    But here if i put filter on report level for current year and add another query for past year,my report is only showing sales for query1 and showing blanks for another query.
    Can some one please help me with it?

    Hi Rajeswari,
    You need to further elaborate your requirement.
    Seems like the second query does not have data for last year.
    What are you trying to achieve?  Are you using prompts input in your report?
    Regards,
    Yuvraj

  • Export Dashboard Prompt Values to excel with reports

    I have a dashboard prompt. When I export the report, there is no prompt values download with it. Please help.

    I dont think we can get that. If you want to see the filters (which are applied using prompt or report level filters) in the spread sheet
    Try this:
    In Answers->Result tab->Compound Layout->Add View->Filters
    Save
    Edited by: svee on Jul 26, 2012 3:53 PM

  • Bpf with report bex with variable BPC Embedded 10.1

    Hi BPC Friends
    I am creating a BPF with BPC 10.1 Unified.
    I have attached at this BPF a BPC report based on a Bex Query with a variable for the company code.
    The driving dimension of the BPF  is  the company code so I have selected some company codes.
    I have created the BPF Istance and I have assigned at the different company codes the proper users as performers.
    The problem is this:
    The user run the bpf istance for its company but  the report having the variable for the company code allow to the user to select also a different company code.
    I was expecting that the variable for the company code was locked for the company code assigned to the user
    Thanks
    Michele

    Hi Michele
    In the above scenario, from what I was able to understand, you have defined a BPF, the activity within the BPF opens a workbook, the workbook is using a BEx query that has already been defined. The BEx query has a variable which prompts the user for values for company code.
    The authorization variable will populate the BEx company code variable with the values that the user has been allowed to see.
    For example: If the user has a BW analysis authorization that only allows them to see company code 1000, 1003. When the user executes the report in Analysis For Office, the prompt in the workbook should only display the values 1000 and 1003. (Meaning that the user only has access to 1000,1003 to choose from)
    I don't understand where the performer is a prompt?.
    The data access profile is typically used to restrict access to the data (restrict what you can see in your report). The BEx authorization variable will not be driven by the Data Access Profile, this will be driven by the BW Analysis Authorization. (I say this under possible correction)
    Do you want the prompt in the workbook to display the performer of the BPF activity ? If so, I don't understand the requirement or why you would want to achieve this.
    Please could you provide more context,
    Hope this helps,
    Kind Regards
    Daniel

  • Issue with date reporting level

    guys,i need help with a field. ok so i have a date like 04/09/09 and i have another field which contains '3' now i need to subtract this 3 from the date on reporting level.  so my result should be 04/06/09. how can i accomplish this task? thanks.

    Hi,
    You can do it by using Formula variable on Date Field.
    Create Formula variable on Date Field
    Process by = Replacement path
    Reference Cha = Your date field
    In Replacement tab:
    Replace variable with = InfoObejct
    Replace with  = Key
    Use interval = This you need to set properly       " This is importent for you
    Offset setting = From & TO = check it and set properly. " This is importent for you
    Then display it in columns and do teh substracion with another formula.
    Thanks
    Reddy

  • Issue filtering a report (based on narrative view) with a dashboard prompt.

    I used HTML and java-script codes in narrative view to solve the issue of "linking different reports on selecting values from a drop-down". A new issue has cropped up due to that implementation. The issue is that i can't attach a dashboard prompt to such a report. This means, when i put this report on a dashboard page with a dashboard prompt to help filter the report, the report does not gets filtered (it does not seems to be connected to the dashboard prompt).
    Has anyone faced this issue before? If yes, please let me know how to tackle it at the earliest.
    Regards,
    Ramil

    Hi,
    sorry , i could not solve the problem. the below case statement i put in the formula of a date column but i got some syntax error.One more thing is case statement is appearing in the select query not in where condition. Do u mean to say if i will put the same column as is prompted then it will come in where condition.
    Could u plz help me where i am doing wrong .
    case when '@{Period}'='Weekly' then Alerts."Creation Date and Time"  between  '@{PStartDate -7}' and  '@{PStartDate}' end
    [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <between>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: SELECT Alerts."Business Domain(s)", Alerts."Closing Action Type", Alerts.Closer, case when ''='Weekly' then Alerts."Creation Date and Time" between '' and '' end FROM "Common Productivity Reports for Alerts"

  • Sub report parameter prompt appears when running Visual Studio 2008 with Crystal Reports 2008

    Post Author: relliott
    CA Forum: .NET
    If I build a simple Crystal Report that contains another simple Crystal Sub Report, the report will print preview fine in Crystal 2008.  The problem happens when add this report to a Visual Studio 2008 Web Application Project and I build and debug the application, the Crystal Viewer is prompting the user for the parameter used to link the sub report to the main report.  This should never happen as the user is not supposed to see this parameter.  If I type in some value for this sub-report parameter prompt, the Crystal Report Viewer gives an error message about not finding the field.
    I was having the same problem in Vs2005 with Crystal 10 which is why I upgraded.  Business Object's official fix for this problem was published under their KB article number c2018840 and c2019047.  These hot fixes ended up causing general exception errors in Visual Studio so I scrapped these solutions.
    Support had me install SP0 for Crystal 2008 (which did not fix it).
    Any ideas?
    Any help is greatly appreciated.
    Thanks,
    Rich Elliott

    Hi Bontrager,
    Thank you for posting in MSDN forum.
    According to your description, I agree with pvdg42's suggestion, so I suggest you can try pvdg42's suggestion to install the version of
    Crystal Reports 10.5 to check this issue again.
    Reference:
    http://forums.asp.net/t/1236730.aspx?Which+CR+version+is+in+Visual+Studio+2008+
    In addition, since this forum is
    to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. So if you have any issue about the
    Crystal Reports, I suggest you can ask the issue to the
    SAP Crystal Reports website:
    http://scn.sap.com/community/crystal-reports/content?filterID=contentstatus%5bpublished%5d~objecttype~objecttype%255bthread
    as pvdg42 pervious suggestion, it will be better support.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Setting VarChar Variable with String Parameter in Crystal Report Add Command

    Setting a VarChar Variable with a String Parameter in a Crystal Report 2008 SP6.3 Add Command is causing an error with a SQL State of 42000.  The Error Code depends on which value I select for the parameter.  I created the @DateOpt string parameter in the Modify Command window, not in the report. If I comment out line 14 of the SQL the error does not occur.
    I have attached the SQL Code and screen shots of the errors.   Please tell me what I am doing wrong.

    Since your parameter is of type STRING, you need to enclose references to it within the Command inside single quotes.
    For example, instead of
    SET @BeginDate ={?BeginDate}
    use
    SET @BeginDate ='{?BeginDate}'
    hth,
    - ido

Maybe you are looking for