Dynamic report with crosstab query doesn't work (1 Viewer)

JessicaVdb

Registered User.
Local time
Today, 06:02
Joined
Jul 4, 2017
Messages
32
Thought I may as well upload where I've got to.
As I said previously, when I gave up last night I had the names on the report but not the values.

I've made one further change - remember I said to use the same SQL for the report record source - I've changed it to a crosstab query & I now get names & values AND no parameter messages. Hooray.

However its not filtered so you get blank rows.
When I filtered the source query, it failed again

Also to repeat what I said originally, you do NOT need to use the PARAMETERS line in strSQL statement.
I realise I'm saying the EXACT opposite of Minty here
In fact if you do include it, you'll get another error

My code includes various versions of strSQL statment - all had issues....

I've been using dynamic crosstab queries for many years - many far more complex than this one - and I've never had this issue before.

So you 'just' need to sort the filtering and you're done

Sorry I can't quite fix the problem - hopefully you will be able to do so
(or perhaps someone else may join in the fun and games....)

My gut feeling is that your source data is the problem

Thank you!
I'm realy greatfull you found this already.
 

isladogs

MVP / VIP
Local time
Today, 05:02
Joined
Jan 14, 2017
Messages
18,186
Hooray - got it working!

My brain wasn't in gear
I left the computer for 5 minutes when I realised what to do
I just needed to filter the report criteria from the button on the form

Attached one working dynamic crosstab report for you

Have fun
 

Attachments

  • Database1 - CR UPDATED.accdb
    688 KB · Views: 136

JessicaVdb

Registered User.
Local time
Today, 06:02
Joined
Jul 4, 2017
Messages
32
Hooray - got it working!

My brain wasn't in gear
I left the computer for 5 minutes when I realised what to do
I just needed to filter the report criteria from the button on the form

Attached one working dynamic crosstab report for you

Have fun

OMG! I can't thank you enough for what you have done. :D
 

isladogs

MVP / VIP
Local time
Today, 05:02
Joined
Jan 14, 2017
Messages
18,186
It was bugging me .... couldn't leave it alone!
Suggest you study the code carefully so you know how it works for future reference ...
 

JessicaVdb

Registered User.
Local time
Today, 06:02
Joined
Jul 4, 2017
Messages
32
It was bugging me .... couldn't leave it alone!
Suggest you study the code carefully so you know how it works for future reference ...

Deffinetly, I've already found what was wrong.
 

isladogs

MVP / VIP
Local time
Today, 05:02
Joined
Jan 14, 2017
Messages
18,186
Excellent

Please mark the thread as SOLVED by clicking on the Thread Tools drop down at the top
 

Users who are viewing this thread

Top Bottom