Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
comando sql
#2
Hi,

This functionality is still a WIP.

For the reporting extension to work correctly with the SQL command there are some rules that must be respected.

  • each column must have an alias that is the module name followed by the field label with all spaces substituted by underscores.
  • the last column must be the crmid of the record of the row with an alias of LBL_ACTION
  • you must select the main module of the SQL command when creating the report in order to support adhoc conditions. THIS IS IMPORTANT
  • you cannot use conditions on groups (having)
Here is an example:


Code:
select assetname as 'Assets_Asset_Name', serialnumber as 'Assets_Serial_Number', vtiger_crmentity.crmid AS "LBL_ACTION"
from vtiger_assets
inner join vtiger_crmentity on crmid=assetsid where assetname like 's%'

As you can see there is a "where" condition and it will work if you select Assets as the main module of the direct SQL.

I have planned and already started a blog series on the reporting functionality which I will release soon.

Give it a try and let me know how it goes.
Joe
TSolucio
Reply


Messages In This Thread
comando sql - gmarcog - 01-30-2018, 01:16 PM
RE: comando sql - joebordes - 01-30-2018, 10:13 PM
RE: comando sql - gmarcog - 01-31-2018, 11:43 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)