Uncaught TypeError: Cannot read property ‘locale’ of undefined.
This happens when I set the locale to ‘India’ or ‘Ask’. robj in the following code seems to be undefined.
jasper.check_for_ask_param=function(rname,page,callback){
var robj=jasper.get_jasperdoc_from_name(rname,page);
var ret;
if(robj.locale===“Ask”||(robj.params&&robj.params.length>0)){
ret=jasper.make_dialog(robj,rname+" parameters",callback);}
else{
callback({abort:false});}};
The report however gets listed in the top right corner without any error.
Any clues??
Hi,
I wanted to check the report generation from button click with one of the example reports. I had created Cherry based on your instructions in config.txt. It wasn’t there initially, I created it later. I am also able to generate it from the top right corner in User page…attached are the screenshots
Thanks a bunch, works like a charm. I need your help in few other things:
How do I upload the jrxml files that has subreports? I get “Remove first the file (None) associated with this document or (None) is a wrong parent.” irrespective of the order I upload the files(parent first and then subreport or vice versa).
One of my jrxml is not getting compiled and .jasper file is not created on uploading to Jasper Report. However the jrxml gets compiled without any problems in the Jasper studio. Is there a way I can track the issue?..The console just throws
If I allow the report to ‘Ask’ for locale at runtime, I have no issues and the report gets downloaded easily.However, if I select the Locale as ‘India’ while creating a Jasper Report, I get the following error in the js console:
"Uncaught TypeError: Cannot read property ‘try_COA’ of undefined "
I sure would like to avoid this prompt at runtime. How should I do it?
Your quick response is much appreciated. thanks again.
Hi. Thanks for your support, i appreciate you to let me know of any error.
I will see if anything is wrong, but meanwhile i need to check if you are doing things write.
To answer to your 1. question, tell me: Are you putting one report inside another, like this:
The error you get is because you are putting another report and you already has one. You have to put the 2º report inside the first report, as a child in the tree structure.
For the last question. If you see my last image, i upload /Custom Cherry Local 2/compiled/localizationdemo.properties. My Jasper module does not check if localization.properties is uploaded because you can put that in java environment variable and has one general file. So, if you has localization and don’t provide you will get some errors.
Am able to add .jpg and localizaationdemo.properties to the reports without any problems and it works fine. They dont get attached as a child though. see attachment:
near the upload button only the jrxml gets listed as an attached file.
However in my case, the report I have designed in Jasper studio has a subreport, which is another jrxml. May be because the files that I attach don’t go as a child, am not able to attach 2 .jrxml files.
Also, if I upload the parent report first and save, it throws error that the subreport is missing.
Yes, I see the tree in Cherry. But, with my subreport file, am not able to add the child even if I click on parent and then click upload. I get the same error…“Remove first the file (None) associated with this document or (None) is a wrong parent.”…Am i missing anything else?
Thanks much. I could now attach subreports without any error.
I need more clarification on setting the locale. It is not a parameter in my .jrxml file. It is set only when I create a Jasper Report in Erpnext. Kindly clarify why it wouldn’t accept a value I select in Jasper Report but works fine when I allow it to ‘Ask’ at runtime.
I replied too soon. Though it lets me upload the subreport, at run time, it gives JRException: Resource not found at :compiled/childlabel.jasper(see attached image)
To answer to localization question; you need to have one localization file for every language you want to support in your report. The name of the file need to be like this: anyname_es.properties or anyname_ca_ES.properties - this is for spain.
You can upload to jasper folder or you can put in your java classpath. Of course if you have many translation the preferred way is in classpath.
In the case of subreport error:
I need to know if the file exists childlabel.jasper in the compiled folder.