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!

Similar Messages

  • 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

  • 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 ;-) )

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

  • Headstart/Designer 6i / Report Generation / Format Trigger / Repeating frames.....

    Good morning all!
    Product version...
    Headstart 6i
    Des.6i 6.5.52.5.0
    Des.tools 7.2.52.2.0
    Des.report generator 6.5.52.1.0
    Dev. report builder 6.0.8.14.2
    Any idea on how to generate from Designer, a format trigger on a report's repeating frames???
    Thank you,
    Michel

    You can customize report in Report Builder. The Report Builder can be run from Repository Reports menu (Run -> Report Builder).

  • Designer 6i / Report Generation / Format Trigger / Repeating frames.....

    Good morning all!
    Product version...
    Des.6i 6.5.52.5.0
    Des.tools 7.2.52.2.0
    Des.report generator 6.5.52.1.0
    Dev. report builder 6.0.8.14.2
    Any idea on how to generate from Designer, a format trigger on a report's repeating frames???
    Thank you,
    Michel

    You can customize report in Report Builder. The Report Builder can be run from Repository Reports menu (Run -> Report Builder).

  • How to access report placeholder in format trigger

    How can i access the report placeholder inside the format trigger. I am trying to access it like :F_AMOUNT as i am seeing it in the object navigator but it is giving me error that it is bad bind variable.

    Hi
    If I got your question properly, You need authorization for the accessing Client System. You can see the Reports at RSRT , RRMX may also lead to Query Analyser.
    Hope it helps

  • 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).+*

  • Can I italicize results using a format trigger?

    It seems like I should be able to based on the description of the format trigger use in the help section. If so, I imagine I use one of the srw functions but which? Basically, if the field being printed is less than a certain value, I want to print it italicized (no change if the field is greater than or equal to the value).

    I have been digging through both the online help, and my Oracle Reports Builder book but I haven't been able to find the proper syntax. The closest thing I found was on the Oracle website
    (http://www.oracle.com/technology/products/reports/10g/SOD_Reports.html)
    which has a table of attributes. According to the table, you should use srw.set_font_style(srw.italic_style).
    So my format trigger reads:
    function F_OFFER1FormatTrigger return boolean is
    begin
    IF :offer < '250' THEN
         srw.set_font_style(srw.italic_style);
    END IF;
    return (TRUE);
    end;
    This has not been successful so I'm clearly missing something about the syntax...

Maybe you are looking for