Page 1 of 1

Report Silverlight

Posted: Mon Apr 23, 2012 3:23 pm
by NadiaTeles
Hi.

I created report silverlight with RegBusinessObject.

First Problem:
On the first time wcf returns 5 registers, the list is filled with these 5 registers and the report is presented correctly.

In the second time wcf returns 2 registers, the list is filled with these 2 registers, but the report still continues presented the previous one with 5 registers.

The code below is in method completed wcf.
void servicoWCF_ReportCompleted(object sender, ReportCompletedEventArgs e)
{

The object dataRelatorio it is filled dynamically.
filling dataRelatorio.....


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

StiReport report = new StiReport();
report.Load(sr.BaseStream);
sr.Dispose();
report.CalculationMode = StiCalculationMode.Interpretation;
report.RegBusinessObject("Data", "Data", dataRelatorio);
report.Render();
report.Show();
}
Second Problem:

On the first time when executing the report, the progressbar it does not appear, only of second in ahead.

report.Progress = new StiProgressInformation();
report.Progress.IsMarquee = true;
report.Progress.Start("Teste", "Aguarde, carregando relatório....", true);

You could insert to progressbar in the example of silverlight with RegBusinessObject.

Thankyou

Teles




Report Silverlight

Posted: Wed Apr 25, 2012 3:39 am
by Alex K.
Hello,
NadiaTeles wrote:First Problem:
Please try to use the following code:
...
report.RegBusinessObject("Data", "Data", dataRelatorio);
report.Dictionary.SynchronizeBusinessObjects(...)
...
NadiaTeles wrote:Second Problem:
You can use the StiSLViewerControl and call the StartProgressInformation(..) method.

Thank you.