简体   繁体   中英

How to assign dataset values in RDLC report header?

I am using RDLC report with Microsoft visual studio 2005. In my report header, I have a textbox called textbox1 which is referring to a value of another textbox placed in the report body in this way:

="Agency Name: " & ReportItems!textbox2.Value

My textbox1 is displaying the agency name correctly for my first page, however it did not appear in the subsequent pages.

Expected Result: All the pages are displaying "Agency Name: Testing123"

Actual Result : Only the first page is displaying "Agency Name: Testing123", the subsequent pages display only "Agency Name: "

My problem is similar to https://social.msdn.microsoft.com/forums/sqlserver/en-US/965589f8-d3cc-4eca-8519-c21f9b006f4d/how-to-assign-dataset-values-in-header-in-rdlc-report

However, I'm not able to resolve my issue using the solutions provided in it.

Thank you.

1.Take Textbox from Toolbox into report.rdlc.

2.Right click on Textbox and select Expression option.

3.=First(Fields!ColumnName.Value, "Datasetname")

4.ok

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM