Adding report with another

A

Alan

i have this code as a wrapper

strReportName = "Yearly Sales Report"
lOrderCount = DCountWrapper("*", "Sales Analysis", "[Year]=" &
Me.cbYear)

which then feed into my Report below

Private Sub Report_Open(Cancel As Integer)
On Error GoTo ErrorHandler

Dim strSQL As String

If IsNull(TempVars![Display]) Or IsNull(TempVars![Group By]) Or
IsNull(TempVars![Year]) Then
DoCmd.OpenForm "Actual Report"
Cancel = True
Exit Sub
End If

strSQL = "TRANSFORM CCur(Nz(Sum([Amount]),0)) AS X"
strSQL = strSQL & " SELECT [" & TempVars![Display] & "] as
SalesGroupingField FROM [Sales Analysis] "
strSQL = strSQL & " Where [Year]=" & TempVars![Year]
strSQL = strSQL & " GROUP BY [" & TempVars![Group By] & "], [" &
TempVars![Display] & "]"
strSQL = strSQL & " Pivot [Sales Analysis].[Quarter] In (1,2,3,4)"

Me.RecordSource = strSQL
Me.SalesGroupingField_Label.Caption = TempVars![Display]


I have a second table that needs to be compare against the orginal data by
the same paramteres

The Report is a forecast name 1a11f how could i add this into that report??

for example

At present i have

customer No Q1 Q2 Q3 Q4
C0001 100 100 100 100

What i need is

customer No Q1 Q1F Q2 Q2F Q3 Q3F Q4 Q4F
C0001 100 200 100 500 100 100 100
200
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top