Page 1 of 1

Fail to load data from database.

Posted: Tue May 01, 2018 11:07 pm
by brandnewkeith
I have design a report using the designer, the data is loading from database using a query in the report designer.
After that, I try to view the .mrt in my UWP app.
The app can successfully load the mrt, however the data is not loaded from the database, and the report is blank.
What am I missing? I have search all over the internet and cannot find a solution.

Code: Select all

StorageFolder folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
            string reportFile = @"Assets\Report.mrt";
            StorageFile storageFile = await folder.GetFileAsync(reportFile);

            StiReport report = new StiReport();            
            await report.LoadAsync(storageFile);      
await report.RenderAsync();                        
viewerControl.Report = report;   

Re: Fail to load data from database.

Posted: Wed May 02, 2018 8:53 am
by HighAley
Hello.

The databases are not supported by Reports.UWP.
You could use business objects only.

Please, find samples on GitHub.

Thank you.