Creating Reports in Silverlight (either as PDF or send it off to a printer) -


i have attempted generate reports in silverlight 4. in problem domain, these reports either need go directly printer and/or client-side sl application creates pdf , allows user store somewhere.

as report, it's composed of 50% flow text (incl. enumerations), 30% tables , 20% charts. flow text part makes slighty more challenging, proper line breaking have take place.

so far, have tried following approaches - each own shortcomings make them not feasible:

  • silverlight's own printdocument: technically, there 2 major concerns. one, getting page breaks work , printing uielements on proper layout bit of dirty hackjob , full of compromises; thankfully that's part i've managed working far. however, printdocument class renders visuals bitmaps before sending them off; not fun, if 1 uses pdf printer , hopes still able search in / select text. david poll's approach in "silverlight , beyond" [1] wasn't helpful inherently follows same approach , suffers similar issues.

  • silverpdf [2]: barely documented library requires of layout manually (the former approach @ least allowed me re-use silverlight's layouting engine). far, see no way (for instance) measure paragraphs , sample long flowtext uses hardcoded absolute values layout rectangles. also, developing party seems inactive.

personally, i'm thinking of following entirely different strategy: generate html documents. hoping community here might have hints 2 approaches above or know other approaches.

thanks in advance, ~manny

do need generate report on client, or can server generate it? options better if can generate on server. personally, think way silverlight printing works @ moment pretty poor report usage (sending each page printer raster rather vector, resulting in potentially huge amounts of data travelling through network, , lower printing quality output). i've found best strategy generate pdf on server (enabling take advantage of reporting engine), , display in application. there few commercial products (such telerik's silverlight report viewer, report sharp shooter, or first floor software's document toolkit). if client side solution required, perhaps 1 of these might best option (although printing quality still poor). note silverlight 5 supposed have support vector printing, it's 6 months or more away release. yet option pete brown , david poll's open source reporting framework here: http://silverlightreporting.codeplex.com/.

if want take option of generating report on server pdf , displaying in application, i've written article on doing here: http://www.silverlightshow.net/items/building-a-silverlight-line-of-business-application-part-6.aspx. doesn't work oob applications, source code accompanying book (pro business applications silverlight 4) does: apress.com/book/view/9781430272076.

hope helps...

chris anderson


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -