Page 1 of 1

native silverlight client saving user amended reports

Posted: Tue Jun 28, 2011 5:22 pm
by emtopping
Hi, can you give me a specific example of how I can persist a user amended report to either the client or server please. Currently evaluating so not an expert.

I get a report like this:

System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
StreamReader sr = sr = new StreamReader(a.GetManifestResourceStream("PayrollReports.Report.mrt"));

_report.Load(sr.BaseStream);
sr.Dispose();

but how do I save?

Please post explicit instructions as I have trouble looking at the samples...


Thanks

native silverlight client saving user amended reports

Posted: Wed Jun 29, 2011 6:41 am
by Anton Lozovskiy
Hello,

You can use the StiActions.MainMenu.InvokeReportSaveAs(designer) method.

Thank you.

native silverlight client saving user amended reports

Posted: Wed Jun 29, 2011 7:31 pm
by emtopping
Thanks, can you give me a few lines of code as a sample?

This is my object:

private StiReport _report = new StiReport();


native silverlight client saving user amended reports

Posted: Thu Jun 30, 2011 12:14 am
by Anton Lozovskiy
Hello,


private StiReport _report = new StiReport();

System.IO.FileStream saveFile = new System.IO.FileStream(...);
_report.Save(saveFile); // Save Report

System.IO.FileStream saveDocument = new System.IO.FileStream(...);
_report.SaveDocument(saveDocument); // Save Document

Thank you.

native silverlight client saving user amended reports

Posted: Thu Jun 30, 2011 4:43 am
by emtopping
Many thanks, Anton

native silverlight client saving user amended reports

Posted: Thu Jun 30, 2011 8:57 am
by Andrew
Hello,

Great! have a nice day!