?????????? ???? ??? ????? assemblies ?? ???????? ??? ?? ????? ???? ????

???? ?????? ???? ??????
???? ID: 920769 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
SQL Server ?????? ???? ?????

?????????? ???? ??? ????? assemblies ?? ???????? ??? ?? ????? ???? ????

???? ?????????? ?? ??? ?? ????? ?? ???????? ???? ?? ??? ?? ???? ???? ??? ?? ?? ???????? ?? ????? ?? ??? ????? ??? ?? interest ?????? ?? ???? ??? ???????? ?????? ?? ?????? ???? ????? ?????? ??? ??????? ????? ???? ?? ??? ?? ???????? ???? ????? ??? ???? ???? ?? ??????????? ?? ????? ???? ??? ????? ?? ???? ?????? ?? ??? ????????????? ?? ????? ?? ???? ??????? ?? ??? ?? ???? ?? ???
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

???? ??? ???? ?????? ??! ??? Microsoft SQL Server ??????? ??? ?? ??? Sandy Yakob ???? ??? ???? hostess SQL Server ?????? ???? ??????? ?? ??? ???? ???? ?? ???? ??? ????? ???: ??? 14 ???? ?? ??? Microsoft ?? ??? ???? ??? ??? ????? ??? ????, ?? ??? ???? ??? ???? ??? ????? SQL Server ??????? ??? ?? ????

?? ????? ?????, ?? ??? ???? Sirmon ???? ???? ??? ????? ??????? ?? SQL Server 2000 ?????????? ???? ?? SQL Server 2005 ?????????? ???? ??? ???????? ??? ?? ????? ???? ?? ??? ??? ??? ?? ???? ???? ???? ?? ??? ?? ??????? ???? ?? ??? ????? ?? ??? ?? ?? ????? ??????? ?? ??? ???? ?????????? ???? ??? ??????? ???? ??? ??? ???? ??? Microsoft SQL ?????? ?????? ??? ?? ??? ?????? ????? ???????? ?? ?? ????? 2001 ?? ??? Microsoft ?? ??? ??? ???? ??? ?? ??? 10 ???? ?? ??? SQL ????? ?? ??? ??? ???? ?? ?? ??????? ????? ?? ??? Microsoft Visual Studio ?? ????? ??? ???? ?? B. S. ??? Citadel ?? ??????? ?? ?????????? ??? ???? ??? ?? ?? ???? ???? Microsoft ?????????? ?????? ?????? (MCSD) ?? ?????????? ?? ?? Microsoft ?????????? ??????? ?????????? (MCDBA) ?? ??????????? ??? ?? ?? ????? ?? ???? ??? ?? ??? ?????? ?????? ????

??? ????? ??????? ?????

