I'm looking to create a report that takes opportunities that have a due date (oppo_proposaldue) today, tomorrow, and the day after and groups them by those three categories.
I'm getting close to what is required want with this SQL:
SELECT oppo_quoteid, oppo_ProposalDueDate, 'Today' as Day
FROM [CRM].[dbo].[Opportunity]
where CONVERT(date,oppo_ProposalDueDate) = CONVERT(date,getdate()) and oppo_deleted is null
AND oppo_status = 'In Progress'
UNION
SELECT oppo_quoteid, oppo_ProposalDueDate, 'Tomorrow' as Day
FROM [CRM].[dbo].[Opportunity]
where CONVERT(date,oppo_ProposalDueDate) = CONVERT(date,dateadd(dd,1,getdate())) and oppo_deleted is null
AND oppo_status = 'In Progress'
UNION
SELECT oppo_quoteid, oppo_ProposalDueDate, 'Two Days' as Day
FROM [CRM].[dbo].[Opportunity]
where CONVERT(date,oppo_ProposalDueDate) = CONVERT(date,dateadd(dd,2,getdate())) and oppo_deleted is null
AND oppo_status = 'In Progress'
order by oppo_ProposalDueDate
Ideally I'd like three sections to the report, Today, Tomorrow, Two Days - if not discrete sections then maybe different formatting to make it obvious where one day ends, or worst case just having the Today/Tomorrow/TwoDays column on the report.
Is this possible with the CRM reporting? I've already tried making a view with something similar to the above (with the required opp fields like _secterr, etc), but the "Reports View" checkbox disappears on me after making it.
Thanks in advance for the help!