Hi, I am new to SuiteCRM. I use Kreport for generating reports from two tables using where clause. It is not working.
My query is:
$dictionary[‘go_dropdown_custom_values’][‘fields’][‘LBL_COUNTRY’] = array(
‘name’ => ‘LBL_COUNTRY’,
‘vname’ => ‘LBL_COUNTRY’,
‘type’ => ‘kreporter’,
‘source’ => ‘non-db’,
‘kreporttype’ => ‘varchar’,
‘eval’=>‘SELECT country.countryname,go_dropdown_custom_values.country FROM country,go_dropdown_custom_values WHERE country.countryname={t}.country AND country.id=go_dropdown_custom_values.country’
);
Country Table:
±—±------------+
| id | countryname |
±—±------------+
| 1 | India |
| 2 | Canada |
| 3 | USA |
| 4 | Scotland |
| 5 | Switzerland |
| 6 | Netherland |
| 7 | Norway |
±—±------------+
go_Drpdown_Values Table:
| id | name | date_entered | date_modified | modified_user_id | created_by | description | deleted | assigned_user_id | mobile | country |
±-------------------------------------±-------±--------------------±--------------------±-----------------±-----------±------------±--------±-----------------±-----------±--------+
| 75aaf777-92f5-95a9-15f7-5a65cce2f48e | Jowin | 2018-01-22 11:37:09 | 2018-01-23 11:51:25 | 1 | 1 | NULL | 0 | 1 | 7410852963 | 1 |
| d76c65d0-d602-88f4-18d0-5a65ccd2bc0e | Joel | 2018-01-22 11:36:42 | 2018-01-23 11:51:38 | 1 | 1 | NULL | 0 | 1 | 7894561230 | 5 |
| e5e7267c-1cbf-0ddd-bbd8-5a61f397dfac | Antony | 2018-01-19 13:33:34 | 2018-01-23 13:36:10 | 1 | 1 | NULL | 0 | 1 | 9876543210 | 1 |
| ed48c777-0d18-ea1e-776e-5a65cc6697cf | Rayan | 2018-01-22 11:36:26 | 2018-01-23 13:36:20 | 1 | 1 | NULL | 0 | 1 | 9876543210 | 1 |
±-------------------------------------±-------±--------------------±--------------------±-----------------±-----------±------------±--------±-----------------±-----------±--------+
In Kreport, I use Select Statement by Typing Country name. but it is not working
I need result like:
ID Name mobile country
1 A 1234567890 C1
2 B 9876543210 C2