Query on PlaceHolder column

Hi everyone,
I am pretty new to oracle reports, if you think this question is too basic, please bear with me.I also tried searching the forum and looked into documentation. Why should we use a formula column to assign value to a placeholder column, why cant it be done directly in the plsql formula portion. Why does it not accept any return values in the plsql formula portion of the placeholder column, when i add the code, it acpets and gets compiled, but does not get reflected during runtime. Can someone help me ab this.
Thanks
Sandeep

Formula and Placeholder columns work together to give a calculated or processed value. The formula column calculates or processes the data and then assigns the result to the placeholder column. Bit like in PL/SQL when you have a variable (placeholder col) being set by a function (Formula col).
HTH!!

Similar Messages

  • How to order / group a report by a placeholder column ?

    How to order / group a report by a placeholder column populated by the group filter ?
    In more detail .....
    My Data model editor's select statement brings back (say 1000 rows) from the database.
    The group filter decides (on performing certain validations) whether to print a row or not in the report.
    Additionally the group filter calculates a "rule type" (just a rule number to say on basis of what rule, the row was selected)
    I would like to order/group the report on the placeholder column which was calculated by the group filter ?
    Obviously, I won't be able to add the "ORDER BY :CP_RULE_NUMBER" in the sql statement as the placeholer column cp_rule_number
    is determined by the group filter level only. (If I do, I get a frequency error)
    Any ideas ?
    Thanks in advance.
    Edited by: user553361 on 8/10/2008 17:35

    how is the group filter implemented?
    If its pure PL/SQL, what about putting the filter-procedure in a stored function into the database? Then you could use the group filter in your query.

  • Placeholder column

    Friends !
    Can anyone tell me the purpose and the difference with others of the following of Report Builder,
    PLACEHOLDER COLUMN
    REF CURSOR QUERY
    EXTERNAL SQL QUERY
    EXPRESS QUERY
    Actually I want to use these controls but i did not know better about them, as there might be a
    situation where i should use these controls instead of FORMULA COLUMN etc.
    Anyone's help or better to have examplary code will add a great help.
    Many Thanks !
    [email protected]
    null

    If you have a formula column that returns multiple values, e.g. from a select, you would assign them to placeholder columns instead of writing a stand-alone-formula for each value.

  • Placeholder column value

    Hi,
    I'm working on a multilingual report (Dutch, French and English) and I want to have the labels on the report in the correct language based on user selection.
    I already know I can achieve this with placeholder columns.
    I also know I can set the values for these columns in the beforereport trigger by reading the correct value for each placeholder column from a table.
    This works but I have to make a call for every other placeholder column. If I have a report with 30 or more labels this requires 30 calls or more.
    If possible I want to retrieve the values and the columns where the values have put into from a table by using a ref cursor or another cursor in the before reports trigger.
    There is no problem wrting the code to get the values but there is one to put the values in the columns.
    I want to reference the placeholder columns as variables in my code.
    e.g.
    select report_col, ml_col from report_labels;
    wher ml_col is the value and report_col the bname of the palceholder.
    thereafter I want to do the assignment as
    :CF_ || treport_col = ml_col;
    The closest I can get is by using srw_set_field but this works only if the code is put on a trigger on the column itself.
    Is there a way to get to the desired result?

    ANother way of doing this would be to make a seperate query for the label table which just returns a single row with all label values. Now in Reports layout, insert a top most repeating frame which moves on this label query and set all your label using &column_name.
    thanks
    rohit

  • Placeholder column's "initial value"

    Hello,
    I have a report with 2 queries, the master query contains some placeholder columns, and the detail query contains a formula column that sets values for these placeholders:
    - MASTERQUERY: database columns, PlaceHolder1, PlaceHolder2, PlaceHolder3
    |
    |
    -- DETAILQUERY (linked to MASTERQUERY): database columns, CF_PlaceHolder_Changer (change values of PlaceHolderX)
    The problem is: for a particular record of MASTERQUERY, if the DETAILQUERY doesn't have any row then PlaceHolders are not set.
    (They will keep the values from previous MASTER record). Is there any way that I can specify "initial value" for placeholder columns?
    And another question: what is the formula attached to the placeholder used for?
    Please help!

    You could have a "count" column in the master group that determines how many rows are in the detail group. Then alter the value of the field displaying the placeholder value by adding a format trigger with srw.set_field_char/date/number(0, <initial value>); when the count is '0'.

  • Query on database column not working

    Hi
    i have a block which has around 40 columns.the block is based on a table which has more than 20000 records.When i try 2 make query on a Database column in Enter-Query mode its not working.It fetching all the records instead of the respective records
    THe block property is said to yes
    i have even set the query allowed,only propery of the column to YEs
    Can any one help me out of this??? do i need to set any other property???

    Thanks a lot for james and THomas and to all. The error is that i have missed the bracket for OR in my where condition ...Now im able to query all the columns.
    Thanks very much...
    I have one more doubt .i have a requirement in which when the user goes to the child block and makes a query is it possible to bring the associates parent records..wht code or trigger we need to rite ?
    normally we do for parent block when we query we populate the child. is this can be done?

  • Need urgent help how show my placeholder column in my report

    hi master
    sir
    i use report 6i
    i am making report with useing emp table i report i need one formula column and one placeholder column i
    first i mad report by useing report wizard
    after this i go in data modul and select one placeholder column and one formula column i write pl/sql
    :cp_1 := :sal;
    again run wizard and move
    placeholder column and one formula column
    in display item
    but when i run the report give me this error
    rep-1517 column 'cf_1' reffrence column 'sal' which is incompatible frequency
    please give me idea how i print my formula result in report
    thanking you
    aamir
    how show placeholder column in my report

    Hi,
    First create a formula column eg CF_1.
    Then create a placeholder column eg CP_1.
    Write a code in CF_1.
    [eg
    select bolFrValid into :CP_1 from tablename where condition;
    return :CP_1;
    Hope u got it

  • Result of an SQL query as a Column name of another query

    Hi Friends,
    Can we use a result of a SQL Query as a column name of another table to retrieve data. If so please help me.
    For eg :
    I have a table where is store numbers;
    select col1 from table1 where col1='5';
    and i have another table where .. this value of col is a column name..
    select ( select col1 from table1 where col1='5') from table2;
    Thanks in advance.

    Hi,
    ORAFLEX wrote:
    Hi Friends,
    Can we use a result of a SQL Query as a column name of another table to retrieve data. If so please help me.
    For eg :
    I have a table where is store numbers;
    select col1 from table1 where col1='5';
    and i have another table where .. this value of col is a column name..
    select ( select col1 from table1 where col1='5') from table2;
    Thanks in advance.Do you really mean that?
    select col1 from table1 where col1='5';That query will always return either '5' or nothing. Whatever you're trying to accomplish with that, you can do with an EXISTS query.
    Perhaps you meant to reference two different columns in that query:
    select col1 from table1 where col2='5';In that case, sorry, no, you can't do that without resorting to dynamic SQL.
    If the same column is used throughout the query (but could change every time you run the query), then the dynamic SQL might be pretty easy. In SQL*Plus, for example, you could use substitution variables, defined in another query at run-time.
    If there are only a few possible values that the sub-query could possibly return, and you know what they all are, then you can fake a dynamic query like this:
    SELECT     CASE     ( SELECT  col1
                FROM       table1
                WHERE       col2     = '5'
              WHEN  'BONUS'     THEN  bonus
              WHEN  'COMM'     THEN  comm
              WHEN  'SAL'     THEN  sal
         END     AS col1
    FROM     table2
    ;Sorry to give such a vague answer, but it's the best I can do with the information I have.
    It would help if you posted a little sample data (CREATE TABLE and INSERT statments for both tables), and the results you want to get from that data. If you want to pass a parameter to the query, give the results you want for a couple of different parameters.

  • Creating Query with dynamic columns to show results

    Hi experts,
    I need to know how to create a query with dynamic columns. Meaning, I don't want to create a query with fixed columns representing the 12 periods of the fiscal year to show me actuals as the fiscal year proceeds.
    For example, if I am currently in the middle of period 3 (March) of a fiscal year, when I execute the query, I need it to automatically only show me the 'Actuals' for periods 1 and 2, without seeing the columns from periods 3 to 12 showing blank.
    Then when I am in the middle period 5 (May) the query should ONLY show me the columns for periods 1 to 4 'Actuals', no results should be shown for periods 5 to 12 yet, and I don't want to even see blank columns for period 6 to 12.
    How do I define my columns, to achieve this.
    Maximum points will be awarded.
    Thanks Everyone.

    Hi Josh,
    I'm having a little difficuluty understanding what should be included in my restricted key figures.
    The time characteristics that I have available to use are:
    0FISCPER3 (posting period)
    0FISCYEAR (fiscal year), currently using SAP EXIT to default current fiscal year.
    0FISCVARNT (fiscal year variant).
    In addition, I have the following characteristics available to be used in the columns:
    Value type (10)
    version (currently I'm using variable for it)
    Currency type (020)
    Currency (USD).
    Can you explain what my restricted key figure should be based on and how it should look.
    I tried to create a restircted key figure using 0AMOUNT, and 0FISCPER3. For 0FISCPER3  I created a range from 1 to previous period (using SAP EXIT that supplied previous period).I also had value type, version, currency type, and currency included in that restricted key figure.Then when I tried to drag 0FISCPER3 under the restricted key figure once again, it wouldn't let me, probably because I've already used 0FISCPER3 in the restricted key figure.
    Please let me know if my explanation is not clear.
    Your step by step help would be great.
    Thanks
    Edited by: Ehab Mansour on Sep 23, 2008 2:40 PM

  • How do I assign the value of a Boilerplate Text Object to a Placeholder Column?

    I have a Boiler plate File Link. This references a .txt file. I want to generate XML tags for it.
    Is it possible to read the content of the file link object into a Placeholder column so that I can get a tag generated for that?

    Hi Frank,
    The key is already passed from a previous page. To set the scene a little, I have three pages:
    1. Project list, has a table listing all projects.
    2. Drill down to tasks for a project, passing the project key as a page property. This is a master/detail page. This currently works well.
    3. Create a new task for the project from page 2. I want to pass the project key obtained from page 1 to page 3 via page 2, so that the user does not have to re-select a project when creating a task.
    Here is my registrydef from page 2 (the tasks for a project):
    <bc4j:rootAppModuleDef name="ProjectModule"
    defFullName="ProjectPackage.ProjectModule"
    configName="ProjectModuleLocal"
    releaseMode="stateful">
    <bc4j:viewObjectDef name="ProjectsVO1">
    <bc4j:rowDef name="ProjectRow" autoCreate="false" usesCurrency="true">
    <bc4j:propertyKey name="key"/>
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    <bc4j:viewObjectDef name="TasksVO2" rangeSize="20"/>
    </bc4j:rootAppModuleDef>
    This works well, I can display the selected project and then list the tasks in a table.
    My problem is that in page 2 the project record is not in a table, so I cannot use a table selection mechanism to set the key value in the event which calls page 3 (see my earlier post for this code). As the key that I need is sittng there in the URL as a page property, I want to pass that instead. How to I reference it from within an event?
    Does this make sense or is there a better way of doing it? Do I actually need a new page to create a new task - I don't think I can add new records in a table!
    Thanks for the tip on ctrl: , I'm slowly getting the hang of the namespace thing.
    Steve

  • About Query Data Source Columns property

    Hello everyone,
    I'm new to Oracle Forms version 10.1.0.2.
    When I create a data block based on a table using Data Block Wizard, the block's Query Data Source Columns property is automatically populated with column definition entries corresponding to the columns of the base table.
    I tried making changes to these entries, for example by changing the data types to wrong data types or even deleting them, and I found that those changes had no effect on the block at all. The form was still working as I wanted.
    Please explain what is exactly the role of the block's Query Data Source Columns property.
    Thank you very much.
    p.s: The F1 key help says "The Query Data Source Columns property is valid only when the Query Data Source Type property is set to Table, Sub-query, or Procedure". So, please explain in each context of Query Data Source Type.

    p.s: The F1 key help says "The Query Data Source Columns property is valid only when the Query Data Source Type property is set to Table, Sub-query, or Procedure". So, please explain in each context of Query Data Source Type.
    IMHO those properties are very self-explaining: It is the data source of the block, or in other terms: how it is populated.
    Table means the data block is based on a table and subsequently will be populated by
    select col1, col2, col3 from your_table
    With sub-query the block will be populated with your subquery; forms will issue
    select col1, col2, col3 from (
      -- this is your subquery
      select col1, col2, col3 from tab1, tab2 where [....]
    With Procedure in short you'd have a stored procedure which returns a ref cursor and the block will be populated by the ref cursor.
    As for your question about the name: this actually should matter; the default is NULL which means that there needs to be a column which has the exact name as the item so in the above sample with table the item associated with your_table.col1 should be named col1. If it isn't the property should be named like the column. If this property also doesn't reflect the name this shouldn't work IMO.
    cheers

  • ADF BC : "Attributes selected in query with no column type found! ..."

    hi
    Using JDeveloper 10.1.3.3.0, I have this "Selected in Query" attribute, "Never" updatable, in my Entity Object.
    The Entity Object is based on the SCOTT.EMP table and the attribute, called "BonusInfo", is defined using the expression " '[bonus info ' || (SAL * 2) || ']' ".
    see http://verveja.footsteps.be/~verveja/files/oracle/NoColumnTypeFoundApp-v0.01.zip
    While creating this Entity Object, I got a "Business Components" dialog that says:
    "Column type is not specified for this attribute. Specifying column-type and precision results in better query performance at runtime. Do you wish to set column type to VARCHAR2(255)?"
    I clicked "Yes".
    I also created two View Objects based on this Entity Object.
    In the "Create View Object" wizard "Step 4 of 7: Attribute Settings" I got a "Business Components" diaglog that says:
    "Attributes selected in query with no column type found! Specifying column-type and precision results in better query performance at runtime. Do you wish to set default column type for these attributes?"
    I clicked "Yes".
    Testing the query in "Step 5 of 7: SQL Statement" showed "Query is valid.".
    question:
    Why do I keep getting the message ...
    "Attributes selected in query with no column type found! Specifying column-type and precision results in better query performance at runtime. Do you wish to set default column type for these attributes?"
    ... in the View Object Editor if I click on different attributes?
    (I don't get such a message the first time I click on an attribute after opening the View Object Editor, but after that it keeps popping up each time I click on a different attribute, no matter what I answer "Yes", "No" or "Cancel".)
    many thanks
    Jan Vervecken

    Jan,
    BC needs the column type and precision so that we can allocate the correct JDBC buffer size; otherwise we would just allocate 2k per string.
    Blaise

  • Attributes selected in query with no column type found! (solved)

    Dear JHeadstart Team,
    In the view object Editor I have two entity based attributes attrib1 and attrib2
    both with type Number. Both have aliases with type number(9,0)
    If attrib1 is null I want to have the value of attrib2.
    In the expression box I put: nvl(attrib1,attrib2)
    When I press the ok button I get the next error message.
    "Attributes selected in query with no column type found!
    Specifying column-type and precision results in better query performance at runtime.
    Do you wish to set default column type for these attributes? "
    When I say ok I get the next message:
    "An error occurred. Unable to apply all the wizard changes.
    Column type cannot be changed for Entity based attribute.
    Exception: oracle.jbo.dt.objects.JboExeption."
    The details button serves no extra information.
    Since both the attributes have the same type I thought the nvl commando should work.
    But what does the "no column type found" sentence mean?
    regards,
    Marcel.
    Message was edited by:
    user571204

    Thanks Jan,
    You've put me on the right track.
    I found out that this is only possible in the entity object class.
    So I have to check my limited java skills.

  • How to use formula column,placeholder column in data template option

    Hi All,
    Can you some idea on these concept with example.
    Thanks in adv

    >
    formula column,placeholder column
    >
    it's oracle reports terms?
    http://oraclebizint.wordpress.com/2007/08/22/oracle-reports-to-bi-publisher-conversion-utility/
    http://eoracleapps.blogspot.ru/2009/04/how-to-convert-oracle-reports-in-bi.html
    so convert your oracle reports to bi publisher and you'll see mapping for your case

  • Performance of update query for single column vs multiple column

    Hi All,
    I could not find any answer for this, does it ever matter in terms of performance updating single column versus multiple column in a single update query.
    For eg. table consisting of 15 columns, what would be the difference in performance when one column is update in the single query against another update query where 15 columns are updated.
    Please do keep in mind my table columns in actually could be around 150+.
    Thanks for any information provided.

    If updated columns aren´t on where clause , then the only impact of 15 columns will be a increase on redo generation, and a possible chainning row.
    So since the redo is one of the things that have a large impact, the answer is yes.
    The performance will be slower.
    Regards
    Helio Dias.
    http://heliodias.com
    OCE SQL, OCP 9i

Maybe you are looking for