How to get a height of the full data from MasterData (FastReport template)? - pascalscript

I wanna get a Height of MasterData whith full generated data. Normally i use on event onAfterCalcHeight of MasterData
if engine.FreeSpace <= GroupHeader2.Height + MasterData1.Height then
engine.NewPage;
.I need Above line of code, because my template cut of Data beetwen pages.

The problem here was the order of events.
First i create a global double variables, for full masterdata1.Height and another height-variable components.
var
masterdata_Height,GroupHeader2_Height: double;
Next on masterdata event OnAfterCalcHeight a simple
masterdata_Height:=masterdata.Height;
Same whith another FastReport headers.
After this on All Headers Event OnBeforePrint I add a condition :
if engine.FreeSpace <= (masterdata_Height + GroupHeader2_Height) then
engine.NewPage;
In parentheses condition adds all sizes headers approaching the headline event.

Related

Datatables: Create a footer on the fly

In my project, the number of columns in main table depends on the user settings and I get it from AJAX to dataTable directly. Several of these columns show different amounts (eg pre-price, final-price, etc.). Now, I have a task to calculate these pices to total sums in the footer.
I already know in which columns what amounts and the ordinal number of these columns for a every user. The simplest thing left — to put these sums in the footer. To do this, I first need to create the required number of footer columns. Simple task, but!
I use a drawCallback method *:
drawCallback {
string = innerHTML(needNode).repeat(x_times)
...
}
...and my footer is works.
Then I calculated the page total and I did
window.setTimeout(function(){
$( api.column( columnNumber ).footer() ).html(pageTotal);
},3000);
...but I didn't see any result in empty footer...
What am I doing wrong?
*I cannot use the footerCallback method, because it contain no required object for counting columns.
**If I create a footer manually in HTML, then the right result will be displayed in the correct column. But the footer will be displayed twice: my "tfoot" and automatically created table "dataTables_scrollFoot".
I used the setTimeout() for enough time to create the footer. It works, but does no need effect :(
Help me please. Any help would be appreciated.
...........

Confirmation Draw has completed

I have created a custom button that will allow users to select with columns to output to CSV so the button is not created as part of the table initialization. I have a modal that pops up with checkboxes created off the column headers for selection. It is worth noting I have regex search on each column header. The issue is I am using server side processing and as a result the only exported rows are those visible. As a work around I have set it up to get the page.info().recordsDisplay and set the length of the page to that and draw. The modal pops up and says it is loading data from server once table is fully populated the HTML of the modal will change to the checkboxes for export. Once exported the table is reverted back to the default length. What I need to do is capture when the rows are fully rendered so I can do the HTML switch. Right now I am setting a timeout. The data can take a while to populate as there are some 13k rows if now search is applied. What is the best way to do this and is there a more efficient way?
var tableHeaders = [];
var table = $('#example').DataTable().columns().every( function () {
tableHeaders.push( $(this.header()).text() );
});
var pageLength = table.page.info().length;
table.context['0']._iDisplayLength = table.page.info().recordsDisplay;
table.draw();
There could be an issue with server-side processing parameters start/length that define the portion of data being requested from the server upon each draw.
If your source data has huge number of rows, chances are they're not sent all at once to make use of server-side processing. So, you can try to manipulate those parameters.
Alternatively, you may try to make use of draw event fired upon each redraw.

PEGA SLIDER - and get refresh property

I got a requirement to do a slider in PEGA.
The issue is that I do not manage to get the field/property refreshed with the slider value. I need to use this property in a declare expression and in conditional visibility (layout).
I am looking for something like the autocomplete where the value is refresh without submitting.
Any idear will be welcome.
THX.
Ok, I have solved the issue. In order to actualise the property .Amount outside the layout, I needed to configure an action on the first layout. The one holding the slider. In this layout -> in actions : add an event: Change and Add an Action : Refresh-This section / Target Section.
The value is then dynamicly refreshed in the clipboard too.
PS : in order to have different step value inside the same slider (ex: from 0 to 10 step = 1, form 10 to 30 step = 3 ... ) just use a property in the Slider Parameters 'step' of the slider and link this property to a declare expression. Within the declare expression you can configure as much step as you want.

How can I remove the search bar at footer added to top?

I want to move the search bar which is at bottom of the data table in admin template to top ..
as this is defined in javascript .. any suggestion pls..
Taking this piece of code from the link you provided.
/*
* Set DOM structure for table controls
* #url http://www.datatables.net/examples/basic_init/dom.html
*/
sDom: '<"block-controls"<"controls-buttons"p>>rti<"block-footer clearfix"lf>',
Here you can see this sDom right. Thats the option in datatable used to set the Table structure and to place the sections accordingly. I would suggest you to take a look at Datatables Dom Settings
The letters you see in the settings are p , r,t, i, l, f. They actually mean
p - pagination control
r - processing display element
t - The table!
i - Table information summary
l - length changing input control
f - filtering input
So by replacing this Dom settings you should be able to place the items as you wish.
So what you would need is .
sDom: 'lftir'
Add the div's and styling accordingly as explained in the Markup and Styling in the above provided link.

How to get the selected entry in WebDynpro ABAP table?

I have a webdynpro containing a table displaying numerous lines. After the user clicks the delete button I want to delete the selected line of the table.
My problem right now is, that I don't know how to implement this in the event-call.
How can I identify the selected line of the table?
If by "table" you mean an editable ALV, there's a preset function for this. Take a look at http://help.sap.com/saphelp_nw04s/helpdata/EN/5f/ec57c72a1349c8bfdda56d976e9399/frameset.htm and http://help.sap.com/saphelp_nw04s/helpdata/EN/5f/ec57c72a1349c8bfdda56d976e9399/frameset.htm For details on how to process the selection manually, see http://help.sap.com/saphelp_nw04s/helpdata/EN/5f/ec57c72a1349c8bfdda56d976e9399/frameset.htm.
I finally got the solution:
In the button event implement the following, to access the node and finally the id-value:
method ONACTIONZSS10_15_ONDELETE .
DATA ls_cust type wd_this->element_IT_Cust.
DATA lo_nd_cust TYPE REF TO if_wd_context_node.
DATA lo_el_cust TYPE REF TO if_wd_context_element.
" Get the selected element
lo_nd_cust = wd_context->get_child_node( name = 'IT_CUST' ).
lo_el_cust = lo_nd_cust->get_element( ).
" Get the attributes of the node-element
lo_el_cust->get_static_attributes(
IMPORTING
static_attributes = ls_cust ).
" Call the delete-function
CALL FUNCTION 'ZSS10_15_CUST_FM_DELETE'
EXPORTING
custid = ls_cust-ID
.
endmethod.