July 18, 2011 at 3:17 pm
I have a report that contains a list. In the list is a table, and I have the table grouped by a specific column. Functionally, it runs correctly and repeats the table for each group of data that contains a different value in the grouped column. My problem is that I need the table header to repeat on each new page ONLY. Obviously I can get it to repeat on a new page using the repeatonnewpage property. How do I have it repeat on new page ONLY? Here is some additional info.
The table is grouped by a PHASE type. One header simply states what phase type is being shown. I would like this header to repeat both on new pages, as well as when the table starts over again. The other header is the one that shows the column headings. This is the one that repeats on new pages, but also if the table ends in the middle of the page and starts over again with the next grouping of data it will display this heading as well. Is there an expression or something that I can use to achieve what I am going for? I hope that this is a clear enough explaination... thanks!
July 19, 2011 at 7:09 am
If additional information is necessary, please let me know and I can try to re-phrase my explaination.
July 19, 2011 at 7:30 am
Here are a few images to illustrate what I am trying to achieve:
Currently shows when the table starts over in the list control OR on a new page:
Would like it to only show when a new page starts instead:
July 19, 2011 at 7:34 am
That's the closest I've ever come to doing what you need to do. This code is running in a matrix. I hope you have a way to change it for the page header visibility option.
= IIF(PREVIOUS(Fields!CoutUnitaireOuvert.Value) <> Fields!CoutUnitaireOuvert.Value AND RUNNINGVALUE(1, SUM, NOTHING) > 1, "Red", "Black")]
July 19, 2011 at 7:37 am
Thanks for the response, Ninja! I am unsure of what I could do with this expression however. I could include something in the visibility property for the header, but I am not understanding what this expression is trying to do.
July 19, 2011 at 7:40 am
It checks if the previous value is different than the currentvalue (that's the start of a new group).
Runningvalue keeps a count of # of impressions. So in your case starting at runningvalue = 2 would be the time to start showing the header.
Like I said, this works in a matrix. I have no idea if it works in a list.
July 19, 2011 at 7:50 am
Thanks again Ninja, this might be on the right track. I modified your code to fit my criteria, and placed it on the visibility property of my header. This is the code:
= IIF(PREVIOUS(Fields!new_name.Value) <> Fields!new_name.Value AND RUNNINGVALUE(1, SUM, NOTHING) > 2, True, False)
This hides the header always in every table. If I reverse the true and false, then the opposite happens and the header shows always. Is there another property I should be adding this to, or do you see anywhere that I should have changed this code differently? Thanks again.
July 19, 2011 at 9:02 am
I believe an expression in the visibility property of the table header row in question is what I need, but how do I say... if this is a new page, then show, otherwise, no? It would look like this but I dont know the correct code:
= IIF(IsNewPage = True, False, True)
July 19, 2011 at 9:08 am
This does the job for me in the visibily / hidden option ;
=IIF(1=1, False,True) (hidden = false => visible)
July 19, 2011 at 9:13 am
That is the same as just setting the the visibility's hidden property to false. That causes the item to repeat at the top of the table each time the table starts over. I only want it to repeat at the top of a new page, not everytime the table starts over.
July 19, 2011 at 9:18 am
That's why I said to DISPLAY the values on the reports to even see if it was possible to do it using those functions.
A simple report run will give you the answer AND the correct filter to use.
July 19, 2011 at 9:26 am
It does work, but I am not understanding. My table is in a list, grouped by a specifict column in my database. The table repeats with the data that corresponds to each of the 3 values for my 1 column. This functions correctly, however, when the table repeats with the new set of values, my table heading repeats also. I do want the heading to show and repeat, but only on a new page. Not at the top of a new table. The last if statement you gave me does work correctly in the visibility expression for the table header, and causes it to show at the top of the table when it repeats and on a new page. What would be the filter to only show the heading at the top of a new page, and not at the top of the table?
July 19, 2011 at 9:34 am
Why don't you simply put a page break at the end of each group? That would solve your issue.
July 19, 2011 at 9:43 am
That is a very valid suggestion and has been brought up. Unfortunately, it just does not achieve the desired output. This is a report that is used in various publication for the city and currently requires a lot of manual manipulation. We are trying to automate a lot of that process, and avoid exporting it to Excel for manipulation for other reasons. For a better understanding of our current situation vs. our desired output, see below. And thanks again for trying to help me with this, I greatly appreciate it. Hopefully we can figure something out, there just has to be a way.
CURRENT
DESIRED
July 19, 2011 at 9:49 am
Why don't you add 3-4 columns in there and put all the previous,current, runningcount info so I can see what's going on?
Viewing 15 posts - 1 through 15 (of 31 total)
You must be logged in to reply to this topic. Login to reply