Printing crosstab query

A

Afsaneh

Dear All,
I would like to print a cross tab query directly.I need to change the date
and title of it.but don't know How.since my cross tab query is not monthly
and my columns are changing,I can't make a report out of it, that's why I
wanna print it directly. tnx for your advice in advance.
 
A

Afsaneh

Dear duane,
I need customer names as columns and statistics of products as rows.I
managed to customize Your instance and use it. I really enjoyed undrestanding
and customizung your report especially your LEVEL trick. It wasn't confusing
at all.TNX a million.
I just have the problem of filtering my xtab query. first, when using
parameters access warns that it doesnt recognize my parameters as valid field
names or expressions. and on a parametered report from a crosstab query
,access asks for each parameter twice . again tnx for your guidance.
 
D

Duane Hookom

IMO, parameters should never be prompts. All user interaction should be
through controls on forms. Crosstab queries generally require you to set the
parameter data types in the query.
 
A

Afsaneh

my xtab query is based on another select query, and the field I wanna filter
is not on the xtab one, and when I try to filter the source one using a form
to get the parameters ,I get the message from access "the microsoft jet
database engine does not recognize '[Forms]![StaRep]![txtSal]' as a valid
field name or exp"!
here are my sql :
"SELECT QfullStationary.*, Left$(QfullStationary!EnterDate,4) AS sal,
Mid$(QfullStationary!EnterDate,5,2) AS mah, QfullStationary.OmorAlias,
QfullStationary.LEVEL, Forms!StaRep!txtSal AS Expr1
FROM QfullStationary
WHERE (((Left$([QfullStationary]![EnterDate],4))=[Forms]![StaRep]![txtSal]));"

and

TRANSFORM Sum(QStaMahSal.Qtty) AS SumOfQtty
SELECT QStaMahSal.QfullStationary.LEVEL, QStaMahSal.NameGroup,
QStaMahSal.NameKala, QStaMahSal.Moavenat, QStaMahSal.MoavenatId,
Sum(QStaMahSal.Qtty) AS [جمع تعداد]
FROM QStaMahSal
GROUP BY QStaMahSal.QfullStationary.LEVEL, QStaMahSal.NameGroup,
QStaMahSal.NameKala, QStaMahSal.Moavenat, QStaMahSal.MoavenatId
PIVOT QStaMahSal.QfullStationary.OmorAlias;

I just open my report from the form.tnx
 
D

Duane Hookom

As I noted before "Crosstab queries generally require you to set the
parameter data types in the query". This is even true if the crosstab is
based on a query with a parameter/criteria.

--
Duane Hookom
MS Access MVP



Afsaneh said:
my xtab query is based on another select query, and the field I wanna
filter
is not on the xtab one, and when I try to filter the source one using a
form
to get the parameters ,I get the message from access "the microsoft jet
database engine does not recognize '[Forms]![StaRep]![txtSal]' as a valid
field name or exp"!
here are my sql :
"SELECT QfullStationary.*, Left$(QfullStationary!EnterDate,4) AS sal,
Mid$(QfullStationary!EnterDate,5,2) AS mah, QfullStationary.OmorAlias,
QfullStationary.LEVEL, Forms!StaRep!txtSal AS Expr1
FROM QfullStationary
WHERE
(((Left$([QfullStationary]![EnterDate],4))=[Forms]![StaRep]![txtSal]));"

and

TRANSFORM Sum(QStaMahSal.Qtty) AS SumOfQtty
SELECT QStaMahSal.QfullStationary.LEVEL, QStaMahSal.NameGroup,
QStaMahSal.NameKala, QStaMahSal.Moavenat, QStaMahSal.MoavenatId,
Sum(QStaMahSal.Qtty) AS [جمع تعداد]
FROM QStaMahSal
GROUP BY QStaMahSal.QfullStationary.LEVEL, QStaMahSal.NameGroup,
QStaMahSal.NameKala, QStaMahSal.Moavenat, QStaMahSal.MoavenatId
PIVOT QStaMahSal.QfullStationary.OmorAlias;

I just open my report from the form.tnx


Duane Hookom said:
IMO, parameters should never be prompts. All user interaction should be
through controls on forms. Crosstab queries generally require you to set
the
parameter data types in the query.
 

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

crosstab query with datea parameters 2
report on a cross tab query 1
Combine results using query 4
Crosstab Query Question 5
Help with crosstab query 10
Union query 2
CrossTab Query 3
Help on crosstab query 2

Top