zbisho
October 26, 2017, 2:31pm
#1
I am trying to create a query report with the following query
select
tabGL Entry
.posting_date
,tabDynamic Link
.parent
,tabAddress
.name
,tabAddress
.address_line1
,tabAddress
.address_line2
from
tabGL Entry
,tabDynamic Link
,tabAddress
where
tabDynamic Link
.link_name = tabGL Entry
.party and
tabAddress
.name = tabDynamic Link
.parent and
tabDynamic Link
.link_doctype = “Supplier”
;
This works fine on the mysql console, but it displayes as the picture below when I run the report from ERPNext
I appreciate any feedback on why it wouldn’t display columns from multiple tables, even though the query does fetch the required records
Can you see any error in the web console?
Can you check this out?
lab_test_list = get_lab_test(filters)
columns = get_columns()
if not lab_test_list:
msgprint(_("No record found"))
return columns, lab_test_list
data = []
for lab_test in lab_test_list:
row = [ lab_test.test_name, lab_test.patient, lab_test.physician, lab_test.invoice, lab_test.status, lab_test.result_date, lab_test.department]
data.append(row)
return columns, data
def get_columns():
columns = [
_("Test") + ":Data:120",
_("Patient") + ":Link/Patient:180",
_("Doctor") + ":Link/Physician:120",
Ps: Return the data object as a list of list (no a list of dict)
zbisho
October 28, 2017, 10:26am
#4
Hi, thank you for your reply, but I’m not doing this as a script (Py) report, this is a query report in report writer tool.
Hello @zbisho ,
Can you share a screen shot of your real query?
I tested out and seems to be working fine…
zbisho
October 29, 2017, 9:28am
#6
I changed the query to include column formatting, using the AS clause, and that seemed to have fixed it for now…
Thanks a million for your help and interest.