Insert dynamic variable in report title?

Hi
I am new to Discoverer. I have created a report that displayed a set of data based on the value of last month. So I have created a calculation that gets the value of last month:
LAST_MONTH = TO_CHAR(ADD_MONTHS(TRUNC(SYSDATE,'MM'),-1),'MON/YYYY')
I then use the value of LAST_MONTH to select dates from my data where DATE LIKE LAST_MONTH.
But I want the report title to actually have the value of LAST_MONTH in it, so it actually says something like
Report for NOV/2009
dynamically etc.
Is this possible?
Thanks
Lee

Hi Lee
To add to what Rod has said, which is 100% correct, let me explain why.
In order to get something into the title of any report or document, whether this be Word, Excel, SQL or even Discoverer, that something must be applicable to all of the values currently displayed on the page of the report. Whereas Word or Excel will allow you to manually place something into the title, Discoverer does not. In order for Discoverer to allow you to place something into the title it must either be a Page Item or a Parameter. This is because Page Items and Parameters are guaranteed to be unique to the page of the report being displayed. Thus, if you had more than one Page Item, as you move from one to the next the title would dynamically change. When you have a fixed value or calculation, such as your LAST_MONTH, you still need to display it in the Page Items in order to place it on your title.
To make a Page Item or Parameter display in the title you simply type the & character followed by the name of the item as it appears in the Page Items or by the name you gave the Parameter. Case is import too so last_month is not the same as LAST_MONTH.
Whenever Discoverer encounters the character & in the title it starts looking for a Parameter or Page Item named by whatever is following the &. If it finds a match it displays the value. It no match is found then it literally displays whatever you typed. Any additional characters that you type after a successful match are also display literally.
For example: suppose you Page Item is called LAST_MONTH and the value was NOV-09 but in the title you typed &LAST_MONTHS then what will display would be NOV-09S. However, if you typed $last_months then you will literally see &last_month in the title.
I hope this helps.
Best wishes
Michael

