It is currently 10 December 2022, 6:38 Advanced search

Forms not properly unloading/loading....

Questions and answers on how to best use Instant Developer

Re: Forms not properly unloading/loading....

Postby john w » 7 June 2022, 11:32

InDe support looked at my application. They determined the issue was with the chart being null. They were able to resolve the issue by adding a timer to the custom code being used. The code is necessary to get the graph from the form to the report. Anyway, they added the 'window.setTimeout' function and everything is working as designed. You can see the working script below.

if (this.Enabled) {
window.setTimeout(function() {
var my_chart = pthis.wrapper.getChart();
var img = my_chart.getImageURI();
RD3_SendCommand("savegraph", "data=" + encodeURIComponent (img));
//console.log("savegraph, data = " + encodeURIComponent (img));
}, 300);

Thanks to Instant Developer for helping me get this sorted! I would have never determined this was the solution.

John W
User avatar
john w
Posts: 714
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Forms not properly unloading/loading....

Postby ljwilson » 7 June 2022, 12:19


Thanks for sharing! I have this code in several apps, and haven't noticed this issue, but will add the timer as a safety-measure just in case.

Posts: 678
Joined: 26 November 2013, 14:15


Return to Tips & Tricks

Who is online

Users browsing this forum: Majestic-12 [Bot] and 11 guests