Stock balance report - need single line display

Hi Team,
I need single line display for stock balance report with each warehouse in columns and total as last column. Currently, each warehouse is in rows like in below screenshot. Can I convert this to single line using query report?

Small Reference: Stock report issue - #4 by NCP

I need each warehouse qty in separate column for an item, eg. below
Item wh1 qty wh2qty total
x 5 1 6
y 1 0 1

That for, you have to make a custom server script report.

Also check the default report like “Warehouse wise Item Balance Age and Value”. This is the report you need.