2011-08-09 5 views
0

SSRS로 보고서의 이름을 바꾸어야합니다. 솔루션 탐색기에서 이름을 바꾸어 수동으로 Visual Studio에서 할 수 있지만 일부 요구 사항 때문에 수동 방법을 피하는 것이 좋습니다. SSRS 2008?SSRS 보고서 이름 바꾸기 프로그래밍

답변

0

나는 당신이 무엇을하고 있는지 추측 할 수 있습니다. 난 당신이 보고서 뷰어 컨트롤에 대한 얘기가 아니라고 가정하고 클라이언트에 스트리밍되는 보고서 파일의 이름을 변경하려면? 다음과 같이 Content-Disposition HTTP 헤더를 사용할 수 있습니다.

Response.BinaryWrite(localReport.Render(reportFormat, 
     null, out mimeType, out encoding, out filenameExtension, 
     out streamids, out warnings)); 

switch (reportFormat) { 
    case "Excel": 
     Response.ContentType = "application/excel"; 
     Response.AddHeader("Content-Disposition", "attachment; filename="+_your name_); 
     break; 
    case "PDF": 
....