What is the condition that the Generate Report Button shows and the report is set as a background report even after the disable prepared report flag is unchecked both in edit report and role permission for page and report.
I am working on V12 latest pull as of posting this question and i notice the randomness of the prepared reports .
Some Reports have the generate report button present and some dont even though they have the same flags set ,
even default reports like Stock ledger dont have the prepared report button when its the most heavy on server report .
Is there like a coding schema which enables it, i didnt see any clear differences though for this between stock ledger (not background report by default) or item-wise sales history (not background report by default) and say customer credit balance(prepared report) even though the settings for both are the same .
Yes, there is a Hidden check flag in report list called - prepared_report .
Its right below the disable_prepared_report flag ,
this is the actual one which is controlling the things , but its hidden and its toggle is linked with the disable check which doesn’t always work…
So you have to edit the doctype (core docs cannot be customized ) , you will need developer mode on for it , and make that flag unhidden and not-read only
Then toggle it to get instant changes between prepared and non-preapred reports,
Its strange why the entire code depends on this hidden flag (had to do a lot of digging to find out ) but the toggle of it is based on another flag and not always there ,
It was a flag in old version and the functionality was not properly migrated to new one with new flag .
Anyway you have to do this to get the reports to behave as you want.
Cheers .