Smartforms trigger new page for given condition - abap

I have prepared a smart form, which has a table in main window. So there can be hundreds of lines in the table. What I want to do is to trigger new page for every 10 records.
I'have resized the main window to height that at most 10 records are fit and selected the new page tick in command. It is kind of working but I want to do this programatically.
Like;
if count % 10 = 0
then GO_TO_NEW_PAGE
How can I do this ?

You should be able to trigger a Dynamic Page Break using a Command Node. I haven't tried what this does to the table header / footer though...

Related

RDLC: how to add page break in the table

I have problem with rdlc for payment schedule. Schedule can be 48 or 60 rows.
I have some text before schedule and after. I managed to fit 48 rows on one page but then I have problem with 60 rows schedule. It prints on first page only text what is before table and schedule table is printed on the next page. But I don't want to be first page empty. If 60 rows don't fit on one page, it breaks table normally. But if i make row hight bigger 48 rows table jumps to second page.
I need page break in the middle of the table or something like that. Any suggestions how to resolve this?
Set KeepTogether property of the table or group inside the table, depending how you are doing it, to False, It is usually True by default:
And then set RepeatOnNewPage property of the table or group header to True:

Oracle Apex 5 action button next to row

I am new to Apex 5 and need some help. I am trying to build a simple application. I have a search field which selects data from a table. when the rows are returned I would like to have a button next to each row. I will try and explain what the button should do.
Let's use stock as an example. the row will contain a name and a number in stock, lets say items in stock is 10. When I press the button another report below should then open and add the name and a count of 1 for the row where the button was clicked and also reduce the count to 9 from the top row. If I click the button again the count should change on the bottom row to 2 and to 8 on the top row.
Here is where the other problem comes in. If I do a new search for a new item, it should still keep the below selected items and I should be able to click the button to add the new items to the bottom list. Only once I have selected everything should the submit button be pressed to do something.
I am not even able to paste any code as I have mostly tried just using the processes and dynamic actions. I am totally stuck with this. :|

Create DataTable child row without showing it?

I am using datatable (v1.10.2 with jquery 1.9.2) because I like the out-of-the-box features (searching/sorting etc). However, now I want the ability to:
1) use animations (sliding) when showing/hiding a row
2) have the hidden row available in the DOM to change (ie, it would exist but have a display:none).
My current code to create the table looks like the following (where formatChild() returns html for a table):
if (row.child.isShown()){
row.child.hide();
tr.removeClass('shown');
} else {
row = row.child(formatChild());
row.show();
tr.addClass('shown');
}
I am using several services to change data in the child row's table via ajax and want to be able to change that data even when the row is hidden. I know I can create a map in memory and use the information in the stored map when I show the child row, but to me it is much cleaner to change the hidden row immediately.
I was hoping I could do a row()child(), modify the row, then call row()child().show() but the row isn't created in the DOM after the row.child().
Regarding the animation, I found an answer here but it involves changing the datatables code :(
I considered just using jquery to add a row to the datatable and hide it, but I couldn't find a good way to "attach" it to the primary row for sorting.
The plan I am currently leaning towards is to add a div to my primary table row that I will show/hide/update rather than using child rows at all.
What is the best practice for managing these hidden areas in a datatable (and showing them with animation)? ty
In case anyone else has the same question, I ended up using a DIV in the row rather than using DataTables' child row. When I add a new row to the datatable, the div is hidden then I hide and show (slideup/slidedown) on a click event. This gives me the nice animations, keeps the sorting simple, and let's me change information in the hidden row. Interestingly, the DIV contains a table and the text that is in that table when I create the new row is searchable; however, the text in the table that my ajax call adds/modifies is not searchable. I'm looking into how I want that to work (and may keep the div out of the search altogether if possible).

setting up page number for jqgrid

I am facing a problem in setting up the page numbers of jqgrid dynamically. I am new to this jqgrid and would like the assistance to learn it fast.
I have a scenario which if somebody can answer would be very great for me.
I have an application, which can bring millions of records in a single query output.
For this i want something like paging chunks of data instead of getting all data at once (which will not happen anyhow)
For this, i would hit server for first time and find out the total records to be displayed, but return only 2000 of it.
Once user uses paging next button and reaches the last record, on click of next button, the next 2000 records from server will be brought up.
Problem here is the pager shows that there are only 20 pages (i have set 100 as total records in a page), and it disable next button as soon as page 20 is accessed, thus stopping to get new set of data from server
Even if somehow, i get the next set of data, the page should shows me only 20 records of initial. I want page to show me total records/size of page in first go itself although there will be only 2000 records, so that next, previous, first and last button can be used freely and data from server can be brought as and when required.
Has anybody worked on such a thing? I am really stuck with this requirement for over 2 weeks now. Thanks to all in advance. Hope to get an answer soon on this.
I have got it working using localreader which helps me set the total, records and page count to correct values.

DataTables: draw table first, then populate it with data from server side call

Is there a way to draw the table first, for example where the length will be set at 10 rows?
I want to draw the table first, with a height of 10 rows, which should be very fast, then populate the data from a server side call. In the jquery plug-in jqGrid, it does this. and when it is processing the ajax call, it displays a msg "loading".
I'm not 100% certainly what you are looking for (specifically I don't know what you mean by "draw the table first"), but DataTables has a deferred loading option: http://datatables.net/release-datatables/examples/server_side/defer_loading.html . With this option your HTML table is read from the DOM and what is read is used as the first page (so you just need to create your HTML table with the first 10 rows). Then any subsequent requests are server-side processing.