Hello,
I have several questions concerning the crosstab query. I created a crosstab query which take data since a table (I have a form with several listbox and independent fields and I send my selections to a table by a query).
I replaced in my crosstab query the fields null by zeros and I inserted a table to have in my query all my unit. I have a query which is made up as this but the number of column after Total can vary:
Unit-Total-<>-Renault-Peugeot-Ford
I have this column < > because of the insertion as of the my table. I could remove it by masking this column.
My question;
- it Is possible to make a query to make total for all my columns like this....my columns after total can vary.
Total -- Renault -- Peugeot -- Ford etc..
- it Is possible to create a report dynamically because my columns after total can vary but how to make it?.
Thank you for your assistance because I am blocked.
Keawee
PS: Here the SQL of my query if that can help you.
TRANSFORM NullDonneZéro(Count([Table: Requete resultat selection].Serie)) AS CompteDeSerie
SELECT IIf(IsNull([TblCodeReparationUnique]![CodeReparationsCourt]),"AUTRES",[TblCodeReparationUnique]![CodeReparationsCourt]) AS [Module], Count([Table: Requete resultat selection].Serie) AS Total
FROM TblCodeReparationUnique LEFT JOIN [Table: Requete resultat selection] ON TblCodeReparationUnique.CodeReparationsCourt = [Table: Requete resultat selection].CodeReparationsCourt
GROUP BY IIf(IsNull([TblCodeReparationUnique]![CodeReparationsCourt]),"AUTRES",[TblCodeReparationUnique]![CodeReparationsCourt])
PIVOT [Table: Requete resultat selection].Type;
- I attach 1 picture from ma cross tab query.
I have several questions concerning the crosstab query. I created a crosstab query which take data since a table (I have a form with several listbox and independent fields and I send my selections to a table by a query).
I replaced in my crosstab query the fields null by zeros and I inserted a table to have in my query all my unit. I have a query which is made up as this but the number of column after Total can vary:
Unit-Total-<>-Renault-Peugeot-Ford
I have this column < > because of the insertion as of the my table. I could remove it by masking this column.
My question;
- it Is possible to make a query to make total for all my columns like this....my columns after total can vary.
Total -- Renault -- Peugeot -- Ford etc..
- it Is possible to create a report dynamically because my columns after total can vary but how to make it?.
Thank you for your assistance because I am blocked.
Keawee
PS: Here the SQL of my query if that can help you.
TRANSFORM NullDonneZéro(Count([Table: Requete resultat selection].Serie)) AS CompteDeSerie
SELECT IIf(IsNull([TblCodeReparationUnique]![CodeReparationsCourt]),"AUTRES",[TblCodeReparationUnique]![CodeReparationsCourt]) AS [Module], Count([Table: Requete resultat selection].Serie) AS Total
FROM TblCodeReparationUnique LEFT JOIN [Table: Requete resultat selection] ON TblCodeReparationUnique.CodeReparationsCourt = [Table: Requete resultat selection].CodeReparationsCourt
GROUP BY IIf(IsNull([TblCodeReparationUnique]![CodeReparationsCourt]),"AUTRES",[TblCodeReparationUnique]![CodeReparationsCourt])
PIVOT [Table: Requete resultat selection].Type;
- I attach 1 picture from ma cross tab query.