Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Dynamic headers in OAC classics report

Received Response
421
Views
13
Comments

Summary:

Dynamic headers in OAC classics report

Content (required):

We need dynamic column header in classic report ,eg.

header1 = current date -7,header2 = current date-14 ..... etc.

for example : current date = 09Dec2022

header1 = 09Dec2022-7 = 02Dec2022

header2 = 09Dec2022-14 = 25Nov2022

We tried using union report to achieve same.

since in main report(data report) data types for columns are mixture of number and varchar which is used in further calculation can't be change data type so union report (for header) is not working.

Any suggestion on same.


Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.
«1

Answers

  • Rank 5 - Community Champion

    Hi Indra,

    Can't you try to cast everything to number?

    Also, please elaborate more on your problem. is it related to headers or to data under those columns?

    Regards,

    Siddharth Dang

  • Rank 5 - Community Champion

    Hi Siddharth,

    Its related to Header not data in header and cast not work for us.

  • Rank 6 - Analytics Lead

    Hi Indra,

    I have done this on a dashboard, but not on a stand-alone analysis. I needed 4 column headings for year1, year1+1 year1+2, and year1+3. I have a repository variable for year1 (called "STIPYear1"). I created a hidden dashboard prompt that creates 3 presentation variables: varSTIPYear2, varSTIPYear3, and varSTIPYear4. The prompt uses SQL to generate the 3 PVs:

    The column headings simply list these 4 variable values:

    While I do show default values in this example, they do respond to changes in the value of the repository variable STIPYear1. I think you could do something similar with SQL that manipulates CURRENT_DATE.

  • Rank 5 - Community Champion

    Hi Jerry,

    Thanks I will try to implement same in our scenario.

    Regards,

    Indra Sardana

  • You might be able to use a variables (session / repository) in the header. I have used presentation variables from Prompts as dynamic column headers

  • Rank 5 - Community Champion

    Thanks Wayne.....Will try to create session/repository variable in our scenario

  • What Wayne said, use variables and headers can reference them.

    I wouldn't use session variables because they are defined for every single user, while in your case your dates are the same values for everybody.

  • Rank 4 - Community Specialist

    Hi Indra,

    Based on the user selected period/date or current date, have a row-wise initialization in the RPD for no of dates that you want to calculate/initialize using the initialization query based on the current date and use them in the column headers as below. You could use the server variable and fix that in the column header.

    Please see below how I've accomplished this in one of the project



    Regards

    Venkat

  • Rank 5 - Community Champion

    Hi All,

    Thanks for your input using repository variable we are able to achieve same .

    Regards,

    Indra Sardana

  • @Indra Sardana-Oracle You probably wrongly clicked on the "best answer", because your reply to Wayne saying you will give it a try isn't the best answer. And you confirmed at the end that Wayne suggestion is what let you solve your requirement.

    Please mark Wayne's answer as "best answer" to correctly help other users having a similar question and looking for answers.

Welcome!

It looks like you're new here. Sign in or register to get started.