Exportar Reporte PDF

download Exportar Reporte PDF

of 2

Transcript of Exportar Reporte PDF

  • 8/9/2019 Exportar Reporte PDF

    1/2

    http://www.codeproject.com/Tips/220659/Reporting-Services-PDF

    !porting # S$% Server Reporting Services 2005 Report Direct&' to PDF or !ce&

    !porting # S$% Server Reporting Services 2005 (SSRS) Report Direct&' toPDF/ !ce& is # h#nd' w#' o* gener#ting high +,#&it' reports witho,t eing st,c to,sing the Report iewer inter*#ce. Sometimes the Report iewer inter*#ce is #n,nnecess#r' step ,t other times the Report iewer won1t render correct&' eventho,gh the ,nder&'ing report is correct. This is especi#&&' tr,e when 'o,r #,diencemight ,se Fire*o! or S#*#ri (or #n'thing other th#n ) since the Report iewercontro& #&most never o,tp,ts # re#d# &e report. 3* co,rse it wo,&d e nice to j,sth#ve # ,tton on 'o,r p#ge th#t gener#tes # PDF or !ce& 4&e in #n' rowser #nd,ses #n SSRS #c -end to do #&& o* the report cre#ting #nd he#v' &i*ting.

    The *o&&owing code wi&& show how to e!port s,ch # report inc&,ding the p#ssing o*#n #r itr#r' n,m er o* c,stom p#r#meters. ote th#t the identit' o* the #pp&ic#tionpoo& th#t 'o,r we site r,ns ,nder wi&& need to h#ve #t &e#st rowser #ccess tothe *o&der cont#ining the report 'o, w#nt to disp'. This is ,s,#&&' prett' simp&e i*oth S #nd SSRS server #re within the s#me dom#in ,t it might e tric ' i* thisis not the c#se.

    7o&pse 87op' 7ode

    icroso*t.Reporting. e Forms.Report iewer rview ; new icroso*t.Reporting. e Forms.Report iewer()ppSettings?@ReportServer@A)dd( new icroso*t.Reporting. e Forms.ReportP#r#meter(@P#r#mE G #&,eE ))dd( new icroso*t.Reporting. e Forms.ReportP#r#meter(@P#r#m2 G #&,e2 ))ddIe#der(@7ontent-disposition@ G4&en#me;o,tp,t.!&s@)