Page 2 of 3

Re: Compile report in Asp.Net Mvc Core

Posted: Mon Jan 20, 2020 12:45 pm
by Ryan Robar
Can you say if it will be implemented? Can I count on this feature coming to .Net Core eventually, or should I assume I will never be able to compile reports?

Re: Compile report in Asp.Net Mvc Core

Posted: Thu Jan 23, 2020 8:41 pm
by HighAley
Hello.

We could only suggest you to compile the report in WinForms or using the Standalone Designer.
Then you can add a report class to your .NET Core project.

We have plans to add compilation mode to .NET Core engine but can't write anything about ETA.

Thank you.

Re: Compile report in Asp.Net Mvc Core

Posted: Tue Jul 28, 2020 1:53 pm
by cmf
Hi!

Any update on this?
3 years have gone by since your initial statement that this would be supported in .Net Core, and it has now become urgent as more and more projects are using .Net Core instead of .Net Framework.

Is it possible to provide us an ETA?

Best regards,
José

Re: Compile report in Asp.Net Mvc Core

Posted: Tue Jul 28, 2020 1:53 pm
by cmf
Hi!

Any update on this?
3 years have gone by since your initial statement that this would be supported in .Net Core, and it has now become urgent as more and more projects are using .Net Core instead of .Net Framework.

Is it possible to provide us an ETA?

Best regards,
José

Re: Compile report in Asp.Net Mvc Core

Posted: Wed Jul 29, 2020 3:02 pm
by Lech Kulikowski
Hello,

Unfortunately, still not implemented.

Thank you.

Re: Compile report in Asp.Net Mvc Core

Posted: Fri Aug 14, 2020 6:24 am
by Volodymyr_Hensorskyi
Hello,

Has the feature been implemented in 2020.4.1 build ?
Do you have any guidance on how to use reports saved as .cs in .NET Core (c#) ?

Best regards,
Volodymyr

Re: Compile report in Asp.Net Mvc Core

Posted: Mon Aug 17, 2020 3:17 am
by Volodymyr_Hensorskyi
Hello,

Quick update,
When I save report as .cs and then use it (I do not need to compile it, just add it to my project; Stimulsoft version used 2020.4.1):

Code: Select all

var report = StiReport.GetReportsFromAssembly(Assembly.GetExecutingAssembly())[0]; // just for a quick test. a report saved as .cs must be added to your project
report.Dictionary.Synchronize(); // seems to be required to setup connection to database
(report.Dictionary.Databases["Connection"] as StiSqlDatabase).ConnectionString = myConnString;
report.Dictionary.Variables[myVariableToUse.Name].ValueObject = myValue; //myValue is a List<string>. Report's variable type here is Stimulsoft.Report.StringList
report[myVariableToUse.Name] = myValue; //myValue is a List<string> //myValue is a List<string>. Report's variable type here is Stimulsoft.Report.StringList
// ... set up other variables in same way in foreach ...
report.Render(false);
report.ExportDocument(myFormat, memoryStream);
It all works fine when I run it in .NET Framework, but when I start it in .NET Core 3.1 all variables apart from StringList/IntList can be passed correctly, while StringList is not counted in rendered report.

Can you please confirm whether it's a bug in Stimulsoft or there's a workaround to deal with StringList/IntList variables in .NET Core?


Best regards,
Volodymyr

Re: Compile report in Asp.Net Mvc Core

Posted: Tue Aug 18, 2020 7:17 am
by Lech Kulikowski
Hello,

Please check the following code:

Code: Select all

report.Dictionary.Variables.Add(new StiVariable("", "Variable1", "Variable1", "", typeof(StringList), "", false, StiVariableInitBy.Value, true, new StiDialogInfo(StiDateTimeType.Date, "", true, new string[] {
                    "1",
                    "2"}, new string[] {
                    "1",
                    "2"}), null, false, StiSelectionMode.FromVariable));
viewtopic.php?t=55409

Thank you.

Re: Compile report in Asp.Net Mvc Core

Posted: Thu Aug 20, 2020 2:29 am
by Volodymyr_Hensorskyi
Lech Kulikowski,

Thanks for the hint, but how your code should help with the mentioned issue? Can you be more specific what is the trick here if there's any?

Quick update: For instance, in .NET Core during report.Render(false) StringList/IntList variables сleared up. Therefore, they aren't passed properly (while the same code runs fine in .NET Framework)

var us = report["UserTypeSelect"]; // Count = 1
report.Render(false);
var us2 = report["UserTypeSelect"]; // Count = 0 in .NET Core and Count = 1 in .NET Framework

PLEASE, raise this bug internally ASAP

Thanks

Re: Compile report in Asp.Net Mvc Core

Posted: Fri Aug 21, 2020 8:36 am
by Lech Kulikowski
Hello,

Please try to set the following option:
StiOptions.Engine.ForceInterpretationMode = false;

Thank you.