Hi!
I'm having some problems with a basic thing I guess.
I have a table of visits as the whole Dataset. Let's call it group A.
I then group the visits per customer, let's call that group B.
After that i filter out some unwanted visits and call that group C.
The hiarchy then looks like this, A contains B that contains C.
The problem is that I want to know the number of rows in C above the actual table. Something like
CustomerName (John Doe) Number of visits (54 from group C but printed out while in group B)
Visit 1 blablabal
Visit 2 blablabla
... and so on ...
As far as I understand the aggregate functions, you can only use them on the current group or a group above, never below. I tried to make an invisible textbox below C and it works if there is just one customer. If there are more than one customer the sum flipped between all the customers. (A gets the sum of B, and so on).
Thanks
Johan
In my case, I only have one C groping per B grouping. Its a table that filters out preknown types of visits. Its the number of rows in this table that I would like to print out above the table in question, inside grouping B. What I did was to create a textbox within the C grouping that I referenced from a B grouping. Works for one (1) customer, but if there are more customers the totals get calculated correctly, but displayed in the wrong order.
I realise that it might be inpossible to do this, but I would hope that I at least could "transfer" a number higher up if I know that it only would be one other C grouping.
What I would like to do is something like this:
(pseudocode)
=Count(Fields!VisitId.Value, "not VisitType=BadVisit")
Am I making sence at all? :)
|||Yes, you are but in general you can have more than one group sections and referencing an inner group is not allowed. Why don't you bring the C totals at the B level in your dataset? A simple scalar function (assuming SQL Server) will do the job.|||The problem is that I don't deside the datasource at the moment and all I have is a view containing Visits of two types. The first type is carried out visits and the second one is missed visits.
They are not in any specific order and missed and carried out visits could be at random rows.
If I could change the dataset, are you suggesting that I put the total amount of visits with each row per customer and just read the first row by each customer grouping to get the value? Kind of like how they denormalized the name of the customer in every row?
Thanks for a quick answer by the way! :)
|||Correct. In this way, you don't have waste your time to find a hack. In addition, you'll never go wrong by pushing work to the database.
No comments:
Post a Comment