the best way to make Report Header /Page Header data-driven

  • Hi there,

    i have bunch of reports with custom Repot/Page Header: it has several text boxes with text hard-coded in it. it changes from time to time and i have to go back and change this text and re-deploy the reports. i'd like to make it all data-driven, where the text boxes gets their values from a table and if a change occurs, i'll make it only on a back end.

    i thought of placing a list region that will be pointed to a dataset for that report.

    the text boxes within this list region will inherrit this dataset fields and it's NO problem.

    however, SSRS allows you to place the list region only into report body.

    does it mean that i have to write function in Report Code that returns me value and reference it in my text boxes something like this: =Code.MyReportDataSet("ReportName"),

    =Code.MyReportDataSet("ReportDescritpion") and such...

    since i have 100 reports and may have more, i'll be putting my code into a custom assembly and reference my custom assembly in each report.

    i just want to make sure i am not creating something complex where i dont have to.

    any idea?

    thanks All.

  • Why not just minimize the header, and put a textbox at the top of the report body with a value like this:

    =Fields!reportName.Value

    and just return the field reportName in your dataset?

    It seems to be working ok for me. I have a table for the dataset, and the reportName field in a lonely textbox above the table.

  • i hear what you're saying & agree.. it works, but because the repots have several pages and they would like to see this on every page, we need to have this info on report header. thank you for writing me :-).

  • If you are using the report wizard, and toss that field into the "Page" box, it should display on every page.

    Apparently the Preview tab in BIDS/VS2005 does not always display correctly.

    Try deploying your report and view it as the user would. I just tried it and got the field to display on every page as expected.

    Also, read this thread for more info:

    http://www.sqlservercentral.com/Forums/Topic118067-150-1.aspx

    tung

  • If I understand your scenario right, it is the same as I encountered recently.

    I solved it by using a couple of ReportParameters, and referencing the ReporParameters in the report header.

    All these "header parameters" were bound to a dataset (ID and text columns), had their default set to the proper ID, and were of course hidden.

    That way my customer can change the text in the db, without having to touch the report.

    Peter Rijs
    BI Consultant, The Netherlands

Viewing 5 posts - 1 through 4 (of 4 total)

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