简体   繁体   English

使用Access和SharePoint列表创建报表

[英]Creating a Report with Access and SharePoint list

Linked SharePoint List table into Microsoft Access. 将SharePoint列表链接到Microsoft Access。 One of my columns within the SharePoint list is "Person or Group" It is a lookup that has several attributes from SharePoint users. SharePoint列表中的一个列是“人员或组”这是一个包含SharePoint用户的多个属性的查找。 Those attributes include ID, Name, e-mail address. 这些属性包括ID,名称,电子邮件地址。 I use the e-mail address attribute for workflows within SharePoint. 我在SharePoint中使用工作流的电子邮件地址属性。 Now I want to create a report from the SharePoint List that print out all of the names that are assigned to each record/row. 现在,我想从SharePoint列表创建一个报告,打印出分配给每个记录/行的所有名称。 Instead of printing out the name it returns the ID number. 它不是打印出名称,而是返回ID号。 How do I get the access report to return the name that is linked from the sharepoint list? 如何获取访问报告以返回从sharepoint列表链接的名称?

Anytime you link to SharePoint site, if you look close, you will ALWAYS see a table (list) called UserInfo. 无论何时链接到SharePoint站点,如果您仔细观察,您将始终看到一个名为UserInfo的表(列表)。

So, to get the user name in place of ID? 那么,要获取用户名来代替ID?

First setup a link to this userInfo table. 首先设置此userInfo表的链接。

So on ribbon on External data (import and link), choose to link to a SharePoint list. 因此,在外部数据(导入和链接)上的功能区上,选择链接到SharePoint列表。 Choose your site and then in the list of tables, choose the UserInfo one: 选择您的站点,然后在表列表中选择UserInfo:

Eg: 例如:

在此输入图像描述

Thus will thus setup a link to the UserInfo list/table. 因此,将设置到UserInfo列表/表的链接。

Then, simply build a query (left join) from the ID column of the user. 然后,只需从用户的ID列构建一个查询(左连接)。

The query will look like this: 查询将如下所示:

在此输入图像描述

Build a query that left joins in UserInfo. 构建一个在UserInfo中保留连接的查询。

However, do note that if you look at the table, you don't see the extra columns, but you do in the query builder. 但是,请注意,如果查看该表,则不会看到额外的列,而是在查询构建器中查看。 Note that SharePoint editor is added to EVERY table. 请注意,SharePoint编辑器已添加到每个表中。 so note these fields for EVERY table: 所以请注意每个表的这些字段:

在此输入图像描述

So you well might not even require to use a query joined to the UserInfo table since as above shows in Access ALL tables have the SharePoint editor automatic added to every linked table. 因此,您甚至可能不需要使用加入UserInfo表的查询,因为如上所示,Access ALL表中的SharePoint编辑器会自动添加到每个链接表中。

However, linking to the UserInfo table based on the "id" as you have should allow you to display the "name" in place id. 但是,根据您的“id”链接到UserInfo表应该允许您在place id中显示“name”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM