2012-10-31 5 views
0

VS2010 RDLC 보고서에 표가 있습니다. 일부 공간을 절약하려고하기 때문에 영수증을 인쇄 할 때와 같이 데이터를 인쇄합니다.RDLC의 열에서 표 반복하기

새 페이지를 시작하기 전에 동일한 페이지에서 두 번째 열로 테이블을 반복하고 싶습니다. 예를 들어 :

Table   Table 
Table   Table 
Table   Table 
Table   Table 
Table   Table 
=== page break ===== 

대신

Table 
Table 
Table 
Table 
Table 
Table 
Table 
====page break===== 
Table 
Table 
Table 

는 어떻게 테이블에 두 번째 열을받을 수 있나요?

+0

방금 ​​Number of Columns의 Report 속성을 찾아서 2로 변경했습니다. 다른 Report를 인쇄했지만 아직 아무것도 인쇄하지 않았습니다. 아직도 주위에 원숭이가있다. –

답변

0

보고서 속성에는 열 속성이 있습니다.
두 개 (2)로 변경했습니다.
그러나 기본 보고서 뷰어는 열을 표시하지 않으며 열을 인쇄하지 않습니다.

그래서 보고서를 PDF로 내 보낸 다음 해당 파일을 인쇄했습니다.

ProcessStartInfo psi = new ProcessStartInfo(); 
psi.UseShellExecute = true; 
psi.Verb = "print"; 
psi.WindowStyle = ProcessWindowStyle.Hidden; 
psi.FileName = "output.pdf"; 
Process.Start(psi); 

내가가 필요에 따라 정확히 인쇄 된 보고서 : 다음

private void Export(LocalReport report) 
{ 
     try 
     { 
      string deviceInfo = 
       @"<DeviceInfo> 
      <OutputFormat>PDF</OutputFormat> 
      <PageWidth>8.5in</PageWidth> 
      <PageHeight>11in</PageHeight> 
      <MarginTop>0.25in</MarginTop> 
      <MarginLeft>0.25in</MarginLeft> 
      <MarginRight>0.25in</MarginRight> 
      <MarginBottom>0.25in</MarginBottom> 
      </DeviceInfo>"; 
      Warning[] warnings; 
      string[] streamIds; 
      string mimeType = string.Empty; 
      string encoding = string.Empty; 
      string extension = string.Empty; 

      m_streams = new List<Stream>(); 
      byte[] bytes = report.Render("PDF", deviceInfo, out mimeType, out encoding, out extension, out streamIds, out warnings); 

      using (FileStream fs = new FileStream("output.pdf", FileMode.Create)) 
      { 
       fs.Write(bytes, 0, bytes.Length); 
      } 

      foreach (Stream stream in m_streams) 
       stream.Position = 0; 
     } 
     catch (Exception ex) 
     { 
      Common.LogManager.WriteToLog(ex.Message + Environment.NewLine + ex.StackTrace); 
     } 
    } 

내가 새로운 프로세스에 인쇄 도스 명령을 사용하여 인쇄 할 수 있습니다.