0

I have a report with a list attached to a dataset with the following columns, and the list is grouped on id:

  • id
  • sale_date

I have another dataset2 that contains the following:

  • id
  • customer_name
  • customer_phone

Unfortunately, I cannot join the two tables as they are in different databases, so my question is:

How do I show the customer_name in a textbox within the list so that when the reader forwards through the ids, the correct customer_name displays in the textbox?

I tried putting this expression in the textbox, but it doesn't return anything when I forward through the records: =lookup(fields!id.value,fields!id.value,fields!customer_name.value,"dataset2")

Thank you for your help.

Update: In the interest of moving on, I found an alternative to my problem by using a switch statement in the textbox's expression to populate its value based upon the id. I know it's a hack, but since there are only 10 customer_name's, it's not too bad. I would like to resolve with using the dataset2 data in future.

MaxAx
  • 101
  • 2
  • 12

1 Answers1

0

You do not say which database system you are using. I'm assuming SQL Server.

There is nothing to stop you - from a SQL Server point of view - in connecting data from one database to another.

You can even connect to two databases on two different servers.

SSRS will almost always perform better (and be easier to maintain for you) if you sort your datasets out before they get into the report.

Community
  • 1
  • 1
BIDeveloper
  • 2,628
  • 4
  • 36
  • 51