asp.net - Create crystal report in webservice method -


ok have soap web service used mobile application, want add new webmethod creates report through crystal report , save in folder. don't want use reports published webservices, want report created directly webmethod. how be? nb: using visual studio 2010 , vb.net language.

you need download cr_for_vs package , use reportdocument class export folder

edit: code

you need reference crystal libraries in project use reportdocument class. code below should give start.

  reportdocument rep = new reportdocument();         rep.load(server.mappath("~/report/quote.rpt"));          rep.setdatabaselogon(global.sqlusername, global.sqlpassword, global.sqlserver, global.sqldatabase);          foreach (reportdocument subrep in rep.subreports)         {             subrep.setdatabaselogon(global.sqlusername, global.sqlpassword, global.sqlserver, global.sqldatabase);         }          rep.setparametervalue("quoteid", sessionstore.current.currentquoteid);         rep.exporttodisk(crystaldecisions.shared.exportformattype.portabledocformat, sessionstore.current.downloadpath + "/" + gvrparent.cells[(int)gvquotescolumnindex.quoteno].text + ".pdf"); 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -