Joining two datasets to create a single tablix in report builder 3

天大地大妈咪最大 提交于 2019-11-29 17:55:36

问题


I am attempting to join two datasets in to one tablix for a report. The second dataset requires a personID from the first dataset as its parameter.

If i preview this report only the first dataset is shown. but for my final result what i would like to happen is for each row of a student there is a rowgrouping (?) of that one students modules with their month to month attendance. Can this be done in report builder?


回答1:


The best practice here is to do the join within one dataset (i.e. joining in SQL)


But in cases that you need data from two separate cubes(SSAS) the only way is the following:

  1. Select the main dataset for the Tablix
  2. Use the lookup function to lookup values from the second dataset like this:

    =Lookup(Fields!ProductID.Value, Fields!ID.Value, Fields!Name.Value, "Product")
    

    Note: The granularity of the second dataset must match the first one.




回答2:


We had a similar issue and that can be resolved this way. First of All, ensure the first data set's query and second data set's query are working fine by executing separately on the Database client tool such as Datastudio.

Build two data sets on SSRS tool with the respective queries and make sure both the data sets have same key column (personID).

On the SSRS report design, create a table from tool box and add the required columns from the first data set along with the matching key column(personID). Add a new column and use look up function to get the required column from the other data set against the same key column (personID).



来源:https://stackoverflow.com/questions/19793738/joining-two-datasets-to-create-a-single-tablix-in-report-builder-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!