Issue with chart app started from button on grid toolbar

Hi All,

I have a grid that displays a profit and loss. The SQL returns a numeric value of each income/expense as either a positive or a negative (as you would expect) that value is then used to make two columns - Debit and Credit.

This works well.

On the toolbar of that grid, I have a button called Graph, and the PHP code under that button is sc_redir(‘chart_pl’,"_parent");

In the app chart_pl, the SQL statement has been adjusted to return the same information, but this time all of the rows show a positive number. This has been tested in a SQL testing situation and works.

The graph, however, is showing both positive and negative values. It is almost as if the chart app’s SQL statement is being ignored, and the grid SQL statement is being used.

Any ideas.

Thanks

Tony

graph_001.jpg