Creating a report based on crosstab query , variable columns

cewolf

Registered User.
Local time
Tomorrow, 00:18
Joined
Oct 8, 2011
Messages
10
Greetings
i have been searching for a solution for hours ..but with no luck , i would really appreciate a help

i have a crosstab query that will produce different results based on user's input ....
so input A will give a query with 3 headings Q1, Q2, Q3
input B will give a query with 5 headings Q12, Q13, Q14, Q16, Q17
input C will give a query with 2 headings Q5, Q6
and so on
i dont want to create a report for every possible option since i have a LOT of them also the result (headings) of each option will change with time ..

how can i generate a report that can adjust to the different numbers of columns , fields names and labels

i understand that the only way to achieve that is via Code, but my coding skills are primitive ... so please try to be more detailed

thank you very much in advance
 
Thanks for your reply

i am very aware of what are you saying , but sadly the data base HAS to be this way ...
the idea is to keep it a user friendly as much as possible since end user will have no idea how to create Queries and or reports ..
so i have to give the user the ability to define his own questions (records) that will become the headers of the crosstab Query later ..
i need a one report that fits all , since many studios in our company will be using the database and they have their own softwares and their own Q's, they don't know how to create reports

i came with a way around it , i will limit the Qs to 25 only
each Question will start with the code, Q1, Q2, Q3 ...
so for 3Ds max you will have Questions as
Q1 Modeling
Q2 Texturing
Q3 Animating
and for Photoshop
Q1 Using layers
Q2 Filters
Q3 Blending modes

and so on ...
on the crosstab Query i will group headings based on Left([Qustion],3)
so all the headings will be Q1, Q2, Q3....Q25 regardless of software
on the report the will be filtered by software only the questions related to that software will show, i will use a DLookup function for the headers of the report so the user will know what is Q1 Q2 Q3...Q25 means ...

a little dodgy but it would work ...
but i am still hopping that some one would be able to give me a better solution
thanks
 
Try googling for 'Dynamic Crosstab Access'
I looked at dynamic crostab a few years back when I first started creating a database for work colleagues , but luckily did not have the need to use it before I left.

Does this thread help at all.

JHB posted a working solution I think?

https://access-programmers.co.uk/forums/showthread.php?t=242545
 

Users who are viewing this thread

Back
Top Bottom