using silverlight viewer in client side

Stimulsoft Reports.Silverlight discussion
Jalal
Posts: 66
Joined: Sat Oct 09, 2010 4:10 am
Location: Palestine

using silverlight viewer in client side

Post by Jalal »

Hey all,

I am trying to use silverlight viewer in client side in order to view a sample report. I followed this tutorial (http://www.stimulsoft.com/livedemos.SL/ ... light.html) and everything works fine. But when i tried to load mrt file using open file dialog, then convert it to byte[] and use "report.load", it doesn't work. I am using business object as data source, but viewer show nothing when i load mrt from outside.

Any ideas please ?

Regards,
Jalal
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

using silverlight viewer in client side

Post by Jan »

Hello Jatal,

Please show your code.

Thank you.
Jalal
Posts: 66
Joined: Sat Oct 09, 2010 4:10 am
Location: Palestine

using silverlight viewer in client side

Post by Jalal »

Thanks for your reply.

My code :

var ofd = new OpenFileDialog { Filter = "mrt Files (*.mrt)|*.mrt", Multiselect = false };
if (!((bool)ofd.ShowDialog())) return;


using (FileStream s = ofd.File.OpenRead())
{
mrtDataByte = new byte[s.Length];
s.Read(mrtDataByte, 0, Convert.ToInt32(s.Length));

}

StiReport report = new StiReport();
report.Load(mrtDataByte);
report.RegBusinessObject("Category1", "Invoice", new invoice() { invoiceNumber = "123", Title = "invoice title" });
report.Dictionary.SynchronizeBusinessObjects();
report.Render();
report.Show();

----> Nothing appeared when i use this code. But if I use report.Design() , then i can see the report ( preview doesn't work in designer since i read that Stimulsoft still working on )
Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

using silverlight viewer in client side

Post by Stéphane »

Same problem for me, the viewer shows always a blank page.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

using silverlight viewer in client side

Post by Jan »

Hello,

Unfortunately Silverlight does not support compilation in runtime. We use compilation for create report class in our report engine. This is why sample which provided use reports as source code. But we have on final stage of testing interpretator which will be used in silverlight version of our product. In this case report engine can render report without compilation. Interpretation mode will be available in few weeks.

Thank you.
Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

using silverlight viewer in client side

Post by Stéphane »

Bad news...

I think I will wait a moment before using Reports.Silverlight product...
I let you work hard on it :biggrin:

Cordially,
Kakone.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

using silverlight viewer in client side

Post by Alex K. »

Hello,

On Tuesday the prerelease build will be live. You will be able to download the .mrt file containing the data based on business objects. Also Preview will work in the designer.

Thank you.
Jalal
Posts: 66
Joined: Sat Oct 09, 2010 4:10 am
Location: Palestine

using silverlight viewer in client side

Post by Jalal »

Aleksey wrote:Hello,

On Tuesday the prerelease build will be live. You will be able to download the .mrt file containing the data based on business objects. Also Preview will work in the designer.

Thank you.
May you send me the link of the prerelease, since i can't find it in the download page.

Regards,
Jalal
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

using silverlight viewer in client side

Post by Alex K. »

Hello,

Prerelease build already available for download on our site.
http://stimulsoft.com/Downloads.aspx

Thank you.
Jalal
Posts: 66
Joined: Sat Oct 09, 2010 4:10 am
Location: Palestine

using silverlight viewer in client side

Post by Jalal »

Thanks Jan and Aleksey,

Now it works well. I can load mrt file and see it in designer. Moreover i can use viewer to see my rendered report.

Great Job.

Regards,
Jalal
Locked