Similar Messages

  • Text Variable for Report Title

    Hi All,
    My requirement is to keep a dynamic text as current fiscal period in the Title of the report.
    I have created a Customer exit variable and the value is getting populated. But the user does'nt wanna see the Key (Ex 2007004 ), he want to see the text as
    Apr 2007.
    If i am using a replacement path variable, then i can say replace with text. But as the text variable need to be in the report title, i have choosen the cust exit which will give only the key not the text.
    Can anyone suggest me how to solve it.
    Thanks In Advance
    Ram

    Hi,
    check the below thread.
    0CALMONTH values need to display in Texts
    Regards,
    Siva.

  • Formatting date of Presentation Variable in Report title

    Hi
    I have the following presentation variable, @{PR_WE_DATE}{Week End Date}, in a report title. However the date format shown in the title is different from the format in the prompt.
    In the report title the date format is YYYY-MM-DD however I want to display it as DD_MM_YYYY
    Can anyone let me know if it possible to format the date format for a presentation variable?
    Regards
    A

    I've tried this and all this output to the title is 2009-12-03[DD_MM_YYYY]
    Any other suggestions? Maybe I can change it when I set the variable in the prompt, did try {variable}[DD_MM_YYYY], in the prompt but it didn't work

  • How to get current quater as  variable in Report title

    Hi Experts,
    I am trying to get current quater to be displayed as variable in the reports title.
    @{Quater[Q]}
    Can someone provide me exact syntax to get this one in Report title page...
    Thanks
    V

    Hi,
    Please refer to the link below:
    http://debaatobiee.wordpress.com/2009/09/29/using-repository-session-and-presentation-variable-in-titlesubtitlenarratives/
    Close the thread and award points if the question is answered.
    Cheers,
    -Amith.

  • Variable in Report Title?

    Hi I'm fairly new to ORACLE BI and want to output the Date in the Filename of the reports when the users run them. So when they download the report as XLS PDF etc is shows "filename DD-MM-YY".
    Is this possible?
    Many Thanks
    Ed

    ahh, now I see what you're talking. Here's the issue you're running into. The download report doesn't use the title as the download file name. Instead, it uses the physical name of the report in OBIEE. So even if you add the system date to the title of the report, it won't affect the download name. It just happens that both the download name and the title default to the name of the Answer Request.
    So if you really wanted someone to download it with a date already in the file name, you have two options:
    1) Physically rename the Answer Request periodically to indicate the last time it was refreshed. The issue here is that links to this Request will get outdated fast. And it's not the prettiest solution
    2) You'd have to go into the Javascript behind OBIEE and edit how it generates the download file. I checked out the web page source code for the download link and here's where you'd want to start digging: onclick="return NQWPopupMenu(event,'idDownloadLinksMenud:dashboard~p:ngm14ept52q4tcnt~r:dr2ss84kj32lkjoi')"
    That NQWPopupMenu function is what generates the pop up window with the different file outputs. Once you dig through there, it will eventually lead you through the script that does the excel outputting. Once you find the piece of code that creates the output file, it should be as simple as appending a sysdate to the file name.
    Good luck!
    -Joe

  • Use of Presentation Variables in Navigated Report Title

    Hi All,
    It's regarding the presentation variable in report title. I have value interaction to another report based on Prompted values. But when we click on the value it will go to another report page and giving the results, but the title view is not changing as per the requested value. The title should change dynamically, but it is showing the P.Variables in place of prompted value.
    Below are the ways i have used the P.Variables:
    @{brand1} at @{customer}, @{sensitivity}% Sensitivity
    @{brand1}{'Prod'} at @{customer}{'CVS'}, @{sensitivity}{'15'}% Sensitivity -----(default values here)
    Version : OBIEE 11.1.1.5.0
    Could you provide me the solution for this issue.
    Thanks in Advance,

    Hi,
    You can use the presentation variable when you are passing the value from the prompt and filtering after
    clicking on the 'GO' or 'APPLY' button. So that assigns one value and is passed in the report in the
    page used.
    What you need to do is you need to have the 'is prompted' for the column used in the title
    or you can make the column is equal to @{pres_var}.
    But still if you dont use the columns in the report and you dont want to filter the report with the title columns
    then you can use narrative view with all the columns used in the title and have 'is prompted' and make its formatting similar to title view and save as a separate report
    And place the narrative view above the report
    Regards,
    MuRam

  • How to change report title dynamically??

    Hi,
    I need to change the report title dynamically. The report title must contain the value of a particular culumn in the same report.
    ex:
    col1----col2
    123----abcd
    Report title should be report123
    Thanks

    Hi BIPUser,
    Thanks for your answer.
    @1 in title view is not working. It shows @1 in the title view.
    But Narrative view is working fine.
    Thanks again
    Have great weekend
    Edited by: bob123 on Apr 2, 2010 8:41 AM

  • Passing report name as report title

    Using Desktop Publisher for Word and a standalone BIP Enterprise version, is it possible to pass the report name to the rtf template so that it could be used as the report title?
    This feature would be useful when there are multiple reports (different names and slightly different queries/criteria) that use the same templates. We could then dynamically change the report title based on the report name.
    Thanks,
    Haresh

    Haresh,
    I'm not sure if there is any simple way to print report name in rtf template.
    But there is a work around. Follow below steps...
    1>create parameter called Report_Name in every report
    2>put default value for that parameter as report name (Title)
    3>select parameter type as Hidden
    Now in rtf template.
    <?param@begin:Report_Name?>
    <?$Report_Name?>

  • How to generate report with dynamic variable number of columns?

    How to generate report with dynamic variable number of columns?
    I need to generate a report with varying column names (state names) as follows:
    SELECT AK, AL, AR,... FROM States ;
    I get these column names from the result of another query.
    In order to clarify my question, Please consider following table:
    CREATE TABLE TIME_PERIODS (
    PERIOD     VARCHAR2 (50) PRIMARY KEY
    CREATE TABLE STATE_INCOME (
         NAME     VARCHAR2 (2),
         PERIOD     VARCHAR2 (50)     REFERENCES TIME_PERIODS (PERIOD) ,
         INCOME     NUMBER (12, 2)
    I like to generate a report as follows:
    AK CA DE FL ...
    PERIOD1 1222.23 2423.20 232.33 345.21
    PERIOD2
    PERIOD3
    Total 433242.23 56744.34 8872.21 2324.23 ...
    The TIME_PERIODS.Period and State.Name could change dynamically.
    So I can't specify the state name in Select query like
    SELECT AK, AL, AR,... FROM
    What is the best way to generate this report?

    SQL> -- test tables and test data:
    SQL> CREATE TABLE states
      2    (state VARCHAR2 (2))
      3  /
    Table created.
    SQL> INSERT INTO states
      2  VALUES ('AK')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('AL')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('AR')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('CA')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('DE')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('FL')
      3  /
    1 row created.
    SQL> CREATE TABLE TIME_PERIODS
      2    (PERIOD VARCHAR2 (50) PRIMARY KEY)
      3  /
    Table created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD1')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD2')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD3')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD4')
      3  /
    1 row created.
    SQL> CREATE TABLE STATE_INCOME
      2    (NAME   VARCHAR2 (2),
      3       PERIOD VARCHAR2 (50) REFERENCES TIME_PERIODS (PERIOD),
      4       INCOME NUMBER (12, 2))
      5  /
    Table created.
    SQL> INSERT INTO state_income
      2  VALUES ('AK', 'PERIOD1', 1222.23)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('CA', 'PERIOD1', 2423.20)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('DE', 'PERIOD1', 232.33)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('FL', 'PERIOD1', 345.21)
      3  /
    1 row created.
    SQL> -- the basic query:
    SQL> SELECT   SUBSTR (time_periods.period, 1, 10) period,
      2             SUM (DECODE (name, 'AK', income)) "AK",
      3             SUM (DECODE (name, 'CA', income)) "CA",
      4             SUM (DECODE (name, 'DE', income)) "DE",
      5             SUM (DECODE (name, 'FL', income)) "FL"
      6  FROM     state_income, time_periods
      7  WHERE    time_periods.period = state_income.period (+)
      8  AND      time_periods.period IN ('PERIOD1','PERIOD2','PERIOD3')
      9  GROUP BY ROLLUP (time_periods.period)
    10  /
    PERIOD             AK         CA         DE         FL                                             
    PERIOD1       1222.23     2423.2     232.33     345.21                                             
    PERIOD2                                                                                            
    PERIOD3                                                                                            
                  1222.23     2423.2     232.33     345.21                                             
    SQL> -- package that dynamically executes the query
    SQL> -- given variable numbers and values
    SQL> -- of states and periods:
    SQL> CREATE OR REPLACE PACKAGE package_name
      2  AS
      3    TYPE cursor_type IS REF CURSOR;
      4    PROCEDURE procedure_name
      5        (p_periods   IN     VARCHAR2,
      6         p_states    IN     VARCHAR2,
      7         cursor_name IN OUT cursor_type);
      8  END package_name;
      9  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY package_name
      2  AS
      3    PROCEDURE procedure_name
      4        (p_periods   IN     VARCHAR2,
      5         p_states    IN     VARCHAR2,
      6         cursor_name IN OUT cursor_type)
      7    IS
      8        v_periods          VARCHAR2 (1000);
      9        v_sql               VARCHAR2 (4000);
    10        v_states          VARCHAR2 (1000) := p_states;
    11    BEGIN
    12        v_periods := REPLACE (p_periods, ',', ''',''');
    13        v_sql := 'SELECT SUBSTR(time_periods.period,1,10) period';
    14        WHILE LENGTH (v_states) > 1
    15        LOOP
    16          v_sql := v_sql
    17          || ',SUM(DECODE(name,'''
    18          || SUBSTR (v_states,1,2) || ''',income)) "' || SUBSTR (v_states,1,2)
    19          || '"';
    20          v_states := LTRIM (SUBSTR (v_states, 3), ',');
    21        END LOOP;
    22        v_sql := v_sql
    23        || 'FROM     state_income, time_periods
    24            WHERE    time_periods.period = state_income.period (+)
    25            AND      time_periods.period IN (''' || v_periods || ''')
    26            GROUP BY ROLLUP (time_periods.period)';
    27        OPEN cursor_name FOR v_sql;
    28    END procedure_name;
    29  END package_name;
    30  /
    Package body created.
    SQL> -- sample executions from SQL:
    SQL> VARIABLE g_ref REFCURSOR
    SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2,PERIOD3','AK,CA,DE,FL', :g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         CA         DE         FL                                             
    PERIOD1       1222.23     2423.2     232.33     345.21                                             
    PERIOD2                                                                                            
    PERIOD3                                                                                            
                  1222.23     2423.2     232.33     345.21                                             
    SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2','AK,AL,AR', :g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         AL         AR                                                        
    PERIOD1       1222.23                                                                              
    PERIOD2                                                                                            
                  1222.23                                                                              
    SQL> -- sample execution from PL/SQL block
    SQL> -- using parameters derived from processing
    SQL> -- cursors containing results of other queries:
    SQL> DECLARE
      2    CURSOR c_period
      3    IS
      4    SELECT period
      5    FROM   time_periods;
      6    v_periods   VARCHAR2 (1000);
      7    v_delimiter VARCHAR2 (1) := NULL;
      8    CURSOR c_states
      9    IS
    10    SELECT state
    11    FROM   states;
    12    v_states    VARCHAR2 (1000);
    13  BEGIN
    14    FOR r_period IN c_period
    15    LOOP
    16        v_periods := v_periods || v_delimiter || r_period.period;
    17        v_delimiter := ',';
    18    END LOOP;
    19    v_delimiter := NULL;
    20    FOR r_states IN c_states
    21    LOOP
    22        v_states := v_states || v_delimiter || r_states.state;
    23        v_delimiter := ',';
    24    END LOOP;
    25    package_name.procedure_name (v_periods, v_states, :g_ref);
    26  END;
    27  /
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         AL         AR         CA         DE         FL                       
    PERIOD1       1222.23                           2423.2     232.33     345.21                       
    PERIOD2                                                                                            
    PERIOD3                                                                                            
    PERIOD4                                                                                            
                  1222.23                           2423.2     232.33     345.21                       

  • Show Report Variable in the title

    Hi all,
    I need to know if it's possible to show in a title of Answer a report variable and, if it's possible, how can I do.
    Thanks a lot
    Steve

    Hallo Venkat,
    Thanks for your reply!
    I'd like to have the most recent loaddate in the title, that works fine now.
    However, i'm struggling with the format of the variable, maybe you have a tip how to change that.
    This is what i've done:
    1. Created repository initialization block "get most recent loaddate". This refreshes every day. The query is basicly a select on my loadtable to get the max date from the loadtable.
    2. Then i created a dynamic repository variable "get most recent loaddate" which retrieves from my initialization block.
    When i set default to '31-12-2007' (just for checking), i creates TIMESTAMP '2007-12-31 00:00:00'.
    3. So, when i use the variable in the title, i get all this text. I'd like to just see the date instead.
    Do you have a suggestion how i can set the datatype to date from the variable?
    Thanks
    Sandra

  • Inserting Dynamic Images in to a Crystal Report 10

    Hi all,
    I am trying to insert dynamic pictures into my report from repository, by getting the path for the picture from database fields. The version that I am using is Crystal Reports 10.
    Here is what I have done.
    I inserted an OLE object into the report, went to "Format Graphics" by right clicking on the OLE object, then to "Hyperlink" Tab (as I didn't see anything other than "Reset" button and picture dimension options under the "Picture" tab), and selected "File" Radio button (as I didn't want to display the picture as Hyperlink) and gave the @Filepath as the formula there. @Filepath is the formula that gives me the complete path for the JPEG that I need to insert in the report.
    filepath = field A + field B
    where field A is the location for the image and field B is the actual image name.
    the actual image is located in repository folder.
    I am not able to see the image in the report "Preview" section as it is showing it has an empty box and when I click on that empty OLE object, I am able to view the image in a separate window where as my requirement is to view the image within the report (not in a separate window).
    I didn't find anything useful under Format Graphics -> Picture tab.
    I appreciate any kind of help from you all.
    Thanks!

    That feature wasn't available nor was it supported in CR 10. You'll have to upgrade to CR Xi R2 or 2008 to allow using a database field as the location of the file.
    CR 10 would only load the picture when the report is opened, it will never update when clicking on the refresh button.

  • Using Standard Text Variables for FYPERIOD in Report Title ?

    Hi,
    We have a requirement where the user input the variable 0fiscper to the query (001.2010). How to get the text value of that variable in the query description in the bex query ?
    For example user input, 008.2010. We need to get "Aug 2010 Sales values " where Sales values will be the report text. I want to get Aug (month) and year (2010) before the report title. I have searched in google and sdn and could not find any link, but found a doc for the column header text using the same variable. I have tried the same procedure and its just display the zvariable name and Sales value's instead of the label. Please advise.
    Thanks
    DR

    You can create a Text variable with replacement path of Fiscper as reference char. Select Key in details tab of replacing variable.
    If you are just getting technical name, then it is understood that it is not getting replaced.

  • Presentation Variable - Display 'All Values' in Report Title

    If I create a Dashboard Prompt and then set it equal to a Presentation Variable, I then display this Presentation variable in the report title. For the Dashboard Prompt I allow them the 'All Values' choice, in fact, this is the default.
    The issue is displaying this in the Report Title, when it is 'All Value' nothing is display in the title, when they select a value such as 'Region D' then it works and this value will dispaly.
    I looked at the documentation and it says you can use a default value, however, setting up that still does not work. It still is blank.
    Has anyone seen this issue or know of a workaround? I'd like to have something like 'All Vales' display or is there a condition I could write to set this.
    Thanks

    Hi Guys,
    I have did the following in order to achieve your requirement:
    As usual, create a request with a column prompted and a dashboard prompt containing that column and set the Presentation Variable (ex: varDept)... bla bla..
    Placed them on the Dashboard to generate your issue, discussed...
    Now, what I have did is:
    1. Created one more Request with the column used on Prompt and specified the Formula to it as:
    CASE WHEN '@{Dept}'||'A'='A' THEN 'All Departments' ELSE '@{Dept}' END
    Note: Take 2 same columns (and hide one) because we are using above formula which does not contains the Column from any table.
    2. Created Narrative View and referenced the above Column.. @2 (in my case).. and specify 1 in 'Rows to Display' field. Do the formatting as required viz., specifying Font size, family....
    3. Place this request in between the Prompt and First Request..
    Now, you can able to see 'All Departments' if 'All Choices' is selected.
    Hope this idea will helps you guys..
    Regards,
    -Vency

  • Presentation Variable Formatting in Report Title

    I have populated 3 presentation variables via a dashboard prompt. I also display their values in the report subtitle, but I did not expect the following format in the display:
    from TIMESTAMP '2009-10-19 00:00:00' to TIMESTAMP '2009-10-25 00:00:00' for Abilene
    The dates appear formatted as 10/19/2009 and 10/25/2009 in the dashboard prompt which is how I want them formatted in the title. Where is this subtitle formatting originating? So, I can reformat it.
    Edited by: Bob from Austin on Oct 26, 2009 11:28 AM

    Hi.
    I suggest you to read this first:
    How to change date format mask in date dashboard prompts - drop-down list and calendar
    http://108obiee.blogspot.com/2009/03/how-to-change-date-format-mask-in-date.html
    On the end of this post is a explanation of date format and presentation variable in the title:
    And you can find a complete example here:
    Date between in filter and title when using presentation variable from calendar dashboard prompt or drop-down list in OBIEE
    http://108obiee.blogspot.com/2009/03/date-between-in-filter-and-title-when.html
    Before everything customize instanceconfig.xml, change datatype of TABLE.COLUMN in the physical layer to DATE and keep on eye if you are using repository variables as default values to dashboard prompt, which datatype they have, character, date or timestamp, this can cause problems. That's explained in the posts above.
    Regards
    Goran
    http://108obiee.blogspot.com

  • Session variable reference in report title.

    Can someone suggest me a answer for my problem?
    I want to display the report title by with the logged in username. So, I've created a report and in the 'Edit View' of 'Title'view of that report, i just placed '@{NQ_SESSION.user}' in the Sub title section. But instead of displaying user name in the report subtitle, i have it displayed '@{NQ_SESSION.user}'. Can someone tell me where am doing wrong?

    I Apologize stijn. I should have done that!! Will do it from next time.
    The thread you referenced have 2 ways:
    1.@{biServer.variables}
    2.@{session.serverVariables}
    I have tried with both like @{biserver.user} and @{session.user} placing them inthe report title view. These 2 doesnt work and giving me the same old result- displaying the same code!! :(
    Am i doing any wrong here in referencing the variables??
    Daan,
    I followed the John's like and it was not helpful either!! :(
    Actually, John was referencing it through column and later hiding that column. Am not sure which column to select here. So, i took one column and applied the formula and hide that column. But, its throwing error saying that the valueof{session.user} doesnt exist!!
    Since am new to this technology, can you guys guide me?

Maybe you are looking for