Dynamic headers in OAC classics report
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.
Answers
-
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
0 -
Hi Siddharth,
Its related to Header not data in header and cast not work for us.
0 -
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.
0 -
Hi Jerry,
Thanks I will try to implement same in our scenario.
Regards,
Indra Sardana
0 -
You might be able to use a variables (session / repository) in the header. I have used presentation variables from Prompts as dynamic column headers
0 -
Thanks Wayne.....Will try to create session/repository variable in our scenario
0 -
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.
0 -
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
0 -
Hi All,
Thanks for your input using repository variable we are able to achieve same .
Regards,
Indra Sardana
0 -
@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.
0 -
Hi Indra,
For some reason if you are unable to use repository variables. You can consider below solution as well.
- Create a union report in OAC Classic
- First union report you can setup the dynamic values what you are expecting for Headers.
- Second union block can be actual data to be shown in the report
- Disable Table heading, setup a sort column to get the header as first row of the table
Examples as below
0 -
Thanks for correcting me, I have changed now.
0 -
Thanks Bharath, but as explained due to mismatch of data type number and varchar for header we can't use union of reports and we used session/repository variable.
Regards
Indra Sardana
0