This topic is locked
[SOLVED]

 URGENT - Event Page Break

1/21/2010 8:40:00 AM
ASPRunnerPro General questions
S
stealthwifi author

Hello, I have an urgent request to whomever can help get this working.
I have a print friendly page that cuts off records when printed, I need to set it to page break after every 20 records.

Be defualt it is trying to break after every 30 records (which do not fit on the page).
Is there something I can change to make it print 20 rather than 30 per page or an even I can run so every 20 records it inserts a page break?
Attached is the result of the print (does the same printing to PDF or to physical printer):

File
I wanted to add I have the below instructions but there is no /foreach on any of the pages in this version (ASP 6.1)

  1. add "Print page: Before process" and "Print page: After record processed" events on the Events tab.

    > > Here is a sample "Print page: Before process" event:

    > > -------------------------

    > > Session("rec_id") = 1

    > > -------------------------

    > > Here is a sample "Print page: After record processed" event:

    > > -------------------------

    > > if int(Session("rec_id")/4)=0 then

    > > row("rec_id") = 0

    > > Session("rec_id") = Session("rec_id")+1

    > > else

    > > row("rec_id") = 1

    > > Session("rec_id") = 1

    > > end if

    > > -------------------------

    > >

    > > 2. then use this code on the Visual Editor tab in HTML mode:

    > > -------------------------

    > > you need to add page break before {/foreach}.

    > > Find this code:

    > > {$row.1Action_Items_Status_value}

    > > and add following line just after:

    > > {if $row.rec_id}<P style="PAGE-BREAK-AFTER: always"></P>{/if}

S
stealthwifi author 1/21/2010

I solved it:
On the _print.asp page about line 235 change from

if bValue(all) and 30<=records then

TO

if bValue(all) and 20<=records then
Anyone know how I can make that change in the source so I dont have to edit 4 generated pages every build?