??? ????? ??????? ????? ???, ?? ????? ????? ?? ???? ????:
  1. ???? Visual Studio ????? ????????? ?????? ????? ???????????? ??,????? ????? ????,??????????? ????-????? ????, ?? ???? ???????? ?????????.
  2. ??? ?? ????? ????????? ????? ?????? ?? ???, ??? SimpleClassLibrary ?? C:\Documents ?? Settings\user1\My Documents\Visual Studio 2005\projects ????? ???? ???
  3. (???? ?????? ???, Class1.vb) ???? ???? ?????, ?? ?????????? ???? ??? ????? ???? ????? ??? ?? ?????? ??? ?? ?????? ???? ?????? ???, ???? ???? ????? ?? ?????? ???? ????????

    ???:?? ?? ???? ????? (C# ??? ?????) ??, ??????? ?? instantiated ???????? ?? ????? ?? ??? ?????? ???? ?? ???? ??? ???? ?? ????? ?? ?? ?? ?? ?? ???? ??? ??? ??? ????? ??????? ?????? ?? ??? ?????? ?? ??? ????
    Public Class Class1
    
        Public Shared Function DoSomething() As String
            Return "string data returned from custom assembly"
        End Function
    
    End Class
    
  4. ?? ??? ??? ??? ???, ?? ??? ????? ????SimpleClassLibrary ?????????? ????????????? ??.. ?? ??? ??????? ?? ????????. dll ??? ?????? ??? ??????? ??? ???? ??? ???? ?????? ???, ?? ??? ???? ???????, SimpleClassLibrary.dll, ???? Documents\Visual Studio 2005\Projects\ SimpleClassLibrary\bin\Debug ??????? ??? ???? ?? ???

????? ??????? SQL ?????????? ???? ??????? ??? ????????? ?????

?????? ???? ??????? ??????? ??????? ?? ????? ?? ?????????? ???? ??? ??????? ???? ?? ???? ??? ???? ?? ???, ???? ?????? ????????? ????. dll ??????? ??????? ??????? ?? ??????? ????? ????????

???:?? ??? ?? ?????, ???? ??????? ?? ?? ???? ?? ?? ???? ???
  • ?????????? ???? 2005, ?? ??? ????? ????????? ?? ???. dll ?? ????????? ?????:
    • Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies ?????????
    • SQL Server\MSSQL.3\Reporting Services\ReportServer\bin Files\Microsoft ?????????
  • ?????????? ???? 2000 ?? ???, ????? ????????? ?? ???. dll ?? ????????? ?????:
    • ????????? Files\Microsoft SQL Server\80\Tools\Report ???????
    • SQL Server\MSSQL\Reporting Services\ReportServer\bin Files\Microsoft ?????????
???:?? ?? ??? ???? ??? ?? ????????? ???? ?? ??? ??, ??????? ?? ?? ??? tedious ?? ???? ???? ?? ???????? ?? ?? ????? ?? ???? ???? ?? ??? ??? ????? ?????? ???? ?? ????? ??? ????? ?? ????? ?? ???? ???
@ECHO OFF
REM   Name: SRSDeploy.bat
REM
REM   This batch files copies my custom assembly to my Reporting Services folders.
REM   Run this from the directory where the customer assembly was compiled.
REM   Be sure to close any applications that have your custom assembly open. 
REM
REM   This is the SQL Server 2005 version:
copy SimpleClassLibrary.dll "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies"  
copy SimpleClassLibrary.dll "C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin" 
REM This is the SQL Server 2000 version:
REM copy SimpleClassLibrary.dll "C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer"
REM copy SimpleClassLibrary.dll "C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin"
??? ????? ?? ????? ?? ????? ???? ????????? ??? ??? ????? post-build ????? ??? ??? ??? ???? ?? ???, ???? ????????? ?? ??? ?? ????? ???? ????? ?????????? ??????? ????? ????, ?? ???? ??????? ?????. ?? ????? ?????? ?????????? ????? ?? ??????? ?? ??? ?? .. ????????? ?????? ?? POST-build ?????, ?? ???? ??? ????? ???? ????:
"(TargetPath) $" "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\" ?? ????????? ?????
"(TargetPath) $" "C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin\" ?? ????????? ?????
?? ?? post-build ?????? ???? ??????? ?? ????? ????????? ???? ?? ??? ????? ???? ??? Post-build ????? ????? ?? ???? ??????? ?? ??? ????? Microsoft ?????? ??????? (MSDN) ??? ???? ?? ????:
HTTP://msdn2.Microsoft.com/en-us/library/42x5kfw4.aspx

?????????? ???? ??? ????? ??????? ??? ?? ?????? ??????

To add a reference to your custom assembly, open the Reporting Services report in Report Designer. ??? ???? ?? ???, ????? ????? ?? ???? ????::
  1. Open the report that will reference the custom assembly.
  2. ????? ??????????????? ??,??????? ???.
  3. ???????????? ???????? ????? ???, ????? ????????????? ?? ????? ????..
  4. ?? ?????????????, click the ellipsis (...) button that is next to the??????? ?? ???column header.

    ???:The????section is only for instance-based members. It is not for static members. Static (also referred to as "shared" in some of our Reporting Services documentation) means that the member is available to every instance of the class and every instance uses the same storage location. Static members are declared by using the shared keyword in Microsoft Visual Basic and the static keyword in C#. ?? ?? ??? confusing ?? ???? ???? ???? ???? ???? ??, ??? ???? ????? ??????? ??? ?????? ???? ?? ??? ???? ??????? ????? ???, ?? ???? ???? ???? ?? ??? ?? ??? ???????? ??? ????????? ???? ?? ??????????? ??????? ???? ??? ????? ?? ??? ?? ?????????? ???? ????????? ?? ??? ??? ????? Visual Basic ??? ???? ?????? ?? ????? ???? ???, ??? ?? ????? ?????????????? ???? ??????????????
  5. ??????????? ??????????? ????? ???, ????? ???????????. (SQL Server 2005 ??? ????? ??????????????.)
  6. ?????? ?????, ?? ???? ??? ????? ??????? ????? ????? ????? ????,?????. (??? SQL Server 2005, ????? ????add?? ?????????.)
  7. ??????????? ??????????? ????? ???, ????? ????OK.
  8. ???????????? ???????? ????? ???, ????? ????OK.
?? ?????????? ???? ??? ????? ??????? ?? ????? ???? ?? ??? ????? ?? ????
  1. ??????? ??????? ??? ??????? (??? .rdl ?????) ?? ??????
  2. ?????????? ???? ??? ????? ??????? ?? ????? ???? ?? ??? ???? demonstrate, ???? ?? ??? ??? ??? ????? ?? ??????? ??? ???? ?? ???, ????? ????? ??? ?? ???? ???? ??? ????? ??????? ???????
  3. ??? ????? ??? ??? ????? ????Value:???, ?? ???? ??? ????? ???????? ?? ????? ?? ??? ?????? ??? ?????
    =ClassLibraryName.ClassName.MethodName or Namespace.ClassName.MethodName
    ???? ?????? ???, ??? ????????? ????? ???
    =SimpleClassLibrary.Class1.DoSomething()
    ???? ?????? ??? ??? ?????????? ???? ?? ?????? ?? ??? ????? ???? ???? ??? ??? ?? ??? ???????? ??? ?????? ?? ???, ????? ?????? ?? ????? ?????
    =Code.MethodName()
    ??? ?? ?? ???????? ?? ????? ?? ???? ???-???????, ?? ???????-?????? ???? ?? ??? ????? ??????? ??? ???, ????? ?????? ?? ????? ?????
    =Code.InstanceName.Method
    ???:?? ???? ???? ??? ??? ???? ?????? differently ??? ??? ??????-?????? ???? ?? ????? ???? ?? ??? wanted ???? ??? ???? ?? ???, ???? ???? ???? ?? ???????? ?? ??????????? ???, ????? ?????????????, ?? ???? ??? ???? ?? ??? ?? ??? ???????? ??? ????????? ????????????

??? ????? ??????? ???????? ????????? ?? ??? ?????? ????? ??????? ?? ???

??? ????? ??????? ??????? ???????? ???? ?????? ?? ???? ????????? ?? ???????? ??, ??? ??? ????? ??????? ???????? ???? ???? ?????? ??? ??? ????? ??????? ?? ??? ?? ??? ?? ????????? ?? ?????? ???? ??, ?? ?? ???? ???? ?? ?? ??????? "#Error" ?? ???????? ?????? ?? ???? ???? ????? ???????? ?? ??? ??? ?????? ??? ?? ?? ??? ?? ?????? ??????? ?? ??? ?? ?? ????????? ???? ?? ??? ?? ???? ???, ?? ???? ????? ??????? ???? ?? ??? ???????? ????????? ???? ???? ???? ?? ???? ??? ??????? ????????? ?? ???, Microsoft ???????? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????:
842419???? ?????????? ???? ??? ?? ??????? ??? ???????? ???? ????? ??????? ???? ?? ??? ?????? ???
???:????? approach ?? ?? ??????? ??? ??? ????? ??????? ?????? ??????? ?? ??? ???, ?? ?? ????????? ???? ??? ??? ???? ?? ??? ??? ?? ??????? ???? ?? ?? ?? ????? ????? approach ??????? ??? ???? ????? ??????? ??? ????? ??????? ?? ?????? ???? ???

???? ????? ??????? ?? ??? ??? ??? CodeGroup ?? ?????, ?? ?? ????? ??????? ?? ?????? ???? ??? ???? ?? ???, ????????? Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\rssrvpolicy.config ???? ?????, ?? ???? ??? ????? ??? ???????
<CodeGroup class="UnionCodeGroup"
   version="1"
   PermissionSetName="FullTrust"
   Name="MyCodeGroup"
   Description="Code group for my data processing extension">
      <IMembershipCondition class="UrlMembershipCondition"
         version="1"
         Url="C:\pathtocustomassembly\customassembly.dll"
       />
</CodeGroup>
?? ??????? ???? ??? ?? ?????? ?? ???? ??? ???? ?? ??? ??? ???? ?? ????? ?? ??? ?? ?? ??????? ?????? ?????? ?? ???? ???? ??????? ???? ?? ??? ?????? ?? ????? assemblies ?? ?? ??? ??, ?? ?? ???? ????? ?? ??? ?????? ???

???:????? assemblies ????? ????? ????????? ??????? ??????? ??? ??? ???????, ?? ??? ???? ?? ?? ?? ?? ???? ?? ?? ?? ????? ??????? ??? ??????? ????? ?? ????? ?? ?????? ????, ??????? ???????? ???? ????????? ??? ?????????? ???? ??? ???? ??, ???????? ??? ??, ??????? ??????? "FullTrust" ????????? ?? ??? ????? assemblies ????? ??? ??? ??, ?? ?? ????? ?? ??????? ???? ?? ??? ???? ??????? ??????, ??????? ????? ??? ?? ?? ?? ?? ???????? ?????? ?? ???????? ???? ?? ???? ??? ?? ?????? ?? ???? ??, ?? ????? ??????? ?? ???????? ?????? ?? ???? ??????? ???????? ??? "#Error" ???? ???? ?? ?? ????? ?????

???????? ???

???????? ??? ?? ??? ???? ?? ??????:?????????? ???????? ????? ?? ??????? ?? ??? ?? .. ???????? ??? ?? ????? ???? ??? ?? ??? ???? ??????? ??? ??? ?? ??? ?? ????? ?????? ??? ??? ?? ?????? ??????? ??? ??? ?? ???? ????? ???? ????? ???, ?? ?? ????? ??????? ?? ?????? ?? ????? ??????? ???? ???????? ?????? ????? ???, ?? ????? ????? ?? ???? ????:
  1. ????? ??????????????? ??,??????? ???.
  2. ???????????? ???????? ????? ???, ????? ???????:??? ?? ????? ????.
  3. ????? ????? ??????, ?? ???? ??? ????? ????OK.
    Public Function EmbeddedFunction() as String
     	Return "this is from embedded code function"
    End Function
    
  4. ??????? ??? ?? ??? ??? ????? ??? ???????
  5. ???? ?? ??? ????? ??????Value:????
    =code.EmbeddedFunction
??? ?? ???? ?? his ????? ????? ?? ??? ???? ?? thank ???? ???????? ?? SQL ????? ?? Microsoft ????????? ?? ?? ?????? ??? in-depth ????? ?? ?? ???????? ?? ??? ????? ???? ?? ???? ???????? ?? ?? ???? ?? enjoys ??? ?? ?? ??? ?? ???? enjoyed ??? ????! ???? ?? ??? ???????! ?????, ?????? ?????? ?? ???? ????? ???? ?? ??? ????? ?????? ??????? ?????? ??? ??????? ?? ??? ??? ?? ???????? ????? ??? ????? ?? ??? ?????????????

???

???? ID: 920769 - ????? ???????: 06 ?????? 2010 - ??????: 2.0
???? ???? ???? ??:
  • Microsoft SQL Server 2005 Reporting Services
  • Microsoft SQL Server 2000 Reporting Services
??????: 
kbhowto kbmt KB920769 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:920769

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com