Skip to Content
author's profile photo Former Member
Former Member

SmartForms Loop Problem

Dear Friends

I have an internal table and have 10 records inside it.

According to my requirement

I have to display only 4 records in one page and sum of those 4 records in end of the page

Like

Record SequenceQty12233141

Sum should be 7

next page

Record Sequence
Qty
11223441

Sum Should be 8

Last Page

Record Sequence
Qty
1421



Sum should be 5

please send me how can i reach to this solution

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2013 at 06:13 AM

    Hi ,

    Write the sum logic in footer and display the footer at page break...

    after the page break clear the sum variable and allow the logic to calcutale sum again for the next page ..

    again at page break display the footer..

    Thanks,

    Ben

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2013 at 06:34 AM

    Hi Nelson,

    In global data create one variable (Ex:Count). In that table main area under the cell create one program line and increase counter by following the code,

    clear flag.count = count + 1.if count = 4.flag = 'X'.endif.
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2013 at 06:10 AM

    in your logic you should use page break concept .

    google for smartform page break many documents available.

    hope it helps,

    Vinoth.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2013 at 06:27 AM

    Nelson,

    Create a new smart form as you normally create.

    Inside main window write your logic for displaying records using Loop flow logic and then inside

    loop use flow logic alternative and Alternative general attribute put condition for new Page.

    If it is true then display toalal and use New Page comand for displaying page.

    see attachment as sample.


    smart.jpg (76.4 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2013 at 06:59 AM

    Hi Nelson,

    follow this thread Re: SMARTFORMS Using tables where i already explained the process...

    Hope your problem will be solved....

    Regards

    Sabyasachi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2013 at 07:17 AM

    Hi,

    You can add a code logic node inside the table node and declare a counter. Then keep on incrementing the counter as long as the counter value is less then or equal to 4.Once its greater than 4 clear the counter variable.In the window add a condition with the check of counter variable greater than 4, do a page break then.

    Hope it serves your problem.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2013 at 05:57 PM

    Hi Nelson,

    Please use Command option along with Program lines in Flow logic of smartform.

    You will be able to proceed.

    Please revert in case of issues.

    Regards

    Vivek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 12, 2013 at 07:56 AM

    Hi Nelson,

    First Sort your records in the sequence you want to show and then use the COMMAND for page break.

    Else

    If the format is fixed of showing 4 records per page then design your main window in such a way that it accomodates only 4 records of the table.

    Hope this helps.

    Thanks,

    Tooshar Bendale

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.