Count Repeating Frames

What is the easiest way to count the number of repeating frames(records) that are returned when a report is generated? I want to be able to set items visible based on whether the frame count is even or odd.

Hi Travis,
Let me see if I understand your Q... I think what you want is this:
EmpNo..... EName...... Salary...... SerialNo.....
100....... King....... 1000........ 1
101....... Luther..... 1100........ 2
102....... Doe........ 3000........ 3
If this is what you want, then a function of Count will give you the desired results. It will return 1 for the first row, 2 for the 2nd row and 3 for the 3rd row. You just have to make sure that in the "Data Model", this summary column is placed in the same group as the other records (EmpNo etc), and not outside the group. Choose Reset At > Master_Group or Report (depending on your report design).
Pl let me know if what you want is different.
Navneet.

Similar Messages

  • Count repeating frames occurance

    Hello,
    In the report there are multiple queries. I am trying to count the total number of repeating frames. Basically, I need to count the final output.
    When trying to use "Count" or "Sum" aggregates inside of SQL, I don't get the needed output. Is there some way to give a number to a repeating frame and then sum up its occurance? I tried different ways, but wasn't successful.
    I appreciate your help.

    Hi Slava
    Create a placeholder column, CP_1, at report level. Set its "Value if Null" property to zero.
    In the group on which the repeating frame is based, create a formula column and set its code to:
    :CP_1 := :CP_1 + 1;
    return :CP_1;
    This will (indirectly) return a running count and finally the total count of repeating frame instances.
    Regards
    Sripathy

  • How to get the number of rows in a repeating frame ?

    Hi all,
    When I launch a report from forms then sometimes there are data in the report and sometimes there are no data. And the problem is that when there are no data then the frame containing the repeating frame is still displaying and a blank page displays on the report.
    So I want to get the number of rows from the repeating frame so that I can code a format trigger on the frame to display or not the enclosing frame depending on the existence of data from the repeating frame.
    Thank you very much indeed.

    Dear Friend,
    You can achieve this. Define a summary column (say cnt). Select summary type as "COUNT". select any one of columns that are getting displayed in your repeating frame as summary column and provide "reset at" group name (or set this to report if you are defining this field at report level) . This "cnt" variable will contain how many records that will be fetched for your repeating frame (i.e. Group of Repeating frame). You can use this "CNT" variable in your format trigger.
    In this case there is no need to write before report trigger or anything.
    Regards,
    Manish Trivedi

  • How to find out no. of records or repeating frame in a page

    Hi All,
    How do I find out how many records have been displayed on a particular page?
    I'm having a repeating frame, and I want to know print another item, on a condition that if the records printed on the page are less than 5 then it should be printed otherwise not.
    The item to be printed is not a part of the repeating frame whoz occurences have to be counted.
    Regards
    Naveen

    Hi Naveen
    You can create a Packaged varaible that acts as
    global variable , and you can increment this
    variable in the repeating frames Format Trigger .
    Based on the value of the variable , you can
    return true or false for the item that you want to
    display .

  • Footer for a report with 2 repeating frames with down/across print directio

    I have a report with a frame for title shown in first page. the content of the report is shown on two columns in a repeating frame(R2) which enclose an other repeating frame (R1). In R2, just after R1, I have a frame for totals. Both repeating frame have down/across print direction. All repeating frames and title frame are enclosed by a regular frame(let say frame A) that have vertical elasticity fixed. at the end of the report i must display an other frame(frame B) with signatures. I put frame B in frame A, just after R2. If I set vertical elasticity to fixed or contract for R2, when the title frame is missing i get an empty space in the bottom of the page(except the first page, where the title appear)(R2 is anchored to title frame). if I set vertical elasticity to variable for R2, the frame B is not shown on last page with records, but in next page. I need a solution to keep the frame B in last page of the report which have records. the problem appear only when I have records in second column.
    Can somebody help me, please?

    Hi,
    I think without using Across/Down instead of Down/Across this is not possible. But then the output is
    1 2 3 4
    5 6 7 8
    If you need to have
    1 3 5 7
    2 4 6 8
    then you had to add some logic in an additional column for sorting the output. (sounds easy, but the logic need some work depending the count of records and their position.
    Regards
    Rainer

  • Question about repeating frames

    I am producing a summary report.
    I have several querys that produce different counts.
    for each query I have to have a different repeating frame to display the count.
    However if I produce a summary column on that querys information I do not
    need to repeating column.
    My question is which way is better?
    Thanks

    I am curious. Does your repeating frame only display the total count? It's hard to say which way is better, although you could try qualifying the two on certain criteria. Do they both display the same data you (or the user) wants to see? Which way is easier on you to set up? Did you already do it one way and is it working? If so, is the current way running satisfactory?
    I think a lot of times developers waste hours upon hours trying to make something run a few seconds quicker for a user that may only use the program a couple times a month if that.
    Personally I would use the summary column method. If for no other reason, that it is more manageable to me as the developer to alter a field than it is to alter a frame.

  • Repeating Frame with mutiple lines -- Page Break

    I have a report with repeating frame R11. R11 has several fiels
    spread across 4 lines.
    We have a case in which there is a pagebrek, while this
    repeating frame R11 is printed. Fields in the first line of R11
    are printed in the first page. Then when it continues to print
    the repeating frame in the next page, it is not printing the
    fields in the second line of the repeating frame. In other
    words, the second line is completely missing in the report.
    However, fields in the third and forth lines of the repating
    frame R11 are printed in the second page.
    Why the second line is dropped?
    How do I fix this problem?

    Create one summary column (lets say cs_pagenumber) in inner group and provide following:
    Function: Count
    Source: any field from innrer group
    Reset At: outer group
    Create one summary column (lets say cs_totalpages) in outer group and provide following:
    Function: Count
    Source: any field from innrer group
    Reset At: outer group
    (above will work if one field is printed only once in a form)
    Create a field in inner repeating frame for cs_pagenumber and create a boilerplate text (&cs_totalpages) in the same repating frame for cs_totalpages. This should solve the problem.
    Hope this helps.

  • Page Numbering on repeating frame with 3 logical pages per physical page

    We have a report in Reports 6i that prints a form on continous multi-part paper. We are converting the report to print to a laser printer with three forms per page. Each form has page numbers in the format of "page 1 of 15". The "page" refers to the form number and the "of" refers to the total number of forms for the outer group. So we could have page 1 of 15 through page 15 of 15 followed by page 1 of 112, etc.
    I have tried all of the suggestions on how to base page numbers on a repeating frame and non of them seem to work. All the examples seem to be based on the idea that the logical page contains 1 or more physical pages; whereas my situation is that I have multiple logical pages on each physical page.
    Does anyone have a thought on how to do this?

    Create one summary column (lets say cs_pagenumber) in inner group and provide following:
    Function: Count
    Source: any field from innrer group
    Reset At: outer group
    Create one summary column (lets say cs_totalpages) in outer group and provide following:
    Function: Count
    Source: any field from innrer group
    Reset At: outer group
    (above will work if one field is printed only once in a form)
    Create a field in inner repeating frame for cs_pagenumber and create a boilerplate text (&cs_totalpages) in the same repating frame for cs_totalpages. This should solve the problem.
    Hope this helps.

  • Heading for repeating frame (horizontal) to appear just once - How?

    Hi
    I have 3 queries that represent 3 different levels. Each level is displayed one above the other. Example
    Level 3: <field3 from query3>
    Level 2: <field2 from query2>
    Level 1: <field1 from query1>
    In the output The level labes are displayed as many times as the values in the fields. Example Level 2 is displayed twice if query 2 returns 2 rows.
    Level 2: <row1 from query2>Level 2: <row2 from query2>
    This is because I have field and label for Level within a repeating frame. Is there a way that I can suppress Levels being dispalyed multiple times and display just once in the beginning?
    I cant put the Labels outside of the repeating frame because the levels may vary (there may be 1 level or two or all 3 levels depending on input).

    Are these 3 queries independent of each other or linked with Data Link?
    If these are linked with each other, then try the following:
    Try using summary column (count) for each query and put a format trigger on the labels. If count is <> 1, hide the label.
    Hope this helps.

  • Horizontal repeating frame

    Hello all,
    I am using oracle 9i forms and report.I have created one report in oracle report builder,that report alignment is perfect .the output of report like this.
    1 2 3 4 5 6...........................................................31.
    it is coming rightly on report builder but when i open in pdf it is coming with different lines but need to display in one line.
    i am used horizontal repeating frame for print 1....31.Is it any configuration required on report server. kindly help me.

    Are these 3 queries independent of each other or linked with Data Link?
    If these are linked with each other, then try the following:
    Try using summary column (count) for each query and put a format trigger on the labels. If count is <> 1, hide the label.
    Hope this helps.

  • Format Fields in a Repeating Frame

    Hi All,
    I have a repeating frame with multiple fields in it. I was trying to change font and size of those character fields when some parameter changes. If I put the "if ... then.." in each field's format trigger, it worked. Since those fields are included in the frame, I was thinking can I just use frame's format trigger to change its fields attributes? Is there anyway I can refer to individual field while using srw functions?
    Thanks a lot for any help.

    Typically you want to use the following order when dealing with how to manipulate data:
    - do it on the server
    - do it in the data model
    - finally, do it in the layout
    If you do want to do this in the layout, then you'll need to keep track of the the previous value in a PL/SQL package variable and set this value in the format trigger. You can then reference the previously set value on the next instance of the repeating frame.
    However, this creates difficulties since a format trigger for a single instance of an object may execute more than once (basically when it doesn't fit on the previous page). To get around this problem, you'll need a count column in the data-model to check when you need to update the package variable value in the format trigger.
    If you can, take a look at changing your data to calculate this value and just display it in the layout.

  • Repeating frame not appearing

    Hi,
    I have created a report.
    I placed some labels and fields on the repeating frame. For that repeating frame i have assigned one group.
    If the group (query ) results in records it is displaying fine. But when it results zero records the whole repeating frame is disappearing. Not even labels are appearing. What could be the problem.
    If it results zero record it should display the lables and feilds with no data.
    How can we do it?
    thanks
    Kalyan

    Steve is correct on this one - that is the intended result. What you could do is this - create 2 exact layouts. Keep the first layout as it is, but for the second, just create a regular frame, and labels (no repeating frame).
    Create a format trigger for the frame that references a placeholder column counting some element in your query (like # of employeees...etc). In the format trigger do this:
    If :cp_count = 0 then
    return (true);
    else return(false);
    end if;then if there was no data, your second frame would print with just the labels. Just an idea, but play around with it.

  • How to get the values from repeated frame?.

    Hi
    how to get the values from repeated frame?. i have to disply the first 3 digits in another place in my report.
    i have field empno in repeated frame and i want to disply first 3 digits in another place in the same report.
    thanks

    How often do you need to display it? It sounds like you might want to base a summary on that formula with a function of first or last. If it's a per page basis, it can be a page level summary. If it's at a higher level repeating frame, then you can create the summary at that level. I'd suggest taking a look at the online help for summaries using the first/last functions.
    Hope that helps,
    Toby

  • How to make an order on repeating frame using Formula Column?

    Hi All,
    I have a repeating frame dependent on some query, how to make an order on this repeating frame using a formula column defined in its group and dependet on values from the query?
    Note: I'm using Reports 6i

    Place your formula column at the top of the itm group and set the BREAK_ORDER to assc.. or desc...
    Hope this helps
    Hamid
    if problem solved, close the thread.

  • How to fix objects below repeating frame?

    hello all! I wonder how to fix the last elements such as signature area of a sale order report to the bottom of the last page?
    i find the area always appear closely after the detail lines...i don't want this
    Thanks for any help!

    hi philipp!Thanks for your reply.
    I am meaning that a have some text objects lower than a repeating frame which height is variable and i want to have the distance between the text objects and the bottom of the page to be fixed,instead of varying according to the height of the repeating frame.The text objects and the repeating frame are in a same container frame so i can't set the vertical elasticity of the frame to fixed.
    Any idea?

Maybe you are looking for