I need the name to appear on page header ? How do I do that

  • RE: SSRS 2005

    I have a report that prints a 2 page summary report for each Patient/Customer.

    ( The report can have 60 pages. So that means it has 30 Patient/Customer summary reports )

    Everything looks good so far.

    Now I like the each customer name to appear in the page header and footer as well.

    ( This is so that when they print all 60 pages they know to whom each page belongs )

    Problem is how do I get the customer name to appear in the report header.

    ( Hint: At run time can a value in a dataset be transfered to a Reoprt Parameter ? )

  • After you add the Page Header and Page Footer you can pass the customer name to them using the ReportItems collection. Find the name of the Textbox in your report that already contains the customer name (ex: textbox1, or create a textbox with that value and optionally hide it). Then reference that value in the header/footer like:

    =ReportItems!Textbox1.Value

    Good luck, Steve

  • Forgot to mention this earlier.

    Unfornately, the patients name is inside an embedded sub report.

    I am sure we can use your reference and include the name of the sub report immediately before the

    name of he text box. Will that do the trick ?

  • My initial inclination is that will not work, but feel free to try and let us know. I suspect you are passing additional values to the subreport in order to retrieve the customer name. Is there any way you can pull the customer name into the query in the main report? Maybe some creative SQL or a UDF?

  • Well, here is a first step.

    I created a text field ( later we can hide this ) in the main report.

    My question is how can I pull a value from the subreport to appear inside the textbox ?

    What would be the syntax ?

  • mw112009 (8/10/2011)


    Well, here is a first step.

    I created a text field ( later we can hide this ) in the main report.

    My question is how can I pull a value from the subreport to appear inside the textbox ?

    What would be the syntax ?

    =ReportItems!Textbox1.Value

    But I'd bet a lot without testing that you can't access the subreports controls. You could in Access but ut was a pita IIRC.

  • I guess I didn't explain this correctly.

    The new text field sits in the main report. There is also a sub report.

    The plan is to get a value from the sub report and place it inside the text field.

    I guess the answer will have to include the name of the sub report

  • mw112009 (8/10/2011)


    I guess I didn't explain this correctly.

    The new text field sits in the main report. There is also a sub report.

    The plan is to get a value from the sub report and place it inside the text field.

    I guess the answer will have to include the name of the sub report

    That's how it worked in Access [Subreportobject].[report].object.

    I've never seen or heard of this on SSRS. Happy googling.

  • I still think there is a good chance it will be easier to get the customer name as a column in the main query to put in the main report. Is there any specific reason you can provide as to why this is not possible?

  • Sorry the [name] appears only inside a sub report.

    And also in my situation the "Sub Report" is inside a Group.

    What is happeneing is, I am passing a ID ( from the main query ) to a sub report.

    As the sub report displays the name.

    So my question is can we pull the name from the sub report to show up in a text field

    inside the main report.

  • mw112009 (8/10/2011)


    Sorry the [name] appears only inside a sub report.

    And also in my situation the "Sub Report" is inside a Group.

    What is happeneing is, I am passing a ID ( from the main query ) to a sub report.

    As the sub report displays the name.

    So my question is can we pull the name from the sub report to show up in a text field

    inside the main report.

    So you got the cust id in the main query but you can't get the name? I just don't get that one!

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply