SSRS Text box expression in Report Header

Hi Experts,
I'm trying below expression under Text box (Report Header)
= IIf( IsNothing(Parameters!vCp_ID.Value) OR Parameters!vCp_ID.Value = "", "All", Join(Parameters!vCp_ID.Value,", ") )
It gives me error message as:- 
Warning 1 [rsRuntimeErrorInExpression] The Value expression for the textrun ‘Header_Cp_ID_Value.Paragraphs[0].TextRuns[0]’ contains an error: Overload resolution failed because no Public '=' can be called with these arguments: 'Public Shared Operator =(a As String, b As String) As Boolean': Argument matching parameter 'a' cannot convert from 'Object()' to 'String'. C:\Users\abc1\Documents\Visual Studio 2008\Projects\Report Project1\Report Project1\ClaimsLevel.rdl 0 0
Any help what I'm doing wrong? Because of this is it printing "#Error" while previewing the Report.
If I remove IIF condition and place only:- 
Join(Parameters!vCp_ID.Value,", ")
than everything is working fine.
Thanks in advance
Kumar
KG, MCTS

Hi,
Since this parameter allows selection of multi values, the values of the parameter is returned as an array which cannot be used in comparing with = operator, as you have in the expression
Parameters!vCp_ID.Value = "".
You may pass the first value of the parameter (element with 0 index) instead like
Parameters!vCp_ID.Value(0) = "". Note the .Value(0). As such, you expression may be written as
= IIf( IsNothing(Parameters!vCp_ID.Value) OR Parameters!vCp_ID.Value(0) = "", "All", Join(Parameters!vCp_ID.Value,", ") )
Hope this helps. Please feel free to discuss if you have any other questions.
Regards
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
BH

