I have been struggling with a good design for combining 2 crosstab qrys CrosstabActual and CrosstabBudget to be used in a single report. The report layout is to have 12 months in the column heading,Income Statement Accounts as row headings and Amounts as values. I need the Actual values to display in one row above the budget values for many income statement line items. Each Crosstab works fine with exception of placeholders for months where no actual data yet exists. Any advice on combining these two croosstabs to be used as one object for a report reference would be helpful. Thank you.
CrosstabActual:
TRANSFORM Sum(BranchMasterTbl.[SumOfCurrent Period $]) AS Actual
SELECT BranchMasterTbl.ScorecardLine, BranchMasterTbl.Ctr, BranchMasterTbl.BranchName, Sum(BranchMasterTbl.[SumOfCurrent Period $]) AS YTDActual
FROM Calendar INNER JOIN BranchMasterTbl ON (Calendar.Year = BranchMasterTbl.Year) AND (Calendar.Period = BranchMasterTbl.Period)
GROUP BY BranchMasterTbl.ScorecardLine, BranchMasterTbl.Ctr, BranchMasterTbl.BranchName
PIVOT Calendar.Period;
------------------------------------------------------------
CrosstabBudget:
TRANSFORM Sum(BranchMasterTbl.[SumOfCurrent Period Budget $]) AS Budget
SELECT BranchMasterTbl.ScorecardLine, BranchMasterTbl.Ctr, BranchMasterTbl.BranchName, Sum(BranchMasterTbl.[SumOfCurrent Period Budget $]) AS YTDBudget
FROM (Calendar INNER JOIN BranchMasterTbl ON (Calendar.Year = BranchMasterTbl.Year) AND (Calendar.Period = BranchMasterTbl.Period)) INNER JOIN ChartOfAccounts ON BranchMasterTbl.Account = ChartOfAccounts.Account
GROUP BY BranchMasterTbl.ScorecardLine, BranchMasterTbl.Ctr, BranchMasterTbl.BranchName
PIVOT Calendar.Period;
CrosstabActual:
TRANSFORM Sum(BranchMasterTbl.[SumOfCurrent Period $]) AS Actual
SELECT BranchMasterTbl.ScorecardLine, BranchMasterTbl.Ctr, BranchMasterTbl.BranchName, Sum(BranchMasterTbl.[SumOfCurrent Period $]) AS YTDActual
FROM Calendar INNER JOIN BranchMasterTbl ON (Calendar.Year = BranchMasterTbl.Year) AND (Calendar.Period = BranchMasterTbl.Period)
GROUP BY BranchMasterTbl.ScorecardLine, BranchMasterTbl.Ctr, BranchMasterTbl.BranchName
PIVOT Calendar.Period;
------------------------------------------------------------
CrosstabBudget:
TRANSFORM Sum(BranchMasterTbl.[SumOfCurrent Period Budget $]) AS Budget
SELECT BranchMasterTbl.ScorecardLine, BranchMasterTbl.Ctr, BranchMasterTbl.BranchName, Sum(BranchMasterTbl.[SumOfCurrent Period Budget $]) AS YTDBudget
FROM (Calendar INNER JOIN BranchMasterTbl ON (Calendar.Year = BranchMasterTbl.Year) AND (Calendar.Period = BranchMasterTbl.Period)) INNER JOIN ChartOfAccounts ON BranchMasterTbl.Account = ChartOfAccounts.Account
GROUP BY BranchMasterTbl.ScorecardLine, BranchMasterTbl.Ctr, BranchMasterTbl.BranchName
PIVOT Calendar.Period;