I am in a process of building an intranet application entirely using silverlight 3. On one of the page, I need to generate an excel report. Users can select few parameters through UI and will hit submit button, then silverlight shall generate an excel report & popup a window allowing users to save the generated report.
Is there anyway to implement this in easy and straight forward way?
The following are the steps I could think of but still not completely clear how to approach this problem.
- User selects few comboboxes, and selects listbox
- User hits the submit button
- btnSubmit_Click(submit button click event handler) will call "takeQueryParamsAsync" WCF service call
- WCF service on server side creates a dynamic sql query and executes the query and fetches the data
- Silverlight client gets notified that fetching data is completed by calling the callback function "takeQueryParamsAsync_Completed"
now how the silverlight client requests the generation of the report from the server and how will it give generated report to the user? Does it have to call another wcf service in the "takeQueryParamsAsync_Completed" callback function to request the report file from the fetched data? If so how will wcf service remember that it is the same client that requested data fetch from db with those specific query parameters? Do I have to maintain state between wcf service and silverlight? Isnt there any simpler solution?
client side excel report generation is not an option(because the generated excel file shall contain excel charts). Is it really that hard? or Am I just overcomplicating myself not knowing how to implement it?
Any pointers or code samples will be great. Thank you.
I am sure that there should be an elegant solution for this.