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

Similar Messages

  • 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

  • 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 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!!

  • Help with Formula/Placeholder columns for group totals

    I have select that is broken into 2 groups (a COMPANY group and a DETAIL group within company). I need to determine the COMPANY group totals based on values in a column in the DETAIL group. I.E. the column is a transaction description and can have up to 15 different values and it did not appear that a summary column would work for what I need. I have currently set up 15 formula columns in the DETAIL group and check the value of the REASON to accumulate totals and return the total to a PLACEHOLDER column (which is numeric and defined in the COMPANY group).
    I then report the Placeholder columns at break of COMPANY. This all works fine if I run only one company. If I run with multiple companies the Placeholder columns are used as a running total.
    My question is how do I reset the PLACEHOLDER columns at company break if at all, or is there a simpler way to accomplish what I need.
    Any and all assistance would be greatly appreciated.
    Tom Vereecke

    If you are using one placeholder column in different formula columns just ignore the following solution. It will not work in that case. I will post it here if i find out any way to initialize placeholder columns at different groups or anyother way to solve this issue.
    I think if you remove placeholder columns and create summary columns at Company Level, that will work. And formula columns will be changed as follows:
    Formula Column:
    active_total number(10) := 0;
    begin
    if :status_1 = 'ACTIVE' then
    active_total := active_total + 1;
    end if;
    if :status_2 = 'ACTIVE' then
    active_total := active_total + 1;
    end if;
    if :status_3 = 'ACTIVE' then
    active_total := active_total + 1;
    end if;
    return active_total;
    end;
    And in summary columns source will be formula columns. And reset the summary columns at Company.
    Hope this helps.
    Message was edited by:
    fs

  • 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.

  • Scope of a placeholder column in Oracle Reports 6i

    Hello,
    I was under the impression that a placeholder was more like a global variable, i.e., it's accessible throughout the report if defined independently, outside of any group in the layout model?
    Well, I am getting this error:
    REP-1248 all source columns of placeholder must be in the same group.
    Is my understanding incorrect? I really need to have a "global" type variable that's accessible across all groups in the report. How shall I go about it? Please advise.
    Regards,
    Smita

    Thanks, but the link didn't help me. Basically, this is the situation:
    First, I have a placeholder column independent of any group in the report, which I am trying to access and use as a global variable across multiple groups in the report.
    There is a parent group with two child groups. The first child group has a summary columm. I assign the summary column's value to the placeholder column inside a formula column.
    In the second child group I decrement the placeholder column's value by one for every record processed in this group inside a formula column. When the placeholder column's value reaches 0, I am doing something in the format trigger on the frame associated with the second child group.
    ...and I get this error:
    REP-1248: All source columns of placeholder 'CP_NumLinesLeft' must be in the same group.
    So the placeholder column is really not behaving like a global variable. Please advise as to how I should get around this problem.

  • Diff. between Formula column and Placeholder column

    Can any one explain me the difference between a formula column and place holder column in Reports.

    Place holder columns are used to hold a value and they are populated by formula columns and in the following places.
    - the Before Report Trigger, if the placeholder is a report-level column
    - a report-level formula column, if the placeholder is a report-level column
    - a formula in the placeholder's group or a group below it
    (the value is set once for each record of the group)
    But Formula columns perform a user defined computation on one or more columns including placeholder columns. You can set the value of placeholder column in a formula column. But you cannot set the value of a formula coulmn in a placeholder column's PL/SQL.
    Regards,
    Siva B

  • Get column values from list of values programmatically

    hi all
    how i get column values from list of values programmatically in the
    returnPopupDataListener method

    If this answers your question , please close this thread by marking it as answered.
    Thanks

  • SSRS - Expression to color column value dynamically in Matrix

    Hi ,
    I have a matrix which looks like :
    The <<Expr>> value can be 1 /0 /"-" .
    The Expr value is being calculated dynamically.
    The data set query I am using has a column called due_days.
    In the color expression of the <<Exp>> box I am using the expression as :
    =IIf(Fields!Due_Days.Value>14  and Fields!Notes_Count.Value>0,"Blue",(Iif(Sum(Fields!Notes_Count.Value)=0 ,"Red","Black")))
    My requirement is if the Due_Days column value is >14 then I need to highlight the value as blue else black and if value is 0 then red. When I use the above query it is just highlighting the color blue for 1st column only. Eg: 4th row . Due days for month
    of Oct and Nov is > 14 but it shows blue only for month of oct.
    How can i resolve the issue?

    In select query i have 5 columns:
    Due days(Which is difference between 2 dates) ,
    Notes count (Which is just a count of notes  entered or not having value 0/1  and value '-' if another column CRD is greater than the matrix month and year.)Eg: below date 11/12/2014 is greater than Oct 2014 hence Oct 2014 should have "-"
    Month Name , Year , Month Nbr (last 6 months which I cross joined with the table to get counts for each month)
    The matrix has year and last 6 month  as column groups
    Color coding should be if notes count is 0 then red  ,if notes count is 1 and due_days> 14 then blue else black . When i try to use expression for color as i mentioned above, it colors only 1st colum.eg:  2nd row
    Nov 2014 is blue but for jan 2014 also it should show blue as due days>14 .
    Is there any way i can do that ??
    Eg: data set returns value as :
    Due Days        CRD                              Month         
    Month_Nbr    Year   Notes _Count
    5             2014-11-28 00:00:00.000    December          12         2014       
    0
    5               2014-11-28 00:00:00.000    February           2         2015        
    0
    5             2014-11-28 00:00:00.000    January              1           2015      
    0
    5            2014-11-28 00:00:00.000    November          11          2014       1
    5            2014-11-28 00:00:00.000    October              10          2014        0
    5            2014-11-28 00:00:00.000    September          9           2014         0
    Matrix is of the form :
                  YEAR
                  MONTH
    CRD        Notes_count

  • How To Concatenate Column Values from Multiple Rows into a Single Column?

    How do I create a SQL query that will concatenate column values from multiple rows into a single column?
    Last First Code
    Lesand Danny 1
    Lesand Danny 2
    Lesand Danny 3
    Benedi Eric 7
    Benedi Eric 14
    Result should look like:
    Last First Codes
    Lesand Danny 1,2,3
    Benedi Eric 7,14
    Thanks,
    David Johnson

    Starting with Oracle 9i
    select last, first, substr(max(sys_connect_by_path(code,',')),2) codes
    from
    (select last, first, code, row_number() over(partition by last, first order by code) rn
    from a)
    connect by last = prior last and first = prior first and prior rn = rn -1
    start with rn = 1
    group by last, first
    LAST       FIRST      CODES                                                                                                                                                                                                  
    Lesand         Danny          1,2,3
    Benedi         Eric           7,14Regards
    Dmytro

  • How to tell if column value has changed for use in workflow actions

    Hello,
    I am using Sharepoint 2010 and for one of my Lists, I am using a general list workflow.  What I need to be able to do is determine if a column value has change (say an "Assigned To" field) because I only want to take some action if that particular
    value has changed.  I want to be able to have a workflow action that would be something like:
    If Current Item: Assigned To not equals [OLD VALUE]
    I have found some web searches that talk about creating a duplicate list or duplicate (but hidden) column but that doesn't seem to be the way to go.  I have document versioning set but don't if that can be used to help with this.  One possible
    thought (although I haven't tried it to see if it works) is to create local variables and have the values in the variables be the "old value".  Just not sure if there is a best practices for doing this.
    Thanks for any thoughts - Peter

    Helen,
    Not sure I fully understand your goal.  We don't use "tasks" at all but if you are looking to have your workflow check certain valus and be able to send email messages to people based on whatever, then you can certainly do that (as long as your Sharepoint
    has the email setup.  We do this for alot of workflow tasks.
    So, in the workflow you can have a blanket statement like what I previously listed:
    if Current Item:hiddenStatus  not equals Current Item:Status
        .... do something
    or you can do something like:
    if Current Item:hiddenStatus equals "In-Progress"
        .... do something
    Else if Current Item:hiddenStatus  equals "Completed"
        .... do something
    or combine the two and do nested "if" statements.  Then you add an email statement wherever you need it like:
    if Current Item:hiddenStatus  equals "Completed"
       then email "these users"
    To add the email part, just type in "email" on the line where you want to add a statment.  There is only one option to choose from.  That will display the line "then email these users".   The "these users" will be a link.  When you
    click it you will get a popup to add the email info.  We typically will send the email to a user (or users) that are already listed in one of the PeoplePicker fields.  On the email form, you can type in your own text, designate that a value is based
    on a column value (like our PeoplePicker), designate that a value is based on a workflow variable, add a link to the current item, etc.  To get to these options you will click the button to the right of the fields or use the "Add or Change Lookup" button
    in the bottom-left for the text area.  There is alot you can set in the mail.
    Does this help answer your question?
    - Peter

  • How to insert column values into database as rows

    Hi,
    I have 8 columns and some not null columns. Based on not null columns I want to insert into table as rows. The 8 columns may contain values or no value. If the first column contains data, then I have to insert into one row. if the second column contains data I have to insert a row and in second column. respectively...So How can I insert column values into rows. Can I write 8 insert statements. (OR) is it possible to insert data from columns using where clause.
    Please help me out....
    Thanks in Advance

    Lines Table:
    line_id, orcl_bank_account_num, product_type, service_type, lease_type,
    funding_type, cpi, billing_frequency_unit_cd , annual_due_date ,
    pricing_start_date, pricing_end_date, install_date, contract_end_date ,
    prdct_replacement_cost_amt, cradle_replacement_amt, supranet_contract,
    issuance_fee, board_inactive_date, header_id, creation_date, last_modified_date,
    created_by_nam, modified_by_nam, activeinactive_flg, prdct_bill_amt_yr1,
    prdct_bill_amt_yr2, prdct_bill_amt_yr3, prdct_bill_amt_yr4, prdct_bill_amt_yr5,
    prdct_bill_amt_yr6, prdct_bill_amt_yr7, prdct_bill_amt_yr8, activation_fee_yr1,
    activation_fee_yr2, activation_fee_yr3, activation_fee_yr4, activation_fee_yr5,
    activation_fee_yr6, activation_fee_yr7, activation_fee_yr8,
    In this table the columns structure is :
    -- PRDCT_BILL_AMT_YR (1 to 8) NUMBER(14,4)
    -- ACTIVATION_FEE_YR (1 to 8) NUMBER(8,2)
    I have one more table:
    PRDCT_INS_AMT               NUMBER(14,4)
    ACTIVATION_FEE_AMT          NUMBER(14,4)
    I want to insert prdct_bill_amt_yr (1 to 8) columns data into PRDCT_INS_AMT column. similarly activation_fee (1 to 8) columns data.
    But the data should be inserted based product_type, service_type, lease_type columns values. (These 3 columns may contain upto 45 combinations).

  • How to avoid to check if a column value is NULL?

    Hi, I'm a newbee in Oracle.
    I have a procedure like this:
    create or replace
    PROCEDURE get_employee
         v_first_name IN VARCHAR2 DEFAULT NULL ,
         v_middle_name IN VARCHAR2 DEFAULT NULL ,
         v_last_name IN VARCHAR2 DEFAULT NULL ,
    To select rows with matching multiple column values, I can simply do this:
    SELECT *
    FROM employee
    WHERE first_name = v_first_name
    AND middle_name = v_middle_name
    AND last_name = v_last_name
    The problem is v_middle_name can be NULL. This means,
    I need check if v_middle_name is NULL, and if it is, I need use "IS NULL" instead, like this:
    SELECT *
    FROM employee
    WHERE first_name = v_first_name
    AND middle_name IS NULL
    AND last_name = v_last_name
    It seems very cumbersome to do a check for each column that can be null.
    Is there a way that I do not need to do a check for every column?
    or is it better to avoid having NULL values in those columns (and replace them with, say a space) ?
    Thanks in advance.
    Simon

    Normally, you would do something like
    SELECT *
      FROM employee
    WHERE first_name = NVL( v_first_name, first_name )
       AND middle_name = NVL(v_middle_name, middle_name )
       AND last_name = NVL(v_last_name, last_name )Of course, if you can ensure that NULL data is not allowed (without creating phony non-NULL data), that is a good thing. In most systems, for example, it is probably reasonable to require a non-NULL first and last name. But you almost certainly cannot require a middle name.
    Justin

  • Referencing Aggregated Column Value in Where Clause

    Hello -
    I'm trying to determine how I can accomplish the following in the most straightforward, efficient way.
    Among other things, I'm selecting the following value from my table:
    max(received_date) as last_received_dateI also need to evaluate the "last_received_date" value as a condition in my where clause. However, I can't reference my aliased "last_received_date" column value, and when I try to evaluate max(received_date) in the where clause, I get the "group function is not allowed here" error.
    Does anyone know of a good workaround?
    Thanks,
    Christine

    Hi,
    Column aliases can be used in the ORDER BY clause: aside from that, they cannot be used in the same query where they are defined. The workarounds are
    (a) define the alias in a sub-query, and use it in a super-query, like Someoneelse did, or
    (b) repeat the aliased expression, as in the HAVING-clause, below.
    Aggregate functions are computed after the WHERE-clause. (That explains why you can do things like
    SELECT  MAX (received_date) last_received_date_2008
    FROM    table_x
    WHERE   TO_CHAR (received_date, 'YYYY')  = '2008';).
    The HAVING-clause is like the WHERE-clause, but it is applied after the aggregate functions are computed, e.g.
    SELECT    deptno
    ,         MAX (recieved_date)  AS last_received_date
    FROM      table_x
    GROUP BY  deptno
    HAVING    MAX (received_date)    > SYSDATE - 7   -- Only show deptartments with activity in the last week
    ;

Maybe you are looking for

  • Is there a way to prevent children from changing or deleting Family Share calendar events?

    We recently set up Family Share. My wife and I have been sharing a calendar to coordinate our efforts keeping up with all the activities the family is involved in. We recently started to migrate some of our shared events to the Family Share calendar,

  • Add/ remove field on "Convert Lead"

    Hi All, Is it possible to edit/ remove field present on "Convert Lead" page. When we try to convert a lead to opportunity on the "Convert Lead" page we can view below fields under "Opportunity" section Do Not Convert to Opportunity // Auto-Create New

  • Unable to send fax from pdf in XI

    How can I send a fax from a pdf in XI?

  • Splashy stopped working after update, whole computer freezes instead o

    I update by "pacman -Syu" yesterday, and when I started up my computer today (no restart yesterday) it freezes where everything should start loading. I get the splash image I have choosen with splashy, but it doesn't load anything, it just stops ther

  • SDTray.exe error message

    When starting computer, I get an SDTray.exe error message.  I have Windows 7 64-bit on model e9280t.  The messages says system can't start because snlBase150.bpl is missing from computer.  When I close this  message, the computer runs normally, as fa