How can I implement custom chart colors?
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: How can I implement custom chart colors?
Hello,
Could you provide more detailed information on how to reproduce the issue?
Thank you.
Could you provide more detailed information on how to reproduce the issue?
Thank you.
-
- Posts: 44
- Joined: Wed Jul 12, 2023 8:18 pm
Re: How can I implement custom chart colors?
I don't know how to reproduce it. I just updated the apicore version and the report stopped working.
Trying to debug, I noticed that some null values are converted to empty quotes, and the client and our API are sending null. The problem is occurring in the report.
Is there a configuration that turns null into empty strings? I searched but found nothing.
Trying to debug, I noticed that some null values are converted to empty quotes, and the client and our API are sending null. The problem is occurring in the report.
Is there a configuration that turns null into empty strings? I searched but found nothing.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: How can I implement custom chart colors?
Hello,
Please send us a sample project that reproduces the issue for analysis.
Thank you.
Please send us a sample project that reproduces the issue for analysis.
Thank you.
-
- Posts: 44
- Joined: Wed Jul 12, 2023 8:18 pm
Re: How can I implement custom chart colors?
Lech, investigating, we noticed that one of our reports renders the colors correctly, and because of this breaking change on the update, we might not update them all because it would cost too much time for us.
The problem is very obscure and we cannot reproduce it. I will send the report so you can check the configurations, but the problem lies in the cross-data with the pie chart together. When the cross-data crosses the page and break the row, the color stops being rendered.
The problem is very obscure and we cannot reproduce it. I will send the report so you can check the configurations, but the problem lies in the cross-data with the pie chart together. When the cross-data crosses the page and break the row, the color stops being rendered.
- Attachments
-
- adherenceItems.mrt
- (67.85 KiB) Downloaded 106 times
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: How can I implement custom chart colors?
Hello,
We couldn't connect to the data in your report.
Thank you.
We couldn't connect to the data in your report.
Thank you.
-
- Posts: 44
- Joined: Wed Jul 12, 2023 8:18 pm
Re: How can I implement custom chart colors?
Lech, I don't know how can I provide the data correctly to you.
Can't you generate a new report and take the steps that I told you?
If a crossband component overflows the page, the chart stops rendering the color.
You need to put a crossband with multiple columns, so it overflows to the second page. Afterward, the report stops rendering colors.
Can't you generate a new report and take the steps that I told you?
If a crossband component overflows the page, the chart stops rendering the color.
You need to put a crossband with multiple columns, so it overflows to the second page. Afterward, the report stops rendering colors.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: How can I implement custom chart colors?
Hello,
Could you prepare data for example as Excel file, add it to the resources, and prepare a sample report?
Thank you.
Could you prepare data for example as Excel file, add it to the resources, and prepare a sample report?
Thank you.
-
- Posts: 44
- Joined: Wed Jul 12, 2023 8:18 pm
Re: How can I implement custom chart colors?
Hello Lech, sorry for the delay. We are building multiple features and our time is scarce.
So, first of all: we cannot update the API to 2024.x.x simply because our report doesn’t render after the update. As I said before, we cannot simulate the problem because we cannot debug the report, and as I said too, the data is being transported correctly, and proof of this is that after rollbacking the version to 2023.3.1 it works fine. No code was changed, only the API version and the .exe version. Everything suggests that there are some bugs in the 2024 version, as shown in the picture below:
Before update: After update: With further investigation, we noticed on our SQL profiler that the null values are being converted to empty strings, as shown below:
Thats our api parameters right before opening the report: That our source code:
protected async Task<StiReport> GetReportAsync(string reportFolder, Dictionary<string, object> parameters)
{
string reportFile = parameters["Report"] + ".mrt";
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ReportTemplates", reportFolder, reportFile);
Stimulsoft.Drawing.Graphics.GraphicsEngine = Stimulsoft.Drawing.GraphicsEngine.ImageSharp;
var report = StiReport.CreateNewReport();
report.Load(path);
report.Culture = GetCulture(parameters);
if (parameters.ContainsKey("Lang"))
parameters["Lang"] = report.Culture;
var request = GetRequestData();
AddReportParameter(report, "CompanyId", request.CompanyId);
AddReportParameter(report, "UserId", request.UserId);
foreach (var (key, value) in parameters)
{
AddReportParameter(report, key, value);
report[key] = value;
}
AddCommentsToSqlCommands(report, reportFolder, request, parameters);
SetConnectionStrings(report);
await SetLogo(report, parameters);
report.Dictionary.Synchronize();
return report;
}
I tried to update to 2024.1.3 and still got the error.
So, we are stuck on this. We cannot even start to try to fix the chart colors because, now, the report doesn’t even render. Let's do one thing each. Let’s try to fix this data transport issue.
How can we move forward to find this bug? Is it a bug? Is it a new feature that converts strings to empty spaces? I really don’t know how to proceed.
I guess one of the possible solutions is to schedule a call so we can check this together.
So, first of all: we cannot update the API to 2024.x.x simply because our report doesn’t render after the update. As I said before, we cannot simulate the problem because we cannot debug the report, and as I said too, the data is being transported correctly, and proof of this is that after rollbacking the version to 2023.3.1 it works fine. No code was changed, only the API version and the .exe version. Everything suggests that there are some bugs in the 2024 version, as shown in the picture below:
Before update: After update: With further investigation, we noticed on our SQL profiler that the null values are being converted to empty strings, as shown below:
Thats our api parameters right before opening the report: That our source code:
protected async Task<StiReport> GetReportAsync(string reportFolder, Dictionary<string, object> parameters)
{
string reportFile = parameters["Report"] + ".mrt";
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ReportTemplates", reportFolder, reportFile);
Stimulsoft.Drawing.Graphics.GraphicsEngine = Stimulsoft.Drawing.GraphicsEngine.ImageSharp;
var report = StiReport.CreateNewReport();
report.Load(path);
report.Culture = GetCulture(parameters);
if (parameters.ContainsKey("Lang"))
parameters["Lang"] = report.Culture;
var request = GetRequestData();
AddReportParameter(report, "CompanyId", request.CompanyId);
AddReportParameter(report, "UserId", request.UserId);
foreach (var (key, value) in parameters)
{
AddReportParameter(report, key, value);
report[key] = value;
}
AddCommentsToSqlCommands(report, reportFolder, request, parameters);
SetConnectionStrings(report);
await SetLogo(report, parameters);
report.Dictionary.Synchronize();
return report;
}
I tried to update to 2024.1.3 and still got the error.
So, we are stuck on this. We cannot even start to try to fix the chart colors because, now, the report doesn’t even render. Let's do one thing each. Let’s try to fix this data transport issue.
How can we move forward to find this bug? Is it a bug? Is it a new feature that converts strings to empty spaces? I really don’t know how to proceed.
I guess one of the possible solutions is to schedule a call so we can check this together.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: How can I implement custom chart colors?
Hello,
> How can we move forward to find this bug? Is it a bug? Is it a new feature that converts strings to empty spaces? I really don’t know how to proceed.
Could you prepare and send us a for analysis a very simple report and test query?
We couldn't reproduce the issue with our samples.
Thank you.
> How can we move forward to find this bug? Is it a bug? Is it a new feature that converts strings to empty spaces? I really don’t know how to proceed.
Could you prepare and send us a for analysis a very simple report and test query?
We couldn't reproduce the issue with our samples.
Thank you.
-
- Posts: 44
- Joined: Wed Jul 12, 2023 8:18 pm
Re: How can I implement custom chart colors?
Can't you explain to me how could I do that?
I only used Stimulsoft integrated with an API, and I do not have experience using other data sources.
I only used Stimulsoft integrated with an API, and I do not have experience using other data sources.