简体   繁体   English

有谁知道如何解决这些ssrs脚本文件错误?

[英]Does anyone know how to fix these ssrs script file errors?

I copied the .rss script file contents from here: https://technet.microsoft.com/en-us/library/aa225813(v=sql.80).aspx , I took a sample .rdl file and put it in the same location, and I changed instances of "MyReport" to the .rdl files name. 我从此处复制了.rss脚本文件的内容: https ://technet.microsoft.com/zh-cn/library/aa225813(v=sql.80).aspx,我获取了一个示例.rdl文件并将其放入相同的位置,我将“ MyReport”的实例更改为.rdl文件名。

I now get the following errors: 我现在收到以下错误:

The specified script failed to compile with the following errors: C:\\Users\\xxxxx> "C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\vbc.exe" /t:exe /main:MainModule /utf8output /R:"System.dll" /R:"System.Xml.dll" /R:"System.Web.Services.dll" /R:"C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\rs.exe" /out:"C:\\Users\\xxxxx\\AppData\\Local\\Temp\\4\\ivfgtstk.exe" /debug- "C:\\Users\\xxxxx\\AppData\\Local\\Temp\\4\\ivfgtstk.0.vb" "C:\\Users\\xxxxx\\AppData\\Local\\Temp\\4\\ivfgtstk.1.vb" 指定的脚本无法编译,并出现以下错误:C:\\ Users \\ xxxxx>“ C:\\ Windows \\ Microsoft.NET \\ Framework \\ v2.0.50727 \\ vbc.exe” / t:exe / main:MainModule / utf8output / R :“ System.dll” / R:“ System.Xml.dll” / R:“ System.Web.Services.dll” / R:“ C:\\ Program Files(x86)\\ Microsoft SQL Server \\ 100 \\ Tools \\ Binn \\ rs.exe“ /out:"C:\\Users\\xxxxx\\AppData\\Local\\Temp\\4\\ivfgtstk.exe” / debug-“ C:\\ Users \\ xxxxx \\ AppData \\ Local \\ Temp \\ 4 \\ ivfgtstk.0 .vb“” C:\\ Users \\ xxxxx \\ AppData \\ Local \\ Temp \\ 4 \\ ivfgtstk.1.vb“

Microsoft (R) Visual Basic Compiler version 8.0.50727.5483 for Microsoft (R) .NET Framework version 2.0.50727.5485 Copyright (c) Microsoft Corporation. Microsoft(R).NET Framework 2.0.50727.5485版的Microsoft(R)Visual Basic编译器版本8.0.50727.5483版权所有(c)Microsoft Corporation。 All rights reserved. 版权所有。

C:\\Users\\xxxxx\\AppData\\Local\\Temp\\4\\ivfgtstk.0.vb(49) : error BC30456: 'Main' is not a member of '____ScriptClass'. C:\\ Users \\ xxxxx \\ AppData \\ Local \\ Temp \\ 4 \\ ivfgtstk.0.vb(49):错误BC30456:'Main'不是'____ScriptClass'的成员。

  clientScript.Main() ~~~~~~~~~~~~~~~~~ C:\\Users\\xxxxx\\AppData\\Local\\Temp\\4\\ivfgtstk.1.vb(14) : error BC30465: 

'Imports' statements must precede any declarations. “导入”语句必须在任何声明之前。

Imports System ~~~~~~~ C:\\Users\\xxxxx\\AppData\\Local\\Temp\\4\\ivfgtstk.1.vb(15) : error BC30465: 'Imports' statements must precede any declarations. 导入系统~~~~~~~ C:\\ Users \\ xxxxx \\ AppData \\ Local \\ Temp \\ 4 \\ ivfgtstk.1.vb(15):错误BC30465:'Imports'语句必须在任何声明之前。

Imports System.IO ~~~~~~~ C:\\Users\\xxxxx\\AppData\\Local\\Temp\\4\\ivfgtstk.1.vb(16) : error BC30465: 'Imports' statements must precede any declarations. 导入System.IO ~~~~~~~ C:\\ Users \\ xxxxx \\ AppData \\ Local \\ Temp \\ 4 \\ ivfgtstk.1.vb(16):错误BC30465:'Imports'语句必须在任何声明之前。

