IR Report Computation Expression Column Name

I am trying to generate a custom Report based on the Existing IR Report Conditions.
One of My IR Report have a Computation column with Expression as To_Char(trunc(Y, 'YEAR'), 'YYYY') Where Y is the Column Identifier.
My requirement is to substitute the Column Identifiers with the Exact column Name.
For Ex: TO_CHAR(trunc(Report_Date, 'YEAR'), 'YYYY') where Report_Date is the Actual Column to be used. Apex substitutes the Identifier as Y.
Another Example is CASE WHEN A = 10 THEN B + C ELSE B END
Where A,B and C should be Substituted by their respective column Names.
Is there a way to trace the column name used in the Expression or Frame the Expression with the Column Name.
Hope i am clear in my Requirement.
Thanks
Sridhar

Parse the statement character by character, and if the character is not surrounded by others except for a set of tokens (eg "'(),; ) then you have found an identifier. You can then map it to the correct column name by querying apex_application_ir_rpt and retrieving the report columns, mapping them to an identifier, and retrieving computation specifics from apex_application_ir_comp.
But really, don't do this. (DON'T) It's a load of code and prone to errors. There is no simple way to parse these. It's a fun exercise, that's all.
Rather tell us about what you're really trying to achieve. Why do you need a custom report when you already have the IR with the filters and computations on it?

