Managed to get it sorted out finally!! The situation was that I had a few companies trading to many companies, the few companies were used for the groups and the many were used as the rows in the crosstab, so the crosstab was running across multiple pages. I managed to limit the number of rows...
Ok, I was slightly mistaken in my last post - what is throwing out the cnt variable is the fact that crosstab on the last page of each group may not have the right amount of rows i.e. 23, which then throws out the calculation. All I need is a way of referencing how many rows there are in a...
Ok, almost got it! I messed about with the crosstab position and page margins so that the crosstab only displays 22 rows per page and basically set the cnt variable back to 1 when it reached 23, this effectively resets the cnt variable to 1 at the top of each total column. Now, this is working...
At the moment, the counter is resetting on each change of page, so if I could get it so that the counter resets at the start of each column, that would be a lot easier to work with.
I didn't think this would make a difference to a crosstab, but I have got the crosstab in a group header, but I can't think why that would stop the counter from resetting for a column total on 'whileprintingrecords'.
Hi, thanks for the example. I'm doing exactly the same now as you have done in your example report and it's still not behaving in the same way - the major problem I think is the fact that the cnt variable is not resetting to zero, even though I have the reset statement in the column totals...
I did originally do what you suggested, but it didn't work, so I tried customizing the code to make it work. I did have the reset formula in there, just forgot to include it in my post. It seems to me that the formula you provided compared one summary to the summary in the row before it...
Ok, firstly the counter variable is incrementing by one for each row for each summary and then continuing on for the next column of summary values, although as I said, occasionally this is incrementing by 2 when it's continuing on to the next column of summary values. As for the formulas, I've...
Hi, perhaps I wasn't clear enough in my description of the problem, but basically I just wanted to compare each summary to the previous summary on the same row. As it happens, I've managed to almost solve the problem with the help of your code to show the counter variables value. Referring to...
Ok, thanks once again lbass - at least now I can see what's going on with the variables. I know what needs to be done now, but not sure how it's achievable. Basically, I need to compare the value of the variable, which is set to each current summary value, to the value of a variable set to the...
Yes, this is what I have done, but there is no background color changes whatever the values are between each monthly summary value. Is there any way of checking what values a variable is being set to, like a way of debugging a variable?
Thanks.
Hi lbass, I tried your solution and it's currently not working - perhaps I'm doing something wrong, but I've added the code to the relevant sections as you suggested. When you mentioned adding the code to the column totals, did you mean the column grand totals? At the moment it looks as though...
Thanks very much Lbass, I will give this a try - the only possible problem is that there won't be a static number of companies, but I will give this a go and hopefully it will do the job. I'm not in work again until Thurs, but will let you know how it goes.
Thanks again.
The companies will be added as parameter values to the underlying stored procedure, so there won't be many - 10 at most I should think. The whole premise behind this is, can you reference the previous summary value for a summarized field and subsequently do a comparison in a crosstab?
Thanks.
Hi, I've got a crosstab which is showing orders per week and summarizing by month, I want to be able to compare each month's summary to the previous month's summary to do some conditional to do some conditional highlight i.e. if one month's summary is greater than the previous month's, then it...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.