Capture Empty Datasource in Viewer
Posted: Fri Jan 17, 2025 5:09 pm
How can I capture event in which I can check if datasource is empty?
On Report.onBeginRender is not possible. isEmpty from dictionario.datasources.getByIndex(0) return true, but it has rows. There is any event on I can check this values?
Thansk. This is my html:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>{{$title}} - {{config('app.name')}}</title>
<?php
$js->renderHtml();
?>
<script type="text/javascript">
<?php
$handler->renderHtml();
?>
function onBeforeRender(event)
{
console.debug(event.report); <--- here event.report.dictionario.datasources.getByIndex(0).isEmpty return true
}
function onLoad() {
<?php
$viewer->renderHtml('viewerContent');
?>
}
</script>
</head>
<body onload="onLoad();">
<div id="viewerContent"></div>
</body>
</html>
On Report.onBeginRender is not possible. isEmpty from dictionario.datasources.getByIndex(0) return true, but it has rows. There is any event on I can check this values?
Thansk. This is my html:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>{{$title}} - {{config('app.name')}}</title>
<?php
$js->renderHtml();
?>
<script type="text/javascript">
<?php
$handler->renderHtml();
?>
function onBeforeRender(event)
{
console.debug(event.report); <--- here event.report.dictionario.datasources.getByIndex(0).isEmpty return true
}
function onLoad() {
<?php
$viewer->renderHtml('viewerContent');
?>
}
</script>
</head>
<body onload="onLoad();">
<div id="viewerContent"></div>
</body>
</html>