May 9, 2011 at 10:51 am
Hi -
Not sure how to go about describing this (usually I hang out in the T-SQL forums, and those are easy enough to share the code I am working with for a better view of things), but basically I have a simple report that is grabbing data from a not-so-simple query. Basically is gets me a State, District, and a numeric count that we will say represents - attendees at an event.
My problem is that I need to get the report to give me totals by State | District. I get the State grouping just fine, but I get multiple listings of my district (have not come up with a way to do this in my T-SQL query yet, but that may be the fix I need). Basically I want to see if there is a way for me to get the report to sum my districts up with a numeric value. I've tried simply summing them, but it gives me errors.
I realize that I am taking a lot of the power away from the potential of the report by doing it this way (e.g. given the eventual end user the ability to search how they'd like), and I may eventually go that way, but right now - I'm just trying to ensure that it can even be done this way (without having to go back and do some sort of aggregating with the T-SQL).
Many thanks in advance, and please let me know if screenshots or something else might be needed to help you all out in coming to conclusions with my situation.
May 9, 2011 at 11:59 am
So you have a cartesian product at the district level? What error do you get when you try to do the sum?
May 9, 2011 at 12:51 pm
It just errors out when I preview the report on that particular field. I feel kind of dumb here - this should be something that I can fix in T-SQL, but for the life of me - I'm just drawing blanks.
:-/
May 9, 2011 at 2:44 pm
What is the error you are getting?
What is the expression that you believe is the problem?
May 9, 2011 at 4:13 pm
It's me just being dumb. I was trying to fulfill requrements that weren't really doable. I revised (actually one of my mentor's helped me revise) the query to something a little more doable. Basically what was happening was I was getting funky results and not being able to group a district's results together. The funky results came from an attempt to do a ROWCOUNT in a non-deterministic manner, and the grouping issue was due to my lack of experience to this point with RS. Let me sum it up this way - Multi-Value functions are crazy cool!
🙂
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply