Topic: Customer Balances by Dimension

Hi all,

I use the dimension module and all customers are in dimensions. I want to display customer balances by dimensions.

I've added

_('Dimension')." " => 'DIMENSIONS1',

to _('Customer &Balances') in reporting/reports_main.php and have modified the reporting/rep101.php in two areas

$dimension = $_POST['PARAM_5'];

and

    
    $sql = "SELECT debtor_no, name, curr_code FROM ".TB_PREF."debtors_master ";
    if ($fromcust != ALL_TEXT)
        $sql .= "WHERE debtor_no=".db_escape($fromcust);
    if ($dimension != 0) 
        $sql .= " AND dimension_id=".$dimension;// I added this line
    $sql .= " ORDER BY name";
    $result = db_query($sql, "The customers could not be retrieved");

When I select a dimension and click display, nothing happens - no pdf report. But if I don't select a dimension on the report page, the pdf report displays fine.

What am I doing wrong?

Thanks in advance.

Re: Customer Balances by Dimension

If you add parameters make sure they are referenced correctly in the code where they are used.