Hi Greg I wrote an article similar to this topic. It was back in Silverlight 2, but most of the concepts still hold. It involves generating a PDF on the fly on the server and streaming it through to the client for display in an Iframe overlaid on your application. That's not possible in OOB scenarios, but Silverlight 4 has the WebBrowser control that you could use to display it in OOB mode. As Miguel said, you can pretty easily generate a docx file instead (on either the client or the server) and display it in the Iframe (assuming the clients have Word 2007 or later installed, or the docx filters for Office 2003) - it's actually really easy to do as a docx file is just a zip file and makes the process really easy. I once worked with WordML (for Office 2003), though I'd avoid that if possible, as it's pretty nasty stuff. The issue generating reports/documents server side is when the user wants to print the screen, or populate a report without saving the data back on the server - although you can find ways to still do that without too much trouble. My article here should hopefully help you somewhat: http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-6.aspx. Blatant self promotion: I'm currently writing a book called Pro Business Applications in Silverlight 4 for Apress, due out mid-year. It covers all of this sort of stuff, and there is a chapter dedicated to reporting in Silverlight 4, covering what's in the article above and a lot of the new features available in Silverlight 4 to support reporting scenarios.
Regards Chris Anderson Twitter: @christhecoder 2010/2/28 Miguel Madero <[email protected]> > If it's something simple Html could be enough. You could generate Html from > Silverlight and then save it as a file with a docx or xlsx extension. > If you could use a template, it might be simple to open an existing Office > File, set the values in the placeholders and save it back. > You could generate it from scratch, but it would require a good knowledge > of the format, which I don't think it's worth expending time on. > > This post might give you some ideas of what you could do with SharpLib and > messing with the xml > > http://www.dotnetsolutions.co.uk/blog/archive/2009/07/21/writing-ms-office-documents-from-silverlight-3/ > > About your first option, it's certainly possible to open a new window. > > System.Windows.Browser.HtmlPage.Window.Navigate("myUrl","_blank"); > > That will do a get on a new window. This needs to be invoked in response to > a user action (e.g. a click). If you need to do a post instead of get, it's > possible using the HtmlBridge, let me know and I can send you a sample. > > > -- > Miguel A. Madero Reyes > www.miguelmadero.com (blog) > [email protected] > > _______________________________________________ > ozsilverlight mailing list > [email protected] > http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight > >
_______________________________________________ ozsilverlight mailing list [email protected] http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
