diff --git a/APPL/API2/model_reports.inc b/APPL/API2/model_reports.inc
index d750d14ba9..046f85cbb4 100644
--- a/APPL/API2/model_reports.inc
+++ b/APPL/API2/model_reports.inc
@@ -201,12 +201,21 @@ function model_reports(fac_usrrap_key)
{
var mtc = usrrap.urllink.match(/(.*)\{(.*)\}/);
if (!mtc || mtc.length != 3)
- shared.simpel_page("Urllink {0} in rapport moet formaat 'xxxx/yyy.asp?key={keyveld}' hebben.".format(usrrap.urllink));
+ shared.simpel_page("'{0}' {1} in report must have format 'xxxx/yyy.asp?key={keyveld}'".format(L("lcl_usrrap_urllink"), usrrap.urllink));
model.list.default_url = mtc[1];
// Voorkom dat hij binnen menu-wrapper wordt getoond
if (mtc[1].indexOf("?u=") == 0)
model.list.default_url = "?internal=1&" + mtc[1].substring(1);
keyfield = mtc[2];
+
+ var found = false;
+ for (var i = 0; !found && i < usrrap.columns.length; i++)
+ {
+ if (keyfield == usrrap.columns[i].name)
+ found = true;
+ }
+ if (!found)
+ shared.simpel_page("Keyveld {0} in '{1}' {2} does not exist as a column.".format(keyfield, L("lcl_usrrap_urllink"), usrrap.urllink));
}
if (usrrap.authorization)