Long-term homeless solutions call by Wales Audit Office
More needs to be done by councils in Wales to prevent homelessness, a watchdog has warned.
The Wales Audit Office (WAO) also said more people had been under threat of homelessness and there had been a rise in use of temporary accommodation.
It said despite extra funding, people in Wales received very different help depending on where they lived.
Councils said they were committed to preventing homelessness despite numbers rising and cuts to council budgets.
A new housing law from 2014 requires more preventative work to be done by Welsh councils to reduce homelessness, but the WAO report said some councils and partner organisations had not made the necessary changes to prevent it.
Auditor General Huw Vaughan-Thomas said local authorities continued to focus on managing people in crisis rather than stopping it from happening.
The report found there had been a 26.3% drop in real terms over six years on how much all Welsh local authorities are spending on homelessness and housing advice services.
This ranged from a 76% cut in Cardiff to a 49.7% rise in Merthyr Tydfil.
- Number of rough sleepers doubles in Cardiff
- Homelessness 'could rise by a third'
- English councils 'buying one-way tickets' for homeless
"To truly prevent homelessness, public bodies need to take a long-term view and work with other organisations to really tackle the issues that cause homelessness," said Mr Vaughan-Thomas.
"This requires a focus on, for example, better educational attainment, access to employment, well-planned transition when leaving care and access to welfare benefits".
The report said reductions in council spending had been offset by Welsh Government grant funding but "not all authorities are using the grant to develop sustainable approaches to tackling homelessness".
The report also examined performance indicators, including how well councils were doing in preventing homelessness.
The best councils delivered action in 70% of cases but that dropped to below 50% in some cases.
One of the report's authors, Nick Selwyn said: "The best local authorities have changed how they provide services and really skilled their staff to deal with the new demands on services, but that's not uniform and in some areas there are some real challenges."
The Welsh Local Government Association said the report rightly recognised the root causes of homelessness were often complex and challenging.
"The changes to homelessness legislation in Wales mean that local authorities are helping more households by preventing them becoming homeless" a spokesman said.
"Across Wales there has been an increase in the numbers of people approaching their local authority for assistance."
The WLGA said new flexible funding arrangements from April would help councils bring innovative approaches to improve services.
Cardiff council said it took a proactive approach to tackling homelessness and has not placed any households in bed and breakfast accommodation since 2006.
It insisted its spend had remained "fairly consistent" in the six years to 2015-16 and further investment was made in the current year.
"We are unable to reconcile our figures with those quoted in the [WAO] report," said a spokesman.
"It appears that an amount of up to £3.4m per annum, paid to the council in relation to a contract to house asylum seekers, has been included in these figures.
"This contract did not relate to Cardiff's homelessness duty and as the contract ended during the period this makes it appear that there has been a large reduction in the spend on homelessness services which is not the case."