REP-1314: Format Trigger columnname references at wrong frequency

Hi,
I have the following trigger.
When I launch the report I get the error:
REP-1314 error Format Trigger :color references at wrong frequency
Trigger is as follows:
function CT_1FormatTrigger return boolean is
begin
  -- Automatically Generated from Reports Builder.
  if (:color = 'CR')
  then
    srw.set_foreground_fill_color('red');
    srw.set_fill_pattern('solid');
  end if;
  -- Automatically Generated from Reports Builder.
  if (:color = 'MJ')
  then
    srw.set_foreground_border_color('r100g88b0');
    srw.set_border_pattern('solid');
    srw.set_foreground_fill_color('r100g88b0');
    srw.set_fill_pattern('solid');
  end if;
  -- Automatically Generated from Reports Builder.
  if (:color = 'MN')
  then
    srw.set_foreground_border_color('yellow');
    srw.set_border_pattern('solid');
    srw.set_foreground_fill_color('yellow');
    srw.set_fill_pattern('solid');
  end if;
  return (TRUE);
end;I have one group named G_COLOR to which there are 2 columns cnum and color
Any ideas to resolve this issue?
Thanks

The field CT_1 should be either in the G_COLOR group, or in a group below that. Otherewise, multiple values for the color column may exist for the CT_1 column.

