Page 1 of 1

Passing Data to Report

Posted: Wed Oct 10, 2012 3:26 pm
by adamaka
Hello,
I'm trying out the trial for this product before our company buys it, and I can't seem to figure out how to hand data off to a report created in the designer. I've tried looking through the documentation, but there isn't much specific to WinRT. I can get a report to show using this:

Code: Select all

StiReport report = new StiReport();
await report.LoadAsync(storageFile);
await report.RenderAsync();
viewerControl.Report = report;
However, I want to hand it some data before rendering & printing. Let's just say, for example, I wan to pass a ProductName and ProductQuantity to the report. Do I use BusinessObjects or some kind of DataSource? report.RegBusinessObject doesn't seem to do much for me, but maybe I'm doing it wrong.

Looking forward to your reply. Thanks.
-Andy

Re: Passing Data to Report

Posted: Thu Oct 11, 2012 1:20 pm
by Alex K.
Hello,

The WinRT native version supports only the business objects in the form of connecting ones to the report (i.e., you need to use the RegBusinessObject() method).
You can create yourself a business object as a class, fill it with data, or can follow any responses to use our implementation of the DataSet (i.e., using any database or a database connection with our tools, or separately supplied class, create a file, which can then be easily connect as a business object in WinRT)
more information at -
http://blog.stimulsoft.com/?p=1247
The article was written for Silverlight, but it works similarly in WinRT.

Thank you.

Re: Passing Data to Report

Posted: Thu Oct 11, 2012 3:12 pm
by adamaka
Thanks, I've got it working now

Re: Passing Data to Report

Posted: Thu Oct 11, 2012 3:57 pm
by Anton Lozovskiy
Hello,

Let us know if you need any additional help.

Thank you.