From 865b20cd726255fcd65071e0b6e4888a1539dce3 Mon Sep 17 00:00:00 2001 From: Jos Groot Lipman Date: Wed, 16 May 2018 12:07:23 +0000 Subject: [PATCH] FSN#53284 api2 offset ook ondersteunen voor rapportages svn path=/Website/branches/v2017.3/; revision=37919 --- APPL/API2/model_reports.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/APPL/API2/model_reports.inc b/APPL/API2/model_reports.inc index b65dfac952..d7ed4c925c 100644 --- a/APPL/API2/model_reports.inc +++ b/APPL/API2/model_reports.inc @@ -540,7 +540,12 @@ function report_GET(params) order.push(i+1) sql += " ORDER BY " + order.join(", "); - var maxcnt = params.filter.showall==1?S("qp_maxrows2"): (params.filter.ismobile?S("qp_maxrows_mobile"):S("qp_maxrows")); + if (params.filter.limit > 0) + maxcnt = parseInt(params.filter.limit, 10); + else + var maxcnt = params.filter.showall==1?S("qp_maxrows2"): (params.filter.ismobile?S("qp_maxrows_mobile"):S("qp_maxrows")); + if (params.filter.offset > 0) + maxcnt += parseInt(params.filter.offset, 10); if (params.filter.scf_pivot == 1) params.filter.nolimit = true; var sql = "SELECT * FROM (" + sql + ")"