Table name of custom DocType for Query Report

How do I know the table name of my custom DocType Type? When I use the DocType name as table name, I get error. I tested with a simple query like below.

select tabSales.invoice as “Invoice::120”
from tabSales

1 Like

bench mariadb , then show tables; Will list all the tables.

thanks… apparently, i have set mine in docker. i am looking at moving it to the bench. still searching how.

So I managed to find the table and it is there, but i couldnt still get it to work. what am i missing


Here is my simple query

and here is the result when I click Show Report above.

What column in ‘tabSales Invoice’ are you trying to SELECT? There are a number of tables in ERPNect with the name tabSales , none simply tabSales.

tabSales Invoice |
| tabSales Invoice Advance |
| tabSales Invoice Item |
| tabSales Invoice Payment |
| tabSales Invoice Timesheet |
| tabSales Order |
| tabSales Order Item |
| tabSales Partner |
| tabSales Partner Type |
| tabSales Person |
| tabSales Stage |
| tabSales Taxes and Charges |
| tabSales Taxes and Charges Template

This may help:

Thanks for your reply. I was able to make it work. I noticed, it was my custom Module. I joined my tabSales table with tabEmployee and used HR module in my query report and that did the trick. Not sure why my custom module keeps giving my the Server Error.

here is my working query report