Solved

How do I make ssrs header go through recordset

Posted on 2014-03-25
11
380 Views
Last Modified: 2014-03-27
I have a bill template in ssrs.  I want to be able to run it against a table of bills and have it in one file generate the bill for each in the table.  This means that I need the textboxes in the header and footer to be able to change depending on what bill I am on.

I know I can do this with reportitems, but I'm not sure how to populate reportitems with fields from a recordset.

How is this accomplished?
0
Comment
Question by:UnderSeven
  • 7
  • 4
11 Comments
 
LVL 12

Expert Comment

by:Koen Van Wielink
ID: 39955066
If the header and footer you're referring to are the report header and footer you probably won't be able to achieve what you want.
Instead, use group headers and footers and have the report group per individual bill.
0
 

Author Comment

by:UnderSeven
ID: 39956139
I have seen reports with report headers and footers do this (how else would you use page number globals).

But trying your way I'm not sure how to make a specific group header, can you elaborate please?
0
 
LVL 12

Expert Comment

by:Koen Van Wielink
ID: 39956169
First of all, which version of SSRS are you using? Is it possible for you to attach the rdl? If you insert a group in your report for the bill number or whatever the unique identifyer of a bill is, you can use group header and footer instead of the report header and footer.
I can be more specific if I know your RS version.
0
 

Author Comment

by:UnderSeven
ID: 39956192
I'm writing the report on visual studio 2012, our report server is 2008.

What I am attempting to do is use a hidden table in the report body for grouping and giving me access to the rows.
0
 

Author Comment

by:UnderSeven
ID: 39956254
I attached a sanatized version of the rdl

As you can see I have a hidden table that links to the dataset and groups on the billidnumber.  Most of my text boxes in the header are looking at parameters, I plan to change that, in the upper right corner is a text box I pointed at reportitems for the bill id.  

It doesn't work, it only lists the most recent bill id on the list
Bill-MainOnePagedeploybat325san.rdl
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 12

Expert Comment

by:Koen Van Wielink
ID: 39956312
Ok, from what I can gather you would have to make the tablix you've hidden fit the entire page. The header expressions should go in the group header instead. Unhide the table and only hide the rows/columns within the table which you don't need. If you want this to work, the tablix containing your grouping has to be the main report template. Right now because you're using the background page rather than the actual report (the table), it would only show you the last item retrieved. The subreports also need to be placed within the main table.
0
 

Author Comment

by:UnderSeven
ID: 39956618
I think I understand.  Is there a way to do this with xml quicker than re-writing? This is based on a template that is a little more complex than the version I just sent so it would take a while.
0
 

Author Comment

by:UnderSeven
ID: 39957571
I tried using a table in the report to use a reportitem to feed a value to the header, still won't work.  So can I not use report headers?
0
 
LVL 12

Accepted Solution

by:
Koen Van Wielink earned 500 total points
ID: 39957691
Wouldn't try this through xml. Pretty sure that would take longer, if it would work at all. Report headers are really for titles, dates, author, etc, static data which is the same for the entire report, not for dynamic data. Your data changes for each set of records belonging to the same bill id, so your "header" data needs to be in a group header for a grouping on that field.
0
 

Author Comment

by:UnderSeven
ID: 39959500
I'm not quite sure how to do this.  What I've attempted is create the table based on the dataset, group by the bill number, child group with details.  If I populate just say one row with the bill number and leave it in the table it repeats the bill numbers, if I drag that textbox out of the table it lists only once.  How do I use a table with a layout like this, am I supposed to be able to drag the textbox pieces and have them maintain table behavior?
0
 

Author Closing Comment

by:UnderSeven
ID: 39959721
Thanks a lot for going through it with me.  The way I eventually did it was (taking your advice) removing the header and footers since they're not meant for dynamic and then to simplify migration I created a report with a table that fed the bill number to the main template as a subreport.  This enabled me to keep both within the previous design.  Ultimately it worked out rather well I think.  Thanks a lot for the help.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In this short article I will be talking about two functions in the SQL Server Reporting Services (SSRS) function stack.  Those functions are IIF() and Switch().  And I'll be showing you how easy it is to add an Else part to the Switch function. T…
Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now