2013-02-28 3 views

답변

2

Crystal Reports를 제한 HTML 형식을 가지고있다. This Forum Post (Google의 경우 more)을 참조하십시오. 저는 최근에 HTML을 사용하여 보고서에 형식을 지정하려고했지만 div를 지원하지도 않는다는 사실을 발견했습니다. 대부분의 CSS 특성은 지원되지 않습니다. 결국 RTF 서식을 사용해야했습니다 (Legal Letters의 단락 양쪽 맞춤 옵션이 필요했기 때문에).

희망,

-1

CSS는 웹 응용 프로그램에서만 작동합니다. Windows 응용 프로그램의 모양과 느낌을 사용자 정의하려면 XML 파일이나 리소스 파일을 사용할 수 있습니다. 모든 컨트롤 설정을 XML 또는 res 파일에 지정하고 런타임에 창 응용 프로그램 폼이로드 될 때이 파일을 사용하십시오. 비주얼 스튜디오에 대한

샘플 XML

<?xml version="1.0" encoding="utf-8" ?> 
<StylesSheetFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
    <Styles> 
     <Style Name="FormType1"> 
      <Properties> 
       <Property Name="BackColor" Value="White" /> 
       <Property Name="Text" Value="Personal information" /> 
       <Property Name="Enabled" Value="true" /> 
      </Properties> 
     </Style> 
     <Style Name="DataGridType1"> 
      <Properties> 
       <Property Name="RowsDefaultCellStyle.BackColor" 
          Value="White" /> 
       <Property Name="AlternatingRowsDefaultCellStyle.BackColor" 
          Value="214,222,247" /> 
       <Property Name="Columns[0].HeaderText" 
          Value="Color name" /> 
       <Property Name="Columns[1].HeaderText" Value="My rate" /> 
      </Properties> 
     </Style> 
     <Style Name="TabControlType1"> 
      <Properties> 
       <Property Name="Enabled" Value="true" /> 
       <Property Name="TabPages[0].BackColor" Value="White" /> 
       <Property Name="TabPages[1].BackColor" Value="White" /> 
       <Property Name="TabPages[2].BackColor" Value="White" /> 
      </Properties> 
     </Style> 
     <Style Name="LabelType1"> 
      <Properties> 
       <Property Name="TextAlign" Value="TopLeft" /> 
       <Property Name="BorderStyle" Value="None" /> 
       <Property Name="ForeColor" Value="72,94,158" /> 
       <Property Name="Font" 
          Value="Microsoft Sans Serif,8.25pt,style=Regular" /> 
       <Property Name="Height" Value="20" /> 
       <Property Name="Enabled" Value="true" /> 
      </Properties> 
     </Style> 
     <Style Name="LabelType2"> 
      <Properties> 
       <Property Name="ForeColor" Value="Red" /> 
       <Property Name="Font" 
          Value="Microsoft Sans Serif,8.25pt,style=Bold" /> 
      </Properties> 
     </Style> 
     <Style Name="TextBoxType1"> 
      <Properties> 
       <Property Name="TextAlign" Value="Left" /> 
       <Property Name="BorderStyle" Value="Fixed3D" /> 
       <Property Name="Font" Value="Tahoma,10,style=Regular" /> 
       <Property Name="Height" Value="20" /> 
       <Property Name="Width" Value="200" /> 
       <Property Name="BackColor" Value="214, 222, 247" /> 
      </Properties> 
     </Style> 
     <Style Name="HyperLinkType1"> 
      <Properties> 
       <Property Name="BorderStyle" Value="None" /> 
       <Property Name="ForeColor" Value="Blue" /> 
       <Property Name="Font" 
          Value="Tahoma,10,style=Italic,Underline" /> 
       <Property Name="Height" Value="30" /> 
       <Property Name="Width" Value="200" /> 
       <Property Name="Enabled" Value="true" /> 
      </Properties> 
     </Style> 
     <Style Name="ButtonType1"> 
      <Properties> 
       <Property Name="TextAlign" Value="TopLeft" /> 
       <Property Name="ForeColor" Value="Black" /> 
       <Property Name="BackColor" Value="214;222;247" /> 
       <Property Name="Font" Value="Tahoma,8.25,style=Italic" /> 
       <Property Name="Height" Value="23" /> 
       <Property Name="Enabled" Value="true" /> 
      </Properties> 
     </Style> 
     <Style Name="ComboBoxType1"> 
      <Properties> 
       <Property Name="BackColor" Value="White" /> 
       <Property Name="Font" Value="Tahoma,10,style=Italic" /> 
       <Property Name="Height" Value="30" /> 
       <Property Name="Width" Value="200" /> 
       <Property Name="Enabled" Value="true" /> 
      </Properties> 
     </Style> 
     <Style Name="RadioButtonType1"> 
      <Properties> 
       <Property Name="ForeColor" Value="Blue" /> 
       <Property Name="Font" Value="Verdana,8,style=Regular" /> 
       <Property Name="Width" Value="150" /> 
       <Property Name="Enabled" Value="true" /> 
      </Properties> 
     </Style> 
    </Styles> 
</StylesSheetFile> 
+0

Winforms에서 .aspx 페이지는 어디에서 찾을 수 있습니까? 그 WebForms 아니라 WinForms에 대한 질문을 읽을 희망이 – Rohit

+0

그래, 당신은 winforms 애플 리케이션에서 CSS를 사용할 수 없습니다. 앱에 브라우저를 내장하고 표시되는 페이지에는 CSS를 사용할 수 있지만 실제 컨트롤에서는 사용할 수 없습니다. 폼의 컨트롤 렌더링을 제어 한 다음 해당 컨트롤에 스킨을 적용 할 수있는 다양한 라이브러리를 사용할 수 있습니다. 이렇게하면 실행하는 데 필요한 메모리 및 처리 능력이 증가합니다. WPF에서 작업하는 경우이 기술이 내장되어 있으므로 사용자 정의 스킨에 훨씬 더 적합합니다. –

관련 문제