Imports System.Web.Services.Protocols ~~~~~~~ C:\\Users\\xxxxx\\AppData\\Local\\Temp\\4\\ivfgtstk.1.vb(20) : error BC30002: Type 'Rep ortingService' is not defined. 导入System.Web.Services.Protocols ~~~~~~~ C:\\ Users \\ xxxxx \\ AppData \\ Local \\ Temp \\ 4 \\ ivfgtstk.1.vb(20):错误BC30002:类型'Rep ortingService'未定义。

  Dim rs As New ReportingService() ~~~~~~~~~~~~~~~~ 

My online searches have come up unanswered ( https://social.msdn.microsoft.com/Forums/sqlserver/en-US/ae90b9cb-f8a0-46a5-989f-aff4c5bc3190/script-runs-on-vbc-compiler-but-not-on-rs-utility?forum=sqlreportingservices as an example). 我的在线搜索没有得到解决( https://social.msdn.microsoft.com/Forums/sqlserver/zh-CN/ae90b9cb-f8a0-46a5-989f-aff4c5bc3190/script-runs-on-vbc-compiler-but-例如,not-on-rs-utility?forum = sqlreportingservices )。

Assistance in solving this issue would be much appreciated. 在解决这一问题方面的协助将不胜感激。

I think your first issue is that the script you have copied is for the version of Reporting Services from SQL Server 2000 which you should probably not be referring to unless you are actually using SQL Server 2000. 我认为您的第一个问题是,您复制的脚本是针对SQL Server 2000中Reporting Services版本的,除非您实际使用的是SQL Server 2000,否则您可能不应该引用该脚本。

Secondly the rs.exe utility can run Visual Basic scripts, as long as they are in a specific format . 其次,rs.exe实用程序可以运行Visual Basic脚本,只要它们采用特定格式即可 The code you have copied from the SQL Server 2000 page is an example of Visual Basic code that might be used when developing an application, not a script file. 您从SQL Server 2000页复制的代码是Visual Basic代码的示例,在开发应用程序而不是脚本文件时可能会使用它们。 For example, it includes Import statements, which are not allowed in a script file for rs.exe 例如,它包含Import语句,这在rs.exe的脚本文件中是不允许的

The basic format required for your Visual Basic script is: Visual Basic脚本所需的基本格式为:

Public Sub Main()
    ' Your code goes here.
End Sub

Take a look at the script samples that can be downloaded from Codeplex for some detailed examples of Reporting Services scripting. 查看一些可以从Codeplex下载的脚本示例,以获取Reporting Services脚本的一些详细示例。

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

相关问题 有谁知道如何修复“sqlalchemy.exc.AmbiguousForeignKeysError”? - Does anyone know how to fix “sqlalchemy.exc.AmbiguousForeignKeysError”? Realm DataBase文件路径无法修改。 有谁知道这是为什么,或如何解决? - Realm DataBase file path can not be modified. Does anyone know why this is, or how to solve it? 任何人都知道我如何解决此C ++问题,以尝试将MySQL数据库返回的行打印到文本文件(.txt)中 - Anyone know how I can fix this C++ for trying to print the rows returning from a MySQL Database into a Text File(.txt) 有谁知道如何在heroku上创建新数据库(通过代码)? - Does anyone know how to create a new database (through code) on heroku? 有谁知道无效表异常是什么? - Does anyone know what a Invalid tables exception is? 有谁知道如何在日期中插入年份值,以便日期和月份保持不变 - Does anyone know how to insert a year value into a date so the day and month stay the same 有谁知道如何统一使用 Faunadb? 还是他们的 c# 驱动程序统一? - Does anyone know how to use Faunadb in unity? or their c# driver in unity? 有谁知道我如何读取 PHP 中的电子邮件,然后将它们写入数据库? - Does anyone know how I can read emails in PHP and then write them to a database? 如何解决查询错误 - How to fix the query errors SQL:如何解决这些错误? - SQL: how to fix these errors?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM