V
vincelts
Hi,
Presently I am assigned by my company to use Microsoft Access 2000 to
produce some Sales Management Reports.I am able to generate the
results using Access Crosstab Query.However , when I try to use the
crosstab query to incorporate to the Access Report Design, I could not
create the same result.
The SQL statements for that were generatedfrom the Access Query are as
follows:
PARAMETERS StartDate Value, EndDate Value;
TRANSFORM Sum([Sales By Customer By Product-Summary].UCSAAM) AS Amount
SELECT [Sales By Customer By Product-Summary].[Main Cust], [Sales By
Customer By Product-Summary].YearMth, [Sales By Customer By Product-
Summary].OKCUNM AS [Customer Name], [Sales By Customer By Product-
Summary].UCCUNO, Sum([Sales By Customer By Product-Summary].UCSAAM) AS
[Total Sales Amount]
FROM [Sales By Customer By Product-Summary]
WHERE ((([Sales By Customer By Product-Summary].YearMth) Between
[StartDate] And [EndDate]))
GROUP BY [Sales By Customer By Product-Summary].[Main Cust], [Sales By
Customer By Product-Summary].YearMth, [Sales By Customer By Product-
Summary].OKCUNM, [Sales By Customer By Product-Summary].UCCUNO, [Sales
By Customer By Product-Summary].OKCUNM, [Sales By Customer By Product-
Summary].[Main Cust], [Sales By Customer By Product-Summary].YearMth
ORDER BY [Sales By Customer By Product-Summary].[Main Cust], [Sales By
Customer By Product-Summary].YearMth, [Sales By Customer By Product-
Summary].OKCUNM
PIVOT [Sales By Customer By Product-Summary].CTTX40;
The final results should be able the output of:
1)Total Sales amount for each Customer
2)Total Sales for each product group
Eg;the coulmns will be:
customer | Cust No | main Cust | YYYYMM| Total Sales| Fs| CS| IM| Tool
|......
The column from FS onwards are the dynamic columns that depends on the
selection from the range in YYYYMM. And the Total Sales=summation of
the Product(fS+CS+...) Sales Value.
Since the product groups are not fixed,please advise how I can create
a Dynamic Crosstab report.
Thank You
Presently I am assigned by my company to use Microsoft Access 2000 to
produce some Sales Management Reports.I am able to generate the
results using Access Crosstab Query.However , when I try to use the
crosstab query to incorporate to the Access Report Design, I could not
create the same result.
The SQL statements for that were generatedfrom the Access Query are as
follows:
PARAMETERS StartDate Value, EndDate Value;
TRANSFORM Sum([Sales By Customer By Product-Summary].UCSAAM) AS Amount
SELECT [Sales By Customer By Product-Summary].[Main Cust], [Sales By
Customer By Product-Summary].YearMth, [Sales By Customer By Product-
Summary].OKCUNM AS [Customer Name], [Sales By Customer By Product-
Summary].UCCUNO, Sum([Sales By Customer By Product-Summary].UCSAAM) AS
[Total Sales Amount]
FROM [Sales By Customer By Product-Summary]
WHERE ((([Sales By Customer By Product-Summary].YearMth) Between
[StartDate] And [EndDate]))
GROUP BY [Sales By Customer By Product-Summary].[Main Cust], [Sales By
Customer By Product-Summary].YearMth, [Sales By Customer By Product-
Summary].OKCUNM, [Sales By Customer By Product-Summary].UCCUNO, [Sales
By Customer By Product-Summary].OKCUNM, [Sales By Customer By Product-
Summary].[Main Cust], [Sales By Customer By Product-Summary].YearMth
ORDER BY [Sales By Customer By Product-Summary].[Main Cust], [Sales By
Customer By Product-Summary].YearMth, [Sales By Customer By Product-
Summary].OKCUNM
PIVOT [Sales By Customer By Product-Summary].CTTX40;
The final results should be able the output of:
1)Total Sales amount for each Customer
2)Total Sales for each product group
Eg;the coulmns will be:
customer | Cust No | main Cust | YYYYMM| Total Sales| Fs| CS| IM| Tool
|......
The column from FS onwards are the dynamic columns that depends on the
selection from the range in YYYYMM. And the Total Sales=summation of
the Product(fS+CS+...) Sales Value.
Since the product groups are not fixed,please advise how I can create
a Dynamic Crosstab report.
Thank You