Topic: How to add a new parameter to custom report
I am trying to create a custom report for inventory conversion.
I added a parameter in custom report as below
global $reports;
$reports->addReport(RC_INVENTORY, '_inventory_conversion', _('Invetory Conversion'),
array( _('Start Date') => 'DATEBEGINM',
_('End Date') => 'DATEENDM',
_('Inventory Category') => 'CATEGORIES',
_('Location') => 'LOCATIONS',
_('Sales Folk') => 'SALESMEN',
_('Conversion UOM') => 'UOM',
_('Show Service Items') => 'YES_NO',
_('Comments') => 'TEXTBOX',
_('Orientation') => 'ORIENTATION',
_('Destination') => 'DESTINATION'));
The new Parameter is UOM
Then I added following lines in reports_classes.inc
case 'UOM':
return stock_units_list(_('Units of Measure:'), 'units', null);
But When I try to run report it gives following error
Unknown report parameter type:UOM
D:\xampp\htdocs\boxygen\includes\ui\ui_msgs.inc:14: trigger_error('Unknown report parameter type:UOM','256')
D:\xampp\htdocs\boxygen\reporting\includes\reports_classes.inc:153: display_error('Unknown report parameter type:UOM')
D:\xampp\htdocs\boxygen\reporting\includes\reports_classes.inc:103: (BoxReports Object)->getOptions((Array[10]),'_inventory_conversion')
D:\xampp\htdocs\boxygen\reporting\reports_main.php:530: (BoxReports Object)->getDisplay()
Please see the screen shot
What am I missing?