PC Review


Reply
Thread Tools Rate Thread

Adding report with another

 
 
Alan
Guest
Posts: n/a
 
      7th Apr 2010


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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding row in a report Duane Microsoft Access 2 25th Jan 2010 04:15 PM
Adding to a Report Bob Microsoft Access Getting Started 2 17th Aug 2005 11:50 PM
Report / Sub report data source lost when adding a new sub report =?Utf-8?B?Sm9lIE1jQw==?= Microsoft Access Reports 5 4th Apr 2005 07:27 PM
Adding control to report from different report =?Utf-8?B?U2FyYWggU3RvY2t0b24=?= Microsoft Access Reports 1 28th Oct 2004 07:29 AM
Adding a sub report to a main report Robin Chapple Microsoft Access Getting Started 1 6th Jan 2004 08:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:16 AM.