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

See Error

What am I missing?

Post's attachments

ReportUOMerror.jpg 66.8 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.
www.boxygen.pk

Re: How to add a new parameter to custom report

Hello I need help on this

www.boxygen.pk

Re: How to add a new parameter to custom report

I guess you have missed something in the parameters list first in the report function.

/Joe

Re: How to add a new parameter to custom report

The changed order of the parameters may have altered functioning of your report.