How to Return Multiple Values in a Textbox

  • Hi there, I am new in SSRS and I am using SSRS 2012. I have a dataset which includes these values if I print a particular Invoice (InvNum). Assuming I would want to print InvNum 10002 and I have a textbox to show all the Order Numbers tagged to that InvNum.

    InvNumOrderNum

    100023851

    100023337

    100023339

    100023339

    100023339

    Result: 3851, 3337, 3339

    Currently, I am using this expression in the textbox: =First(Fields!InvDtl_OrderNum.Value, "DataSet1") and it will just show the first OrderNum in the dataset.

    Can someone please help on this? Maybe someone can provide me the formula? I've already checked all the common functions of that textbox but I cannot get the correct formula.

    Thanks in advance.

  • Hi Dee,

    The function you are looking for is LookupSet. You can lookup a set of values in your dataset via a lookup value, like your invoice number. This returns an array which you can then join into a string.

    The expression would look like:

    =Join(LookupSet(Fields!InvoiceNumber.Value, Fields!InvoiceNumber.Value, Fields!OrderNumber.Value, "DataSet1"), ", ")

    More info here: https://msdn.microsoft.com/en-GB/library/ee240819.aspx

Viewing 2 posts - 1 through 1 (of 1 total)

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