Hi David,
I place my JSON file for my Report object on my cloud server and it didn't load the report at all. It kept showing Loading....
However if I follow the sample Report program and place it in my local directory and add it to my file manger it works perfectly. Does this means that JSON file can only be placed in the apps directory?
Thank you.
Best regards,
Danny Cheah
Hi David,
I am looking at using HTTPClient sample. I believe it should work.
Thank you.
Best regards,
Danny Cheah
Hello Danny,
If you run the app in a browser like Firefox, with the developers console opened, probably you can see what happen. Probably it's a CORS related issue: the server must provide the right CORS permissions that allows the app to reach the JSON file.
You can take a look at this website, since the possible configuration of the server depend on the server itself, it's not the same for all the posible servers.
If you can't configure the server to provide the right CORS permissions, it's probably possible to do it using some "bridge" for the JSON file, so, for example, we can prepare a PHP script, who read the JSON file and serve it to the app: then we can set the CORS permissions in the PHP script.
You can see various examples of setting the CORS permissions from PHP scripts, since are used in various app samples, mostly "Report*" samples. Anyway this is the code that can be used, more or less:
Hi David
I managed to resolve the problem already. Thank you for your pointers as to where to look. If you did not mentioned about CORS, I would not have know that CORS is the problem.
Thank you.
Best regards,
Danny Cheah
Hello Danny,
Yes; remember to try the app in a browser like Firefox, with the developer console opened: unfortunately the AB debugger can't tell us about requests and the possible success or error on them, but the developer console of Firefox, for example, can do it, and, in fact,can tell us lot of other things, so we can use the internal debugger for take a quick look, but, if wanted more information, we need to run the app in a browser like Firefox, and we can do it just by press the right IDE button. So just temember to try the app in that way.
Yes David. I'm beginning to learn more and more each day and getting better now. Even though all this is new to me but the challenges makes it all worth the effort. Thanks a million. I hope that my application can go live this Sunday.
Thank you.
Best regards,
Danny Cheah
Hello Danny,
Very good! But take your time if possible! Worries are good for nothing! :-)
Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.