Share via


사용자 지정 보고서 항목 예제 추가 정보

[이 항목은 시험판 문서이며 이후 릴리스에서 변경될 수 있습니다. 빈 항목은 자리 표시자로 포함되어 있습니다. 알림: Microsoft에서는 더 많은 내용을 한국어로 제공하기 위해서 번역가가 번역하는 전통적인 방식 이외에도 다양한 기술을 이용하여 번역한 자료를 제공하고 있습니다. SQL Server 2008 R2의 시험판 제품에 포함된 일부 문서 역시 이런 기술을 사용하여 번역되었습니다. 이 문서는 번역가가 작업한 문서에 비하여 완성도가 떨어질 수 있으며 잘못된 단어, 구문, 문법 등의 실수를 포함할 수 있습니다. Microsoft에서는 이런 문제점들을 잘 알고 있으며 문제 개선을 위하여 노력하고 있습니다. 최종 버전에 포함될 문서는 전통적인 번역 방식을 통해 번역될 예정이므로 SQL Server 2008에서 제공된 것과 같은 수준의 번역된 문서를 사용하실 수 있을 것입니다.

이 예제는 SQL Server 2005 및 SQL Server 2008에서만 작동합니다. SQL Server 2005보다 이전 버전의 SQL Server에서는 작동하지 않습니다.

PolygonsCRI는 간단한 사용자 지정 보고서 항목 예제입니다. 이 예제에서는 Microsoft .NET Framework의 System.Component 클래스와 Microsoft.ReportDesignerMicrosoft.ReportingServices 네임스페이스의 클래스를 사용하여 보고서 디자이너에서 사용할 수 있는 사용자 지정 보고서 항목 런타임 구성 요소 및 디자인 타임 구성 요소를 구현합니다.

중요

예제는 교육용으로만 제공되므로 프로덕션 환경에서 사용하기에 적합하지 않으며 프로덕션 환경에서 테스트되지 않았습니다. Microsoft에서는 이러한 예제에 대해 기술 지원을 제공하지 않습니다. 시스템 관리자의 허가 없이 프로덕션 SQL Server 데이터베이스 또는 보고서 서버에 예제 응용 프로그램 및 어셈블리를 연결하거나 사용해서는 안 됩니다.

요구 사항

PolygonsCRI 예제를 사용하려면 Visual Studio 및 Microsoft Visual C#에 대해 잘 알고 있어야 하며 다음과 같은 시스템 요구 사항을 충족해야 합니다.

  • Microsoft SQL Server with Reporting Services.

  • Microsoft SQL Server Business Intelligence Development Studio.

  • Microsoft Visual Studio 2008.

  • Microsoft .NET Framework 2.0.

  • Reporting Services 예제.

  • 네트워크에서 액세스할 수 있는 권한이 있는 보고서 서버

    참고

    Business Intelligence Development Studio is not supported on Itanium-based computers. x64 기반 컴퓨터에서는 지원됩니다. If the SQL Server sample databases have been deployed on an Itanium-based computer, use BI Development Studio on either an x86-based or x64-based computer to modify and run the samples.

중요

SQL Server 예제 및 예제 데이터베이스를 보거나 사용하려면 먼저 다운로드하여 설치해야 합니다. 자세한 내용은 SQL Server 예제 및 예제 데이터베이스 설치 시 고려 사항을 참조하십시오.

위치

기본적으로 이 예제는 다음 디렉터리에 있습니다.

C:\Program Files\Microsoft SQL Server\100\Samples\Reporting Services\Extension Samples\PolygonsCustomReportItem Sample

예제 빌드

강력한 이름 키 파일을 생성하지 않았다면 다음 지침에 따라 해당 키 파일을 생성합니다.

강력한 이름의 키 파일을 생성하려면

  1. Microsoft Visual Studio 2005 명령 프롬프트를 엽니다. 시작을 클릭하고 모든 프로그램, Microsoft .NET Framework SDK 2.0을 차례로 가리킨 다음 SDK 명령 프롬프트를 클릭합니다.

    -- 또는 --

    Microsoft .NET Framework 명령 프롬프트를 엽니다. 시작을 클릭하고 모든 프로그램, Microsoft .NET Framework SDK 2.0을 차례로 가리킨 다음 SDK 명령 프롬프트를 클릭합니다.

  2. 디렉터리 변경 명령(CD)을 사용하여 명령 프롬프트 창의 현재 디렉터리를 예제가 설치된 폴더로 변경합니다.

    참고

    예제가 있는 폴더를 확인하려면 시작 단추를 클릭하고 모든 프로그램, Microsoft SQL Server, 설명서 및 자습서를 차례로 가리킨 다음 예제 디렉터리를 클릭합니다. 기본 설치 위치가 사용된 경우 예제는 <system_drive>:\Program Files\Microsoft SQL Server\100\Samples에 있습니다.

  3. 명령 프롬프트에서 다음 명령을 실행하여 키 파일을 생성합니다.

    sn -k SampleKey.snk

    중요

    강력한 이름 키 쌍에 대한 자세한 내용은 MSDN의 .NET Development Center에서 "Security Briefs: Strong Names and Security in the .NET Framework"를 참조하십시오.

강력한 이름의 키 파일을 생성하려면

  1. Microsoft Visual Studio 2005 명령 프롬프트를 엽니다. Click Start, point to All Programs, point to Microsoft Visual Studio 2008, then point to Visual Studio Tools, and then click Visual Studio 2008 Command Prompt.

  2. 디렉터리 변경 명령(CD)을 사용하여 명령 프롬프트 창의 현재 디렉터리를 예제가 설치된 폴더로 변경합니다.

  3. 명령 프롬프트에서 다음 명령을 실행하여 키 파일을 생성합니다.

    sn -k SampleKey.snk
    

    참고

    강력한 이름 키 쌍에 대한 자세한 내용은 MSDN의 .NET Development Center에서 보안 정보: .NET Framework의 강력한 이름 및 보안(Security Briefs: Strong Names and Security in the .NET Framework)"을 참조하십시오.

PolygonsCRI 예제를 빌드하려면

  1. Open the CS\PolygonsCRI.sln project file into Visual Studio 2008.

  2. 빌드 메뉴에서 솔루션 빌드를 선택합니다.

예제 배포

PolygonsCRI 예제를 배포하려면

  1. Edit the rsreportserver.config file (by default located in the directory %PROGRAMFILES%\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer) to register the PolygonsCRI:

    • Insert the following lines before the </Extensions> line:

      <ReportItems>
         <ReportItem Name="Polygons" Type="Microsoft.Samples.ReportingServices.PolygonsCustomReportItem,PolygonsCRI"/>
      </ReportItems>
      
  2. Edit the rssrvpolicy.config file (by default located in the directory %PROGRAMFILES%\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer) to add a code group for the custom report item:

    • Add the following lines and change the PROGRAMFILES string to the %PROGRAMFILES% directory:

      <CodeGroup 
         class="UnionCodeGroup" 
         version="1" 
         PermissionSetName="FullTrust"
         Description="This code group grants PolygonsCRI.dll FullTrust permission. ">
         <IMembershipCondition 
         class="UrlMembershipCondition"
         version="1"
         Url="C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\bin\PolygonsCRI.dll" />
      </CodeGroup>
      
  3. Edit the rsreportdesigner.config file (by default located in the directory %PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies) to register the run-time component, the design-time component, and the item type converter:

    • Add the following lines before the </Extensions> line:

      <ReportItems>
         <ReportItem Name="Polygons" Type="Microsoft.Samples.ReportingServices.PolygonsCustomReportItem,PolygonsCRI"/>
      </ReportItems>
      <ReportItemDesigner>
         <ReportItem Name="Polygons" Type=" Microsoft.Samples.ReportingServices.PolygonsDesigner, PolygonsDesigner" />
      </ReportItemDesigner>
      
  4. Copy the PolygonsCRI.dll file from the CS\PolygonsCRI\Bin\Debug directory where you copied the sample project to the Visual Studio private assemblies directory (by default, %PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies).

  5. Copy the PolygonsCRI.dll file from the CS\PolygonsCRI\Bin\Debug directory where you copied the sample project to the Microsoft SQL Server Reporting Services bin directory (by default, %PROGRAMFILES%\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\Bin).

  6. Copy the PolygonsDesigner.dll file from the CS\PolygonDesigner\Bin\Debug directory to the Visual Studio private assemblies directory (by default, %PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies).

예제 실행

이 섹션에는 Visual Studio에서 Polygon 사용자 지정 보고서 항목을 참조하고 테스트하는 방법을 보여 주는 간단한 연습이 포함되어 있습니다.

PolygonDesigner를 Visual Studio 도구 상자에 추가하려면

  1. Visual Studio 도구 상자를 마우스 오른쪽 단추로 클릭합니다.

  2. 항목 선택을 선택합니다.

  3. Navigate to the %PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies folder and select PolygonsDesigner.dll.

예제를 실행하려면

  1. Visual Studio에서 \PolygonsReport\Polygons.sln 예제 보고서 프로젝트를 엽니다.

  2. 예제 보고서에서 미리 보기 탭을 클릭하거나, 예제 보고서를 서버에 배포하고 예제 보고서를 실행합니다.

To publish and view the sample on the report server

  1. 명령 프롬프트에서 다음 명령을 실행하여 Reporting Services 서비스를 다시 시작합니다.

    net stop "SQL Server Reporting Services (Instance_Name)
    net start "SQL Server Reporting Services (Instance_Name)
    
  2. With the Polygons.sln solution opened, in the Solution Explorer, right-click the Polygons project, and click Deploy.

  3. In the brower, access the report server URL and click the Polygons report to view it.

Visual Studio에서 PolygonDesigner 사용자 지정 컨트롤을 사용하여 보고서를 편집하려면 다음 중 하나를 수행합니다.

  • 속성 브라우저에서 다각형 컨트롤의 속성을 설정합니다.
  • 컨트롤의 바로 가기 메뉴를 통해 속성을 편집합니다.
  • 필드 목록에서 컨트롤의 놓기 영역으로 필드를 끌어 옵니다.

참고 항목

태스크

코드 예제 컴파일 및 실행
Reporting Services 예제

관련 자료

사용자 지정 보고서 항목 구현 요구 사항
확장 프로그램 예제(Reporting Services)

도움말 및 정보

SQL Server 2008 R2 지원 받기