This article provides you with steps to hide the map if no records found on the result page.

1. Edit the Localization

(a) Navigate to the Localizations view in the Exploring window and select the localization object used by the Report DataPage . Click on the Edit button to open the Localization wizard.

(b) Go to the Define Localization Settings screen, and select Forms/Details Pages >> Messages from the Categories panel. On the right panel, select the Element ID # 351. Enable custom text for the “No records found” message. Place the following code into the custom text area to assign a unique ID to the message:

 <div id="norecord"><h1>No records found.</h1></div>


2. Edit the Report DataPage

(a) Navigate to the DataPages view in the Exploring window and select the Report DataPage. Click Edit to open the Report wizard.

(b) Go to the Configure Results Page Fields screen, and insert a pair of Header & Footer. Paste the following code into the Footer:

<script type="text/javascript">
if (document.getElementById("norecord"))
document.getElementById("map").style.display = "none";

Make sure the div ID you have assigned (in this example “norecord”) is the same in both the Localization message and the JavaScript code.