We are evaluating your solution on our Silverlight Application.
What we want is add Data (as Business Object or Data Source) and then let the user build its report.
We run into some issues and will be great if we have some clarification:
(We have a SL Application running with RIA Services, MVVM pattern and Stimulsoft Reports.Ultimate 2011.1 Trial libraries)
How to register Data and it appears on Business Objects?
If we register like this, doesn't appears
Code: Select all
StiReport report = new StiReport();
report.CalculationMode = StiCalculationMode.Interpretation;
report.RegBusinessObject(FonteSelecionada.Nome, FonteSelecionada.Nome, DataTable);
designer.Report = report;
designer.InvokeRebuildDesigner();
Code: Select all
StiReport report = new StiReport();
report.CalculationMode = StiCalculationMode.Interpretation;
report.RegBusinessObject(FonteSelecionada.Nome, FonteSelecionada.Nome, DataTable);
report.Design();
Because, we registered a DataTable (our dataTable, not the System.Data.DataTable) and it worked well, but when the designer tries to render it, the Data goes away.
(On the "WCF Render Method" I need to register the Data Again?)
Code: Select all
void WCFService_WCFRenderReport(object sender, Stimulsoft.Report.Events.StiWCFEventArgs e)
{
designer.StartProgressInformation("WCF Service", StiLocalization.Get("DesignerFx", "CompilingReport"), System.Windows.Visibility.Visible, true);
InvokeOperation invoke = domain.RenderReport(e.Xml);
invoke.Completed += new EventHandler(invoke_Completed);
}
void invoke_Completed(object sender, EventArgs e)
{
InvokeOperation invoke = sender as InvokeOperation;
if (!invoke.HasError)
designer.ApplyRenderedReport(invoke.Value);
designer.CloseProgressInformation();
}
/////WCF (RIA Method)
[Invoke]
public string RequestFromUserRenderReport(string xml)
{
StiReport report = EncodingHelper.DecodeXmlRequestFromUser(xml, ds);
if (report.CompilerResults.Errors.Count > 0)
{
return RenderingReportHelper.GetErrorListXml(report);
}
bool error = false;
try
{
report.Render(false);
}
catch
{
error = true;
}
if (!error)
{
return RenderingReportHelper.CheckReportOnInteractions(report, true);
}
return null;
}
If not, can u show me (or indicate me a thread/how-to what does) a way to register a Connection programmatically and add a DataSource?
Thank in advance,
Eduardo Fleck