Crystal Reports 2008 不允许我将特定视图添加为数据源
Crystal Reports 2008 will not allow me to add a specific view as a datasource
我在我的数据库中创建了以下(非常标准的)视图
USE [Forms_New_V1.1]
GO
/****** Object: View [dbo].[vwWorkDiary] Script Date: 21/10/2019 8:21:21 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[vwWorkDiary]
AS
SELECT
o.OrgCode,
Orgname = o.Name,
d.FirstName,
d.LastName,
d.CtrackTagID,
frt.FatigueRule,
VehicleName = v.Name,
v.Registration,
wd.StartTime,
wd.EndTime,
wd.StartCoord,
wd.EndCoord,
CurrentWorkMode = wmc.WorkModeName,
SwitchWorkMode = wms.WorkModeName
FROM Organisation AS o
JOIN Driver AS d ON o.OrganisationID = d.OrganisationID
JOIN WorkDiary AS wd ON d.DriverID = wd.DriverID
JOIN Vehicle AS v ON wd.VehicleID = v.VehicleID
JOIN FatigueRuleType AS frt ON d.FatigueRuleTypeID = frt.FatigueRuleTypeID
JOIN WorkMode AS wmc ON wd.CurrentWorkMode = wmc.WorkModeID
JOIN WorkMode AS wms ON wd.SwitchWorkMode = wms.WorkModeID
WHERE d.Active = 1
AND v.Active = 1
and frt.Active = 1
GO
根据我的凭据,该视图在数据库中工作正常,当我以报告用户身份连接时也正常。
当我尝试在 Crystal 中添加视图时,出现以下错误:
当我在 ODBC (RDO) 下创建新连接时,我可以添加视图,但是我无法在报告中与其交互,并且验证数据源将其删除。
错误指的是 '.1' 附近的语法不正确。 文件中唯一的 .1 是顶部的 USING
语句,我不知道'没有权限重命名数据库。
如何将我的观点添加到我的报告中?
这似乎是数据库名称在 ODBC 驱动程序眼中无效的问题。我最终能够重命名它,问题就消失了。
我在我的数据库中创建了以下(非常标准的)视图
USE [Forms_New_V1.1]
GO
/****** Object: View [dbo].[vwWorkDiary] Script Date: 21/10/2019 8:21:21 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[vwWorkDiary]
AS
SELECT
o.OrgCode,
Orgname = o.Name,
d.FirstName,
d.LastName,
d.CtrackTagID,
frt.FatigueRule,
VehicleName = v.Name,
v.Registration,
wd.StartTime,
wd.EndTime,
wd.StartCoord,
wd.EndCoord,
CurrentWorkMode = wmc.WorkModeName,
SwitchWorkMode = wms.WorkModeName
FROM Organisation AS o
JOIN Driver AS d ON o.OrganisationID = d.OrganisationID
JOIN WorkDiary AS wd ON d.DriverID = wd.DriverID
JOIN Vehicle AS v ON wd.VehicleID = v.VehicleID
JOIN FatigueRuleType AS frt ON d.FatigueRuleTypeID = frt.FatigueRuleTypeID
JOIN WorkMode AS wmc ON wd.CurrentWorkMode = wmc.WorkModeID
JOIN WorkMode AS wms ON wd.SwitchWorkMode = wms.WorkModeID
WHERE d.Active = 1
AND v.Active = 1
and frt.Active = 1
GO
根据我的凭据,该视图在数据库中工作正常,当我以报告用户身份连接时也正常。
当我尝试在 Crystal 中添加视图时,出现以下错误:
当我在 ODBC (RDO) 下创建新连接时,我可以添加视图,但是我无法在报告中与其交互,并且验证数据源将其删除。
错误指的是 '.1' 附近的语法不正确。 文件中唯一的 .1 是顶部的 USING
语句,我不知道'没有权限重命名数据库。
如何将我的观点添加到我的报告中?
这似乎是数据库名称在 ODBC 驱动程序眼中无效的问题。我最终能够重命名它,问题就消失了。