Feeds:
Posts
Comments

Archive for the ‘SRS’ Category

This is a big problem if you do things like Invoice Reports for example and I see it as a basic and very common needed feature. Luckily there is a work around.

WorkAround1: Using Shared Property Code

Add the following Code under Report->Report Properties->Code

Shared strTitle As String
Public Shared Function HeaderTitle(ByVal Value As String)As String
    strTitle=Value
End Function

Add a textbox on the body of the Report, set textbox visisble is false and add the following expression

=Code.HeaderTitle(First(Fields!TicketNumber.Value, “DS1”))

Add the TextBox or Lable on the header and set the expression as

=Code.strTitle

Page header data will repeat on every page with this approch.

But In multi user environment it will create some problems. Since it is using shared variable the same data may be served for the different users.

WorkAround2: Using Report Parameters (Best One with my Knowledge)

Add the ReportParameter called ReportTitle and set the Default Value from the dataset(Better have seperate dataset).
Set this Report Parameter as Hidden.
      
Add the TextBox or Lable on the header and set the expression as

=Parameters!ReportTitle.Value

Page header data will repeat on every page with this approch with out any problem.

Read Full Post »