Another git pull and bench update got it working. Parameters are taken dynamically now, its a breeze.
The various methods of setting the parameter is confusing though. Making it a single option would make it easier for the users or a consolidated description(of the multiple methods and the precedence that is followed, the way you have explained in your reply), in the form or Readme would be helpful.
Highly appreciate your guidance all through. Thank you
Hi,
Am back with another question. I need to specify the no. of rows returned by a query using LIMIT as follows:
select x,y,z from tname LIMIT $P!{no_of_rows}
This just needs to be a placeholder. I stored this value in a column and used 'āis doctype id" and mentioned the column name in "Field doctype valueā , but didnāt work. It throws an SQL exception with the query as
That is fixed. Iāam trying to fix the other error, but that has to do with java and jasperreports itself and iāam having some problems in understand where is the error.
I thinks i solved the select x,y,z from tname LIMIT problem.
The problem is in connection permissions. Mysql/Mariadb does not let to connect to localhost but let to connect to 127.0.0.1 by default so i changed. If you have mysql server in the same physical machine then it is ok, just remove, if it is your case, ādb_hostā: ālocalhostā, from āyour folder siteā/site_config.json.
Update and let me know.
Note: You must set the parameter to Integer in jrxml: <parameter name="no_of_rows" class="java.lang.Integer"/>
Yes, mysql server is in the same machine. But,am yet to get past " object of type ālongā has no len()" error. I see that you have made changes in ln 281 to handle this. But the error occurs earlier, at ln 271
This is the same report that has LIMIT in its main query. The param is set to 'is doctype id" and field doctype value set to a column of type int(8). The parameter is also set to java.lang.Integer in jrxml.
This problem was identified long time ago but iāam being postpone.
I put the python types to be converted to String with str, JasperBase.py line 283. I will see if this is enough, because if you set the parameter type in jrxml file correctly java will convert it to the correct typeā¦ i hope!
The other solution is to convert every python type to the equivalent java type when possible. But i thinks my solution is best. Convert every python type to String and let java convert type String to the correct type.
Can you help me with the command to install pyjnius directly, instead of ābench update --requirementsā. I can run ābench update --buildā after pyjnius is installed.
I simply want to avoid pulling updates, while installing jasper.