SSRS Report - show specific contacts


(Metesh) #1


I’m trying to show only the ‘Site Contact’ information in the SSRS report but I’m not sure how to get it to work. We have several contacts for one customer and all I want to show in the report is the Site Contact Name and number.

This is what I have, but it doesn’t seem to be work.
=iif(Fields!CustCnt_ContactTitle.Value=“Site Contact”,"Site Contact: " & Fields!CustCnt_Name.Value , Nothing )

I’m not sure what I’m doing wrong.


(Calvin Krusen) #2

Modifying an existing report (if so which one)? Or is this a BAQ Report?

(Jarrad Layne) #3

you could just show the customer contact in the field and create a WHERE clause in your data set query to only select rows with “Site Contact” as the contact title.

If this is a BAQ Report then you could put that criteria on the BAQ.

(Metesh) #4

Thanks for the tip. This is an SSRS print out. I’ll try to add the WHERE clause in the data set query and see how it goes.

(Metesh) #5

Hi Jarrad,

Adding the WHERE clause in the data set query works well if there is a site contact entered. The problem is, if we don’t enter a site contact then the whole invoice is blank. I just want to Site contact field to be blank if there is nothing.

Each location as several contacts, but we just want to show the site contact on the invoice if it exists.

(Jarrad Layne) #6

is the customer contact table linked via a Left Outer Join? If its an inner join then it will blank out the report if none is there. So it sounds like you need have the link to customer contact a left outer join.

(Metesh) #7

It is a left outer join.

LEFT OUTER JOIN CustCnt_" + Parameters!TableGuid.Value + " T10 ON T1.[Company] = T10.[Company] AND T1.[CustNum] = T10.[CustNum]"

(Jarrad Layne) #8

Okay, your first formula you posted, why did that seem not to work? Was it always blank? maybe use single quotes instead of double around your strings.

another suggestion might be if you take the where clause out then just put the customer contact name in the textbox and put a suppression formula on the textbox that is looking at the Contact title, suppressing the box if it.

(Metesh) #9

Yeah, I was always getting a no results with my original formula. The single quotes gave me a syntax error.