Similar Messages

  • How to draw line in Text Box of crystal report

    Dear all expert,
    i have develop a crystal report, i need to underline the field heading. what i had done is, CTRL+U and edit my heading text. But it only underline what i type, the rest of the blank area of the field heading was not underline. how can i overcome this issues?
    Thank You.

    Hi,
    Instead of 'ctrl + u' the field, right click your text object, format text -> border -> enable the bottom with single
    Thx,
    Hao

  • Report header to display dimensions

    All,
    I am trying to make the text box in my report header display member names of our C2 dimension, which is departments. This dimension is in a column which has a prompt for values. When the report is ran, I would like users to be able to select departments and have the header display the chosen departments. The following syntax displays only the first member selected in the prompt, and not every member selected:
    <<GetHeading("Grid1",1,A,3)>>
    Any suggestions to pull in the missing members?
    Jim

    I have often had to experiment with the location criteria in text functions depending on the info and the location of the formula. Try different combinations of the col, row and page info being included.

  • Two column text box with header

    I have a text box that is set to flow as two columns. The beginning of the text box has a header then a list of bulleted items. My problem is that when the text flows to the second column, it is set at the top (in-line with the header). What I would like is to do something like set a top margin just for the second column so it will line up with the body text from the first column. Is there an easy way to do this or should I just use two text boxes and position the second box where I want it?

    Simplest is to use two text boxes.
    Dave Saunders has a script (http://pdsassoc.com/index.php?Nav=downs&Ban=Downloads&Info=downloads.html) that can do it with one text box by putting your head in a one-column table that intrudes into the second column. I've never used his script, and I see his website says CS and CS2, so I'm not sure if it would work with your version.
    You could probably achieve what you want (because I see you don't actually need the head to straddle, just the texts to top align with each other) by forcing a huge leading on one character in a frame that's set to First Baseline Offset by Leading.
    Ken

  • How do I recognize and treat seperately entries in a text box?

    I've placed a text box in a report that is populated by data entries that are seperated by a semicolon.  Each entry is unique and distinct.  I want to try to count and group these individually, but since they exist in a text box seperated by a semicolon, how can I treat them as unique?  Here is an example: 
    02 Inadequate Policies and/or Procedures;01 Lack of Policies and/or Procedures;05 Inadequate Separation of Duties;10 Financial Systems Deficiency;

    Hi,
    Whether the values is fixed ie, you will get a string with 5 values which is :;: seperated.
    If it is fixed you can use a way.
    for ex; you have a string of 5 values.
    first formula u write : Stringvar
    Variablename := split(Fieldname,';')[0]
    like that five formula.
    Then you can take the count(Variablename).
    Regards,
    Sathish

  • Reduce Space Btween Lines In  A Text Box

    I have a very large text box in my report and inorder to fit everything on 1 page, I need to reduce the space between the lines in the text box.
    I have tried highlighting the text and then Format/Text Spacing/Custom and setting this to various number, including zero, but cannot get the space small enough.
    Any pointers appreciated
    Gus

    Custom spacing 0 is the same as single and is the smallest you can get.

  • Hide/show text boxes in report header

    Hi All,
    I'm trying to implement a request to have a tablix header frozen in excel. So, I'm placing it in the report header as text boxes. However, there are two different tablixes (a one per page) with two different headings. I'm trying to place those two headings
    into two rectangles in the report header hiding and showing a one of it based on the Page No. It works but only for the first tablix heading as it's shown on the first page and hidden on the second page. But, the second tablix heading is not shown on the second
    page for some reason. It's probably due to the Page No rendering is  going later than the text boxes  appearances on the second page or something else causing it. 
    I did try to use the Global Page No in if visibility statement for those two rectangles, trying to get Page No through a function, using it as a parameter,  but nothing is making the second rectangle to show on the second page report header.
    Please, help with how it could be done.
    Thanks

    Hi al-dol,
    Per my understanding that you have put the textbox in the page header to display the table head instead of in the tablix thus you will got the frozen head when export to excel, you have two table header, so you need to add two rectangle to display both in
    two different page, now the issue is the second page header didn't display, right?
    I have testted on my local environment and can reproduce the issue, the issue can be caused by when you move the rectangle2 on the position of the rectangle1 then the rectangle becomes the child of rectangle1 but not the child of page header thus you will
    not shown the rectangle2.
    Please check the details information below to see if you have got the rectangle2 inside the rectangle1 like below:
    if so, please move the rectangle2 one time and check to make sure you got the "Page Header" in the parent section of both rectangle:
    Please also make sure you have use below expression to show/hide the rectangle:
    rectangle1:
    =iif(Globals!PageNumber=1,false,true)
    rectangle2:
    =iif(Globals!PageNumber=2,false,true)
    If you still have any problem, please feel free to ask.
    Regars,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • SSRS Drill through report - Text Box Properties, Action - Go to Report

    Apologies for the potentially very basic nature of my question, I am fairly new to using SSRS (using SQL Express 2014) and struggling with creating a drill through report using other reports.  Where the problem is, is when I go to the Text Box
    Properties - Action - Go To Report.  Where it says to specify a report, I click on Browse and it only allows me to look in 'Recent Sites and Servers' - I therefore cannot navigate to where my other report that I wish to link is stored.  What am I
    missing? Any suggestions appreciated. Thank you

    If you dont have the report to which you need to navigate within the same project, you should be using jump to URL option and specify full report server url of the second report with only parameter part replaced by the actual field from which you need to
    pass the value
    Another way is to create a linked report for the report to which you need to navigate within the same project  as your first report and then use jump to report option to include the linked report along with its parameters and corresponding values.
    http://www.mssqltips.com/sqlservertip/2308/sql-server-reporting-services-linked-reports-example/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • SSRS report - A single selection dropdown list converted to text box

    Hello everyone,
    We created a single selection dropdown parameter (City parameter) on a report. The data in this parameter is populated using MDX query. Also, it is filtered based on selection of another single selection dropdown list (Country parameter) of a report.
    The problem is when there is no cities for the selected country the dropdown list is gets converted to free type text box and user can insert city data in it. Why SSRS is not keeping it as empty dropdown list with no data?
    Any help would be much appreciated.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Hello Charlie,
    We developed a fresh report only with two parameters but still the dropdown control gets converted to text box in our case. We have two single selection parameters, Location and Customers. Based on selected Location the customer
    dropdown gets populated.
    Location Parameter Query
    WITH MEMBER [Measures].[ParameterCaption] AS [Location].[Location Name].CURRENTMEMBER.MEMBER_CAPTION MEMBER [Measures].[ParameterValue] AS [Location].[Location Name].CURRENTMEMBER.UNIQUENAME MEMBER
    [Measures].[ParameterLevel] AS [Location].[Location Name].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , [Location].[Location Name].ALLMEMBERS ON ROWS FROM [Model]
    Customer Query
    WITH MEMBER [Measures].[ParameterCaption] AS
    [Customer].[Customer Name].CURRENTMEMBER.MEMBER_CAPTION
    MEMBER [Measures].[ParameterValue] AS
    [Customer].[Customer Name].CURRENTMEMBER.UNIQUENAME
    MEMBER [Measures].[ParameterLevel] AS [Customer].[Customer Name].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel],[Measures].[Amt]} ON COLUMNS,
    nonempty([Customer].[Customer Name].ALLMEMBERS,[Measures].[Amt]) ON ROWS FROM ( SELECT ( STRTOSET(@LocationName, CONSTRAINED) ) ON COLUMNS FROM [Model])
    Regarding parameter settings on General tab for both the above parameters we did not select any of the following values, all these checkboxes are empty:
    Allow Blank Value ("") , Allow null value, Allow multiple values.
    I think it has something related to [Measures].[Amt] that we used in customer parameter. We are now trying to take other two parameters where we would be not using the [Measures].[Amt] to filter the data. Will update you soon.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

  • How to add the value of the two text boxes in the 3rd text box in ssrs table?

    Hi ,
    in my ssrs table i encountered a situation where i need to computing for the two text box values and i have to show that value in page header.
    for example i have to add the textbox9 value and textbox12 value then i have to show that value in the page header.
    Please help me with this requirement.
    Thanks in advance,
    Naveen

    Hi NaveenMSBI,
    According to your description, you want to sum the value of two textboxes, then display it in a page header textbox.
    Just PrajapatiNeta said, an expression in a page header or footer can refer to only one report item. So we can create a hidden textbox named textbox20 with the expression below in the report body:
    =reportitems!textbox9.Value + reportitems!textbox12.Value
    Then use the expression below in a page header textbox:
    =reportitems!textbox20.Value
    Besides, please note that in a page header or page footer section, only text boxes on the current page are available as a member of the ReportItems collection. For example, if ReportItems!textbox20.Value refers to a text box that only appears on the first
    page for a multipage data region, you can see a value only for the first page.
    Reference:
    ReportItems Collection References (Report Builder and SSRS)
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Concatenate text to field value in report header

    I'm trying to concatenate text to field value in a textbox in the report header but am getting an error.  Here's how I'm doing it:
    =First(Fields!Pp_Name.Value, "dsProspect") & "Prospect"
    and the error says the report definition is invalid.  An unexpected error occurred while compiling expressions.  Native compiler return value '[BC30179] class 'Textbox.....
    any idea why this wont compile?
    Thank you.

    Hi moondaddy,
    Generally, the error message always occurred when there are two distinct text boxes with the same name that only differ in their name by casing in report. When Reporting Services generates VB code for these textboxes during report publishing, the compilation
    fails because VB class names are considered case-insensitive.
    So this issue is not related to the expression (the format is correct) you post, it related to the Textbox name that the error message said. In order to fix this issue, please rename one of the textboxes.
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click here.
    Katherine Xiong
    TechNet Community Support

  • Weird SSRS Format Date Output in Matrix report Header

    For one of my Matrix reports, the column headers are Dates which I am trying to format in the form of 'Mon 07' i.e. short date name followed by date value.
    For this I am using the expression - =Format(CDate(Fields!WorkedOnDate.Value),"ddd") I then wanted to trim the right 3 letters.
    I am getting weird output. Here is what I am getting for one week- Tue, We2, T12u,ri,SaA,Sun,7on
    Any idea what is going wrong? This was asked in this link but that answer didn't help - The
    date formats do not seem to work in SSRS
    Regards,
    Karthik
    Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread.

    Hey Visakh, I realize my mistake now. I was adding the expression as part of Number-> Format property of text box instead of directly on the text box property. Thank you.
    Regards,
    Karthik
    Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread.

  • Partially Bold Text in SSRS 2005 using Expression ?

    Hi,
    I am using SSRS 2005.
    I have one requirment. I need to Partially Bold some part of Text in column.
    Below is the Example.
    Name < - -- Column in SSRS 2005 Report.
    This column contains combination of Last Name and First Name. All Database record contains Last name , while in some record our requirment is to append First Name with that.
    That is i aleady handled using Nested IIF Expression.
    Now, i want to display appended First Name in normal while all Last Name whihc is Database Field in BOLD Font.
    How is it possible ?

    Hi
    I have just saw a possible solution (well done Hentie Stassen!)
    The best solution of course is to upgrade to SQL 2008 reporting services.
    But, if you are stuck with SQL 2005, try the following:
    We know that a possible solution is to have 2 textboxes.  One for name, one for surname.  Then make the surname bold.  This works, but spacing is a big problem as we saw in other examples on this thread.  Here is the solution for the
    spacing problem:
    The idea is to have 1 textbox for the name, with lots of surname textboxes at different positions and only have 1 of these surname textboxes visible. 
    More detail:
    1. The left-most textbox is the Name field.
    2. Then have 10 or more Surname textboxes, with Bold and displaying the Surname field.  All surnames text boxes overlapping each other, but each one starting about 1cm to the right of the previous one.  The first Surname textbox starts about 1cm
    to the right of the leftmost point of the Name textbox, overlapping most of it.
    3. Now set the visibility property of each of the "Surname" textboxes.  All will be hidden by default.  Set the visibility of the 1st "surname" to true only if the lenth of the name field is less than 2.  Set the visibility
    of the 2nd "surname" to true only if the length of name =2, etc.
    Have a happy day
    Andre Maakal

  • SSRS - Is there a multi thread safe way of displaying information from a DataSet in a Report Header?

     In order to dynamically display data in the Report Header based in the current record of the Dataset, we started using Shared Variables, we initially used ReportItems!SomeTextbox.Value, but we noticed that when SomeTextbox was not rendered in the body
    (usually because a comment section grow to occupy most of the page if not more than one page), then the ReportItem printed a blank/null value.
    So, a method was defined in the Code section of the report that would set the value to the shared variable:
    public shared Params as String
    public shared Function SetValues(Param as String ) as String
    Params = Param
    Return Params 
    End Function
    Which would be called in the detail section of the tablix, then in the header a textbox would hold the following expression:
    =Code.Params
    This worked beautifully since, it now didn't mattered that the body section didn't had the SetValues call, the variable persited and the Header displayed the correct value. Our problem now is that when the report is being called in different threads with
    different data, the variable being shared/static gets modified by all the reports being run at the same time. 
    So far I've tried several things:
    - The variables need to be shared, otherwise the value set in the Body can't be seen by the header.
    - Using Hashtables behaves exactly like the ReportItem option.
    - Using a C# DLL with non static variables to take care of this, didn't work because apparently when the DLL is being called by the Body generates a different instance of the DLL than when it's called from the header.
    So is there a way to deal with this issue in a multi thread safe way?
    Thanks in advance!
     

    Hi Angel,
    Per my understanding that you want to dynamic display the group data in the report header, you have set page break based on the group, so when click to the next page, the report hearder will change according to the value in the group, when you are using
    the shared variables you got the multiple thread safe problem, right?
    I have tested on my local environment and can reproduce the issue, according to the multiple safe problem the better way is to use the harshtable behaves in the custom code,  you have mentioned that you have tryied touse the harshtable but finally got
    the same result as using the ReportItem!TextBox.Value, the problem can be cuased by the logic of the code that not works fine.
    Please reference to the custom code below which works fine and can get all the expect value display on every page:
    Shared ht As System.Collections.Hashtable = New System.Collections.Hashtable
    Public Function SetGroupHeader( ByVal group As Object _
    ,ByRef groupName As String _
    ,ByRef userID As String) As String
    Dim key As String = groupName & userID
    If Not group Is Nothing Then
    Dim g As String = CType(group, String)
    If Not (ht.ContainsKey(key)) Then
    ' must be the first pass so set the current group to group
    ht.Add(key, g)
    Else
    If Not (ht(key).Equals(g)) Then
    ht(key) = g
    End If
    End If
    End If
    Return ht(key)
    End Function
    Using this exprssion in the textbox of the reportheader:
    =Code.SetGroupHeader(ReportItems!Language.Value,"GroupName", User!UserID)
    Links belowe about the hashtable and the mutiple threads safe problem for your reference:
    http://stackoverflow.com/questions/2067537/ssrs-code-shared-variables-and-simultaneous-report-execution
    http://sqlserverbiblog.wordpress.com/2011/10/10/using-custom-code-functions-in-reporting-services-reports/
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu

  • SSRS subreport with a sub-report as header on all pages

    Hello,
    I need some guidance on how to get a sub-report with a sub-report header and an expanding table. Please see below.
    This is the structure of things that I have:
    Main Report 1 is being invoked by ONLY Parameter 1 (User Text Box Entry).
    It Contains:
         Page 1: Sub-Report 1 invoked by Parameter 1
         Page 2 or more Pages: Sub-report 2 and a table (T1) expanding vertically based on Parameter 1 and Parameter 2. The Sub-report 2 should appear as header on all pages where T1 rows are there. Additionally, multiple Parameter 2
    values may be present and if so, they need to appear on a different page with appropriate header/table data. Parameter 1 and 2 are associated with a ONE dataset & its fields.
         Last Page: Sub-Report 3 and few text boxes below it. Invoked by Parameter 1
    The issue is I don't know how to insert Page 2 content. I tried making a new report with Sub-report 2 and the T1 below it. This is working fine but I'm not able to get the sub-report as header on all pages EXCEPT the first page. FixedData and RepeatOnNewPage
    properties are TRUE & KEEPwithGroup is set to 'AFTER'. Also, once I'm done with this report how do I insert it in the main report. Would it be in group / outside group in the group properties -- I would really appreciate if you can guide me with steps.
    Thank you,
    Nichesl
    Nichesl

    Thanks Asha ,
    Actually this is how my Report  layout is
    Group Header
    ---Detail1
    ---Detail2
    ---Detail3
    Group Footer1 (New Page After and Show at Bottom Setting)
    Group Footer 2 (New Page Before Setting)
    This is the layout of my report.
    When Details and Group Footer1 come in same page then my Group Header works perfect.
    When there are many details then the Group Footer1 skips into next page and Group Header does not show up in that page.
    Our requirement is such a way that Group Footer1 should have Group Header and Group Footer2 should always come in new page (i.e. last Page)
    I think I made it clear on my issue/requirement.
    Again I really appreciate for your reply.
    Regards
    Kalyan

Maybe you are looking for

  • Vista/Adobe 9/sql image Error in Crystal Report:Failed to Export the Report

    When I try to export my Crystal Report (v2008) from a Vista machine (using Crystal RDC export methods) as a PDF, I get the following error: Error in Crystal Report:  Failed to export the report. This only happens when a particular subreport (that con

  • Using a single sequence value over multiple scripts (in a variable?)

    Hi all... I'm writing a number of scripts that insert rows into tables. To better explain my point, I'll paste a simple breakdown of the scripts here as that will be easier to understand... Script 1: INSERT INTO WORKGROUP_DEPARTMENTS(ID, DEPT_NAME, D

  • IPHONE 3GS and IPAD 2

    I use IMAC and do sync with my IPHONE. Q; Will IPAD 2 sync both IPAD apps and Iphone apps. I do hope so.

  • Mac Plus software needed

    I have an original 128K Mac that has been upgraded to a 1MB Mac Plus that is being readied for sale. Unfortunately, somewhere in this mess I have managed to lose the OS boot floppy. I have the complete set of System 7 install diskettes, but the proFi

  • How to add a time delay of microsecond in labview 2011

    can you please help me, how to add a time delay of microseconds in labview 2011 version . I expect a helpful replies