Similar Messages

  • FORMAT TRIGER 'B_5' REFERENCES COLUMN 'DT' AT WRONG FREQUENCY

    I have a field B_5 as page footer & I have written the following code
    function B_5FormatTrigger return boolean is
    begin
    -- Automatically Generated from Report Builder.
    if :dt >= '02-oct-2007'
    then
    return (FALSE);
    end if;
    return (TRUE);
    end;
    when I execute the report it returns an error that
    FORMAT TRIGER 'B_5' REFERENCES COLUMN 'DT' AT WRONG FREQUENCY
    How can I get rid of this error ?

    Hi
    Check if DT belong to the correct frame or repeating-frame.

  • Doubt with Oracle Reports Format Trigger

    Hi friends,
    I have created a format trigger in oracle reports the code is
    Function F_Department_NameFormatTrigger return Boolean is
    v_report_url varchar2(300);
    Begin
     v_report_url :=‘http://localhost:8888/reports/rwservlet?
    report=empReport.rdf&userid=hr@orcl&destype=cache&desformat=htm
    lcss&p_dept=’||:department_id;
    SRW.SET_HYPERLINK (v_report_url);
    Return (TRUE);
    End;but i am getting an error rep-0738 : only a function is allowed here can u please let me know whats wrong in this coding.
    Regards,
    Manoj

    Probably you are using the wrong quotes. Please try this:
    Function F_Department_NameFormatTrigger return Boolean is
    v_report_url varchar2(300);
    Begin
    v_report_url :='http://localhost:8888/reports/rwservlet?report=empReport.rdf&userid=hr@orcl&destype=cache&desformat=htmlcss&p_dept='||:department_id;
    SRW.SET_HYPERLINK (v_report_url);
    Return (TRUE);
    End;

  • REP 1316 at wrong frequency

    Hi all,
    I have a report and i want to create a Before_Report trigger which is like this :
    function BeforeReport return boolean is
    no_print exception;
    begin
              dbms_application_info.set_client_info(:P_ORG_ID);
              if :CF_cust_trx_type in (1080,1002,1005,1018,1022) then
                   raise no_print;
              end if;
              exception when no_print then
                   fnd_file.put_line(1,'You cannot print this invoice!');
      return (TRUE);
    end;It's compiling without errors, but after triyng to generate XML it throws me REP-1316:Before Report Trigger references column 'CUST_TRX_TYPE' at wrong frequency.
    Any ideas what to do?
    Report Builder 10.1.2.2.0
    Thanks in advance,
    Bahchevanov.

    Solved!
    modified:
    function BeforeReport return boolean is
    no_print exception;
    lv_cust_trx_id number;
    begin
         dbms_application_info.set_client_info(:P_ORG_ID);
         begin
              select distinct ra.cust_trx_type_id
              into lv_cust_trx_id
              from ra_customer_trx_all ra
              where ra.customer_trx_id = :p_customer_trx_id;
         exception when no_data_found or too_many_rows then return(false);
         end;
              if lv_cust_trx_id in (1080,1002,1005,1018,1022) then
                   raise no_print;
              else return(true);
              end if;
              exception when no_print then fnd_file.put_line(1,'You cannot print this invoice!') ;
                   return(FALSE);
      return (TRUE);
    end;But the problem is that in the log file of the concurrent program the message: You cannot print this invoice! is not there....
    It's just : REP-1825: Before Report trigger returned FALSE.
    REP-0069: Internal error
    REP-57054: In-process job terminated:Terminated with error:
    REP-1825: Before Report trigger returned FALSEAny ideas?
    Thanks in advance,
    Bahchevanov.

  • Report format trigger not working

    Hi,
    I am using a format trigger on a column in my report as follows:
    function B_9FormatTrigger return boolean is
    begin
    if (:TEST > 30) then
    return (FALSE);
    else
    return (TRUE);
    end if;
    end;
    When testing in reports builder everything works fine, but when running the report from a form, the trigger is not executed.
    I am thinking this might have something to do with te reports runtime, but i don't know how to solve it.
    I am using Report Builder 9.0.4.0.33
    Edited by: user10085365 on 3-feb-2009 6:12

    so, did you try my suggestion to switch the condition?
    Or, is there maybe an old rep-file in your runtime-environment which doesn't include the format-trigger? Try to colorize a field and see if the correct reports-version is run.
    And I am a 100% shure the :TEST value is correct.
    So the field that should be hidden, stays displayedYes, but its unlikely that you hit a bug here (but not impossible), the chance in gendral is higher that there is some other reason for that. (in my case, 99.99% of the things which don't work are my own fault ;-) )

  • Hiding an image in format trigger hides the entire report

    Hello
    am newbee for Oracle 6i development.
    We have existing report, I want to hide a image based on some conditions.
    I have added the bleow mentioned cde in 'format trigger" of image object
    When the condition is met the entire report is getting hidden, noting shows up on screen. when below condition is not met I am able to see the report.
    Need help to resolve this issue. thanks in advance.
    FUNCTION B_LOGOFormatTrigger RETURN BOOLEAN IS
    L_import_ind order.import_ind%TYPE;
    L_po_type order.po_type%TYPE;
    L_start_date DATE;
    BEGIN
    SELECT import_ind, po_type INTO L_import_ind, L_po_type
    FROM order
    WHERE order_no = :ORDER_NUMBER;
    SELECT to_date(param_value, 'DD-MON-YY') INTO L_start_date
    FROM param_detail
    WHERE program_code = 'print';
    IF (L_import_ind = 'Y' AND :ENTRY_DATE >= L_start_date AND (L_po_type = 2 OR L_po_type = 3))
    THEN
    return (FALSE);
    ELSE
    return (TRUE);
    END IF;
    END;

    user8880704 wrote:
    Hello
    am newbee for Oracle 6i development.
    We have existing report, I want to hide a image based on some conditions.
    I have added the bleow mentioned cde in 'format trigger" of image object
    When the condition is met the entire report is getting hidden, noting shows up on screen. when below condition is not met I am able to see the report.
    Need help to resolve this issue. thanks in advance.
    FUNCTION B_LOGOFormatTrigger RETURN BOOLEAN IS
    L_import_ind order.import_ind%TYPE;
    L_po_type order.po_type%TYPE;
    L_start_date DATE;
    BEGIN
    SELECT import_ind, po_type INTO L_import_ind, L_po_type
    FROM order
    WHERE order_no = :ORDER_NUMBER;
    SELECT to_date(param_value, 'DD-MON-YY') INTO L_start_date
    FROM param_detail
    WHERE program_code = 'print';
    IF (L_import_ind = 'Y' AND :ENTRY_DATE >= L_start_date AND (L_po_type = 2 OR L_po_type = 3))
    THEN
    return (FALSE);
    ELSE
    return (TRUE);
    END IF;
    END;In general,
    At Layout view, select the image field and press F11 and write your code.
    But if the item is the only item in the repeating frame, you may get error or wrong data.
    Hope this helps
    *+Mark correct/helpful to help others to get right answer(s).+*

  • Format Trigger

    Hi everyone,
    I have a problem with formatting trigger. Here is my example.
    I have two repeating frames in the report(one within another). The first one or main frame displays sale representative number and period. The second repeating frame displays associate accounting information. Here is a visual representation:
    Rep: 755 Original amt.
    Period: 200401 Data: XXXXX XXXXXX
    --Next page
    Rep: 755 Original amt.
    Period: 200402 Data: XXXXX XXXXXX
    --Next page
    Rep: 755 Original amt.
    Period: 200403 Data: XXXXX XXXXXX
    I have a summary column in this report which calculates total of Original amount. The problem is this total is displays on every single page and I want it to be only on the last page. Another important factor to mention, is that I have multiple reps who have different periods in their achieve. Here is what I come up so far for the formation trigger:
    function F_tot_per_repFormatTrigger return boolean is
    v_month number;
    v_sas number;
    begin
         for x in (
         select slsman, max(period) as max_period
    from sas_summary a, oesummary b, oehead c
    where slsman between nvl(:lorep,slsman) and nvl(:hirep,slsman)
    and period between nvl(:loper,period) and nvl(:hiper,period)
    and a.org_unit_id = (select def_org_unit_id from user_me_vw)
    and c.order_no = b.order_no
    and c.order_suffix = b.order_suffix
    and c.invno = a.invno
    group by slsman)
    LOOP
    if :period = x.max_period then
    return(TRUE);
    else
         return (FALSE);
    end if;
         END LOOP;     
    end;
    I need this total to be displayed on the last page(or the max(period)) for a particular representative. This trigger, shown above, only works for those representatives who have max(period)=12. How can I modify this trigger so that I would work for multiple representatives with different max(period)?
    Any help is appreciated,
    Thanks,
    Sonya

    Im saying that in this case, it would not be necessary. Take the following design (fake query):
    select rep, original amount, period, sum(data)
    from table
    Group Rep
    Rep
    Original Amount
    Sum Col (sum of data column reset at rep)
    Group Details
    period
    sum(data) - we'll call it data for simpleOk now for the fun part - trying to do a design - bear with ok?
    (repeating frame r_g_rep) - for rep group
    REP         ORIGINAL AMOUNT
    ----------(repeating frame r_g_details)----------
    PERIOD    DATA
    /----------(end of repeating frame r_g_details ---/Summary Column right here - Stick between the end of the 2nd repeating frame, and the end of the master rep repeating frame. Set the summary column properties to Last Page printing, and print on Anchoring Object
    /________(end of repeating frame r_g_rep)____________/Hope that helps - start with a simple stripped down design, and move from there. In my design, the Summary column takes the sum of the data column, and resets it at each Rep. Since this is in the top group, Reports will print the details, and when it reaches the last period per group, it will print this summary column
    If you still can't get it, you'll have to leave your email, and I can send you a working example.
    Good luck!

  • Format Trigger not working in 10g Report.

    I have a report with two eclipses
    (*) Debit (*) Credit . Please note that the two asterics denotes eclipses.
    I have a format triggers on these eclipses based on the database item Debit_credit.
    IF :debit_credit = 'CREDIT' THEN
    RETURN FALSE;
    ELSE
    RETURN TRUE;
    End if;
    and vis-visa. However the format trigger is not working. Regardless of the value of
    debit_credit. I even created a frame around these eclipses and put my format trigger all to no avail. Please help.

    Create a boilerplate text in your repeating frame (get rid of the field :debit_credit from your layout, but leave it in your query). I created the boilerplate field B_1. My format trigger looks like:
    function B_1FormatTrigger return boolean is
    begin
      if upper(:debit_credit) = 'CREDIT' then
           srw.set_field(0, to_char('(*) CREDIT'));
       else srw.set_field(0, to_char('(*) DEBIT'));
      end if;
      return (TRUE);
    end;I hope I understood your question OK...I am not sure what an eclipses is?

  • Format Trigger on Frames - SQL in data model

    I am working on a report that gets data from huge tables that could possibly have millions of records. I have about four different queries in my data model. Each of the queries is attributed to a Frame in my layout model. However depending on the input parameters to the report, I need to suppress some frames.
    I know we can simply conditionally set the format trigger (return FALSE) on the frame to turn of its display. But is there a way not to do the SQL query in the first place. In other words is there a way to accomplish this instead of having separate .rdf files. These are very I/O intensive queries and I don't want all the queries to run when the user chooses to see only on of the Frames (views). Remember that in my report each frame has its own query.
    Any ideas ? Thanks in advance.
    My email is : [email protected]

    I apoligize for the multiple postings of the same item. Each time I tried, I got a jsp error but it successfully posted the item. I realized that only after three tries.
    Thanks

  • Performance on Format Trigger

    Hi;
    Is anybody have experience with performance and stress testing with Format Trigger running report 6i on web environment? the output will in PDF (acrobat reader) bit mapped.
    Suppose there is 2 format triggers on 2 frames set in Margin Section. Inside frame 1 of the report which has a water mark sign say TEST if the report runs on TEST database and another frame with PROD sign which if is run against production database.
    If you have 10 pages that format trigger will run 10 times for each pages printed.
    Does it cause performance issue? How do you measure the performance for format trigger?
    Thanks for sharing.
    Shaun

    Help doesn't give info on performance. If it does please send me a copy to [email protected]
    how to do performance and stress testing for format trigger?
    Any idea on Format trigger performance on webserver?
    Thanks.

  • How to reset a count variable in a conditional format trigger

    I am using a conditional format trigger to eliminate sections of a report where there is no data. The trigger is automatically generated by reports (shown below). the condition is :com_count = '0' therefore no record, no display of section - if :com_count>0 then data present and display record.
    It works fine eliminating the sections - until actual data is found - and count is set to 1 and it displays the record. The problem is that once :com_count >0, then the section displays throughout the rest of the report whether there is actually data or not.
    It seems that :com_count needs to be reset to 0, but when I try to do that, it throws an error stating that :com_count is a read only variable.
    I am new to PL/SQL so can anyone suggest how I can reset the :com_count to 0 each time the trigger fires with :com_count = 1?
    Any help would be appreciated. Thanks,
    Glenn
    The conditional format trigger is:
    function M_G_COM_RANK_GRPFRFormatTrigge return boolean is
    begin
    -- Automatically Generated from Report Builder.
    if (:COM_COUNT = '0')
    then
    return (FALSE);
    end if;
    return (TRUE);
    end;
    The count
    It works perfectly

    wher is your COM_COUNT defined?
    If should be defined in the datamodel in the "mastergroup" of the "detailgroup" of which you want to count the records.
    If you do so, there is a property of the item "Reset at" ( which is by default set to "Report") and you then can change it to the name of the mastergroup. So every time a new record is "active" in the mstergroup, the count-item will be reset to 0.
    hope this helps

  • How to handle format trigger in bi publisher report

    Hi all,
    anyone have idea how to handle format trigger in bi publisher report....
    also if someone will illustrate the how exactly we use the triggers in bi publisher reports.
    regards
    Ratnesh

    Hi,
    there's no direct support for the format triggers out of Oracle Reports. Therefore they are mentioned in the log file and in the created layout after conversion the objects with format triggers are colored red to show, that there you had to do some additional work.
    Currently you had to built the logic of format triggers in BI Publisher new. Hve a look in the User Guide, there are some examples for if or choose statements.
    regards
    Rainer

  • Format Trigger - do not display frame if multiple FIELDs are 0

    Hello,
    I am having trouble creating a format trigger to NOT display a frame if a multiple fields within the frame are 0.0
    The field is named F_number1, F_number2, F_number3
    The frame is called M_numberframe
    All 3 of the fields listed have to be 0.0 in order to not display the frame. If only one is 0 then they still all three need to show.
    Thanks!

    Hello
    The field is named F_number1, F_number2, F_number3These are actually field name's. You will have to write the source name in the format trigger.
    Let say F_NUMBER1 is having souce as my_field1, F_NUMBER2 = my_field2, F_NUMBER3 = my_field3 then
    Go to the frame's PL/SQL Editor by selecting and pressing F11 and write the as below...
    IF :my_field1=0 AND :my_field2=0 AND :my_field3=0 THEN
      RETURN FALSE;
    ELSE
      RETURN TRUE;
    END IF;-Ammad

  • How to use "&Total physical pages" in the format trigger?

    Hi all:
    How should I to use the system variable "&Physical page number" and "&Total physical pages" in the format
    trigger?
    I can not use these 2 variables in the format trigger directly or i will reveive an error message.
    Thank You!

    It may help you to know how I add JARs
    1. I open my Project (myProject)
    2. I Mount the JAR to the FileSystem (like mypackages.jar = which includes com.mus.de.myClass.java)
    3. I Mount the File to the FileSystem (like c:\..myfiles..\myProject)
    3.1 I add the File to my Project
    4. I select File | New -> Classes | Main
    4.1 I typed "import com.mus.de.myClass.java" to refer to this package.
    4.2 I called some of the public methods
    thats it
    Andreas

  • HOW TO USE field value in repeat_fram formate trigger

    i have a field on report layout. i want to use its value in formate trigger to filter the record in which that field value is zero.
    field is number type, getting stock of item. i want if stock of item is zero than it should not display, for this i use formate trigger of repeating frame.
    Thanks yash

    yash_08031983 wrote:
    i have a field on report layout. i want to use its value in formate trigger to filter the record in which that field value is zero.
    field is number type, getting stock of item. i want if stock of item is zero than it should not display, for this i use formate trigger of repeating frame.Hello, yash
    Format trigger is for change the formation of value. Like change the font, make it bold,italic, changes it's colour . Not for filtering.
    If you want to restrict your report not to show Zero(0) value of stock , you have to done it at SQL query. Like, if stock is a database filed you may write
    select .........,....
    from table
    where stock >0Hope this helps.
    If someone response is helpful or correct, please mark it accordingly.

Maybe you are looking for

  • Itunes encountered a problem and needs to close

    Can't launch itunes. Get message "iTunes has encountered a problem and needs to close". Bought ipod for Xmas. Had old laptop that didn't have adequate USB. Finally bought new Dell and installed (Disc was version 5). Downloaded version 6 and haven't b

  • Accounting Document not updated in BKPF for JV by J1IH

    Hi The user posted JV through transaction code J1IH. The document number is updated in table J_1IPART2 but when the user is trying to see the same document in FB03 we are getting the error message as "the document is not exist or not archived". And w

  • Many times my iphone 3 closing suddenly while tle battery is 60 or 80%

    Many times my iphone 3 closing suddenly while tle battery is 60 or 80%

  • ORACLE8 ENTERPRISE EDITION의  주요 신기능

    제품 : ORACLE SERVER 작성날짜 : 2004-08-16 Oracle 8 Enterprise Edition 의 주요 신기능 ========================================== Purpose 이 자료는 Oracle8 version의 주요한 new feature에 대해 간략히 설명한다. * Oracle8 Enterprise Edition 릴리스 8.0의 주요 기능은 다음과 같다. 분할 테이블과 인덱스를 통한 사용과

  • Exit for view in mm01

    hi, is there an exit to add customer fields to 'plant/storage location data 1' in MM01/MM02/MM03 thanks in advance. pawan.