Similar Messages

  • Crystal Reports XI: Invalid column name error

    Hello!
    I have a crystal report using a SQL command that is getting the following error (occasionally):
    Failed to retrieve data from the database.
    Details: ADO Error Code: 0x80040e14
    Source: Microsoft OLE DB Provider for SQL Server
    Description: Invalid column name 'IPCSKUGroup'.
    SQL State: 42S22
    Native Error: 207 [Database Vendor Code: 207]
    I say occasionally because if i go to Database>> Log on or Log off server and log off the target server and then rerun the report, it will work.  If i refresh the report with different parameters, i get the error.
    I'm running Crystal Reports XI version 11.0.0.1282 on Windows XP SP2 32-bit.  The data is in a SQL Server 2000 database.
    This is the portion of the query causing the problem:
    (drop/clear temp tables and initiallize a few variables with parameters)
    (...other queries putting together the temp table #WorkingTotals) - This part works fine because the report runs if i remove the following portion.
    select wtt.QtrMax,QuarterName,Year,wtt.IPCSKUGroup as IPCSKUNum,ServicePriceSuggested,PcsBilled,BilledRevenue,PriceIndex,StdRevenue,
    (select sum(TT.BilledRevenue) from
    (select Top 4 wt2.BilledRevenue
    from #WorkingTotals2 wt2
    where wt2.IPCSKUGroup = wtt.IPCSKUGroup and wt2.QtrMax <= wtt.QtrMax order by wt2.QtrMax desc)as TT)
    as M12Revenue
    from #WorkingTotals wtt
    The entire query works fine when I run it in SQL Query Analyzer.  But Crystal has an issue with the way i'm figuring the M12Revenue field.  The M12Revenue is a moving 12 month revenue which is the sum of the revenue for the past 4 quarters for each quarter.
    This is what i've tried thus far:
    Putting the entire query into a stored procedure
    Storing what gets stored in #WorkingTotals into a database table rather than a temp one
    Renaming columns to various different things.
    Each of those still resulted in the error.
    Thanks for the help!!!
    Wes

    Hi Wes,
    What does SQL Profiler show you when the error happens?
    Try using ODBC to see if it also errors, may be an issue in MS's MDAC and the OLE DB driver. MS usually updates MDAC with all Patches but you may want to verify you are using the latest version.
    Thank you
    Don

  • Problem with column name width

    Hello!
    I have a report and the column names are too big. Is there a possible way to make them appear in two lines so the column width would be smaller?
    Thanx in advance for any answers...

    Hello,
    I can't reproduce that problem. Probably dependent of the Template you're using. You can try setting the height of the class (I can't tell you which one - unless you set up an example on apex.oracle.com) to a larger value.
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Dynamic Column Name on Interactive Report

    Hi all,
    Is it possible to assign a SQL result to a Column name on an interactive report?
    I have been able to do this on a standard SQL Report though the use of page items but have not had much luck with interactive reports.
    Any help is appeciated.
    Thanks,
    Dan

    could you please explain step 4 a bit more?
    as with the standard report, i just created an item with SQL query with a corresponding computation with same SQL query and that works great.
    i tried the same method with interactive and it did not work.
    in step 4 it mentions creating a process to populate the items.
    how is this done?
    Thanks,
    Dan

  • Column name change in Interactive Reports

    Hi,
    I am new to Interactive reporting. We have a report that is resulted from Essbase query. Now in the report, we want to change the column names which are basically the essbase dimension member name. Is it possible to chang ethe names per our requiremnet?
    Please help.

    Hi again,
    I think that you may have posted your question in the wrong forum. This one is for Oracle Application Express and maybe that is the reason why you didn't understand my response. If your issue involves Hyperion Interactive Reporting Studio or Hyperion reporting in general then you should ask in this forum instead:
    Hyperion Query and Reporting
    Covers Hyperion Interactive Reporting, Hyperion Financial Reporting, Hyperion SQR Production Reporting, Hyperion Web Analysis, and respective administration/development topics
    Sergio

  • Difficult to achive the report layout with dynamic column names

    I have a report layout as below.
    So here the column names are dynamic.And each fixed row group has different calculations. I have a date parameter. If I select July 2013, then I need to show data from July 2012 to July 2013 with Columns(Jul-12, Aug-12...Jul-13). How to achive below layout
    with dynamic columns?

    Hi Sarayu_CM,
    According to your description, you want to filter the records of prior year based on only one parameter selection. Right?
    In this scenario, we can create two parameters. The first one is for user to select. The second parameter is based on the first parameter selection. We don't need to specify Available Values for the second parameter, but we should use expression to specify
    Default Values based on the first parameter selection. Use the expression below:
    =DateAdd("m",-12,FormatDateTime(Parameters!param1.Value))
    Then we just need to apply a filter on the matrix/dataset to get the records which the date is between values in these two parameters.
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Using values returned from SQL for Report column names

    I am building reports against our TFS development db.
    One of the reports tracks days spent (Dwell Time) in various status categories (eg: New, Assigned, In Development, Hold, etc) for a given "ticket".
    For a fixed list of values from {Work Item].System_State, I can send the results (days in Assigned) to the column named (Assigned) for each status for each event in the [Work Item History], and then sum them for each ticket as:
    Ticket ID      New          Assigned       InDev       etc
    1230001        2                  0                 0          ...
    1230001        0                  1                 2          ....      
    SUM            2                    1                2         ....            
    However, I have many different Projects, each of which use their own Status names.
    I don't want to duplicate the same basic report, if I can avoid it.
    How can I name and generate this data for the unique Status list for each Project?
    Simplest analog is:  name = First(Fields!Status.Value, "TFSdb")
    and allows value for a column name (category) as: =IIF(Fields!Status.Value = First(Fields!Status.Value, "TFSdb"), Fields!Days.Value, 0)
    However this fails beause:
    1. It only delivers the FIRST status value, and,
    2. I cannot SUM an expression which is itself an aggregate (using First).

    RRapport,
    Is this still an issue?
    Thanks!
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • How to rename C00n generic column names in a Dynamic SQL report

    I have a an interface whereby the user can select 1 to 60 (upper limit) columns out of 90 possible columns (using a shuttle) from one table before running a report.
    To construct the SQL that will eventually execute, I'm using a "PLSQL function body returning SQL query" with dynamic SQL. The only problem is that I have to use "Generic Column Names" option to be able to compile the code and end up with c001 to c060 as the column names.
    How can I use the names of the selected columns as the report headings rather than c001, C002... etc?
    I do not know beforehand which columns, or how many columns or the order of the selected columns.
    I know Denes K has a demo called Pick Columns but I can't access his code. I have a hunch though that he may be just using conditions to hide/show the apropriate columns.
    thanks in advance
    PaulP

    Hi Paul
    I would change the Heading Type in the Report Details screen to PLSQL and use the shuttle item to return the column values. e.g.
    RETURN :p1_shuttle;
    I'm assuming the shuttle already has a colon separated list of the column headings in the correct order?
    I hope that helps
    Shunt

  • Column name in link on sql report?

    Hey guys -
    Is there some way to put the column name of a report in a link?
    When you define a link on a column you have the ability to use a substition string for the VALUE of a particular column... but I want to somehow pass the string value of the column.... anyone know how to do this?
    Thanks

    Not the value of the column.. I want the actual column name...
    i.e.
    Items on page to set:
    txtbox1
    txtbox2
    Query:
    Channel          INS1     INS2     INS3     INS4
    Retail          13     1     333     55
    Wholesale     4234     23     1     44Okay, so I want to make a link on the values in the query (the #'s) to set the values of the txtboxes...
    example would be if I click on 333 I want it to set txtbox1="Retail" and txtbox2="INS3"
    The channel one is fine I just use the substition string of #COL1# in the link and it replaces the value... but nothing that I can find on how ot set txtbox2="INS3"
    Edited by: nferreri on May 15, 2009 9:51 AM

  • How to suppress column names in SQL-report

    What I want is just the data, without any column names.
    COLUMN LDATE OFF;
    SELECT     SYSDATE LDATE
    FROM DUAL;
    LDATE
    07.11.11
    This example doesn't work. There is still LDATE above column. Any idea?

    user5116754 wrote:
    Great, it's so simple. Im sure there is a way to omit this result statement: "531 rows selected" at the end of report!There is, and it's also in the documentation...
    SQL> set feedback off
    SQL> select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE                    SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-1980 00:00:00        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-1981 00:00:00       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-1981 00:00:00       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-1981 00:00:00       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-1981 00:00:00       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-1981 00:00:00       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-1981 00:00:00       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-1987 00:00:00       3000                    20
          7839 KING       PRESIDENT            17-NOV-1981 00:00:00       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-1981 00:00:00       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-1987 00:00:00       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-1981 00:00:00        950                    30
          7902 FORD       ANALYST         7566 03-DEC-1981 00:00:00       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-1982 00:00:00       1300                    10
    SQL>

  • How to get table and column names thats being used in SQL , that's generating all my reports on SSRS.

    Good day,
    I searched through the forum and cant find anything.
    I have around 300 published reports on SSRS and we are busy migrating to a new system.
    They have already setup their tables on the new system and I need to provide them with a list of table names and column names that are being used currently to generate the 300 reports on SSRS.
    We use various tables and databases to generate these reports, and will take me forever to go through each query to get this info.
    Is it at all possible to write a query in SQL 2008 that will give me all the table names and columns being used?
    Your assistance is greatly appreciated.
    I thank you.
    Andre.

    There's no straightforward method for that I guess. There are couple of things you can use to get these details
    1. query the ReportServer.dbo.Catalog table
    for getting details
    you may use script below for that
    http://gallery.technet.microsoft.com/scriptcenter/42440a6b-c5b1-4acc-9632-d608d1c40a5c
    2. Another method is to run the reports and run sql profiler trace on background to retrieve queries used.
    But in some of these cases the report might be using a procedure and you will get only procedure. Then its upto you to get the other details from procedure like tables used, columns etc
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Automatic Report Bursting based on column names given by user as parameter.

    Hi,
    Could some help me achieve the following functionality. The requirement are:
    1. create a report that has parameters that are column names (display values e.g: department, location, employee job code)
    2. the end user will select one or more columns from the multi-select parameter
    3. we want that there should be a button on clicking that the user should get automatic file bursting. He should not be required to go to schedules tab and create a new job for that.
    4. the report should burst to a file location depending on the columns selected by the user, e.g. if user selected department and location then we should have files saved in the set file location as sales-india.pdf, sales-us.pdf, hr-india.pdf, hr-us.pdf and so on.
    I am new to BI Publisher.
    Could you help me in creating such a parameter, what should be report sql for capturing the data from parameter and then doing report bursting automatically based on two or more parameter values given by the user.
    There is no need to show the report to the user in BI Publisher as there are thousands of rows in a table. Three tables join to give the employee data.
    -Priyanka

    Thanks for a quick response but I am still not clear on
    1. how to do this using custom java code
    and
    2. actually user would login to interactive dashboard and there he will give these parameters using which we need to automatically burst a BI publisher report. Can this be done some how?
    -Priyanka

  • Pass column-name as a parameter to reports

    Hello,
    the code below calls a report. But now I want to sort the rows in the report. For example I have a text-item in my form-modul. If I type a column-name and press the button then the rows should be sorted in the report. Is it possible tp pass column-names as parameter to reports?
    DECLARE
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(20);
    BEGIN
    repid := find_report_object('STATIONSTOPOLOGIE');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,RUNTIME);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'html');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_oracle-dev');
    -- SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no pdeptno='||:dept.deptno);
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    WEB.SHOW_DOCUMENT('http://oracle-dev:8888/reports/rwservlet/getjobid'||
    substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=rep_oracle-dev','_blank');
    ELSE
    message('Error when running report');
    END IF;
    END;

    Hi,
    the work has been done in reports. You can use a lexical parameter in reports to add a condition for sorting to the query like:
    select .. from .. where ... &p_order.
    Then add another parameter to the report (for example p_param). Fill p_param via your interface in forms (SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER, ....) with the column name. Then build a report trigger like:
    if :p_param is null
    then
    :p_order:= null;
    else
    :p_order:= 'order by '||:p_param;
    end if;
    But have a look, that p_param can only get correct values.
    Rainer

  • How to refer a column name in form report

    Hi,
    How can i refer a column name in the form report. My issue is that " I have a form report in that i have column name when i use to click the column name it should bring me to next page with the corresponding values of the column."
    Here i have achieved that when i click on column name(in Page1) it brings me to next page(Page2). but in the next page(P2) i want to display(only display) the corresponding values of the selected column(Page1) but the values should not be editable and should not be in text field it should be in display only field.
    So how can i write a sql query in display only souce field. Ie, how can i refer the column name in(page1) form report.

    Hi Karthik
    Very good morning.
    I think u have column link in the first page and when u select a data in the first page and when u r moving to the next page the the corresponding data need to there is it correct.
    For example You have table Employee and u have a select list in the first page contains name of the employee when u select one name and corresponding datas of the employee need to be in the second page.
    So Dont clear the cache of the first page.
    I the next page make the page items as display only and give the source of the all items a returning the single sql query.
    If u have four items in the next page namely p2_sal, P2emp_no etc..
    Then use like this
    select sal from emp where emp_name=:P1_EMPNAME
    Hopes this might helps you.
    Thanks & Regards
    Srikkanth.M

  • Crystal Report - NULL values mapped to Column names in reports

    Hai,
    I am using rows of data retrived from the SQL Server 2005 Express and sometimes the column names are NULL , I want to set a default value to this NULL value and set it as Data axes label / Group axes values, can some one please help me with this issue.
    Thank you in advance.
    Vijay

    I resolved this issue myself, this can be set as other Data Labels, Group Label or Series Riser's properties too, left-click twice until the blank item is selected and then right click and select "Edit Axis Label" item and here it can edited with the new value(text).

Maybe you are looking for

  • How do I change icloud account in my iPhone?

    How do I change icloud account in my iPhone?

  • Labview to MS ACCESS

    Hi, How do I allow labview to send some text data to Microsoft Access?(just like sending data to MS EXCEL OR a TEXT File) I do not have the SQL toolkit. Is it possible to send the data from LabView to MS Access without having to get a SQL toolkit? I

  • SAP 2007B: PIS / COFINS Variables aren`t implemented as PLD Variables at SO

    Hello, At SAP 2007B, the PIS and COFINS Variables are not implemented as PLD Variables at Sales Orders. I needed to print these values and created a message at SAP Portal (#1052007), where they told me to post this suggestion here in this forum. Is i

  • Texture Difficulties: Maps as solid color

    Greetings, I've recently begun developing java3d applications, and have run into a snag with my latest endeavour. I am attempting to texturemap a cylinder, and have thus far been outwitted. The texture is pulled down from the URL and laid upon the cy

  • R12 installation services information

    Hi All in R12 on windows machine the services has been reduce and some new services has been added , any information about what are the purpose of this serives 1) Oracle Process Manager for PROD_oratest Automatic 2) OracleJobSchedulerPROD Disabled 3)