Charts using Business Objects

Stimulsoft Ultimate discussion
Post Reply
charlvdb
Posts: 19
Joined: Fri Sep 01, 2017 5:59 am
Location: South Africa

Charts using Business Objects

Post by charlvdb »

Hi

My data sources are all Business Objects.

I'm trying to create a chart and I'm unable to do so as dragging the value to the chart ends up turning my mouse into a "no access" or "disabled" icon.

1. Is it possible to use charts with business objects as the datasource?
2. I will be creating dashboards using business objects as well, is this possible too?

Please see attached my MRT
Attachments
POC.mrt
(9.72 KiB) Downloaded 196 times
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Charts using Business Objects

Post by Lech Kulikowski »

Hello,

Business objects are not supported in dashboards.

Thank you.
charlvdb
Posts: 19
Joined: Fri Sep 01, 2017 5:59 am
Location: South Africa

Re: Charts using Business Objects

Post by charlvdb »

Thanks, will add as Dataset and use report.RegData() instead to assign. Will update ticket later
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Charts using Business Objects

Post by Lech Kulikowski »

Hello,

You are welcome.
charlvdb
Posts: 19
Joined: Fri Sep 01, 2017 5:59 am
Location: South Africa

Re: Charts using Business Objects

Post by charlvdb »

POC.mrt
Dashboard and Chart
(26.67 KiB) Downloaded 184 times
Hi Lech

Please see my code below, I get a blank page when viewing a dashboard through the StiBlazorViewer. I have added the expected columns as a dataset and was able to build a chart on a dashboard.
I only have a dashboard on the MRT, when adding a databand on a separate page, then there is results for the databand, but dashboard remains blank/empty with the same columns used.

I have a dashboard page with 1 chart on the MRT at the moment. I'm expecting the chart to display, but its always empty when added onto the dashboard. However, it does display when not placed on a dashboard.

Code: Select all

//var report = StiReport.CreateNewDashboard();  // I have tried this way as well.
var report = new StiReport();
report.LoadFromString(assembly.ReadResource("POC.mrt"));
report.RegData("PayoutDashboardReportData", payout);
report.Dictionary.Synchronize();
await report.RenderAsync();
 
return report.SaveDocumentToByteArray();
Last edited by charlvdb on Tue Nov 19, 2024 12:01 pm, edited 1 time in total.
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Charts using Business Objects

Post by Lech Kulikowski »

Hello,

In your code, you register data in the empty report, and then render it.

You need to add the Load method for loading the report template.

Thank you.
charlvdb
Posts: 19
Joined: Fri Sep 01, 2017 5:59 am
Location: South Africa

Re: Charts using Business Objects

Post by charlvdb »

report.LoadFromString(assembly.ReadResource("POC.mrt")); is being done before registering, updated the initial post.
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Charts using Business Objects

Post by Lech Kulikowski »

Hello,

Please send us a sample project that reproduces the issue for analysis.

Thank you.
charlvdb
Posts: 19
Joined: Fri Sep 01, 2017 5:59 am
Location: South Africa

Re: Charts using Business Objects

Post by charlvdb »

Hi Lech

I managed to get it working on one of the sample projects provided by Stimulsoft. I will update the forum thread later should there be anything else.
I suspect it could be an issue on my side with the viewer and how we loading the MRT.
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Charts using Business Objects

Post by Lech Kulikowski »

Hello,

Thank you for the information.
Post Reply