Page 2 of 2
Re: report.CompiledReport[""] vs report.Dictionary.Variables
Posted: Wed Apr 03, 2013 1:39 pm
by Alex K.
Hello,
We are always glad to help you!
Let us know if you need any additional help.
Thank you.
Re: report.CompiledReport[""] vs report.Dictionary.Variables
Posted: Thu Apr 04, 2013 11:36 am
by mmmmmm
Hi Aleksey,
It seems I tried everything and still I am not able to pass a List of strings to a report and then access its elements via {Tags[PageNumber - 1]} expression.
Can you please provide a sample application that simply passes a list of strings from code behind to a report and then renders that report in a web viewer?
I will really appreciate such help.
(ps: I am using the latest demo release)
Thank you very much.
Re: report.CompiledReport[""] vs report.Dictionary.Variables
Posted: Thu Apr 04, 2013 11:40 am
by mmmmmm
If in the report I am using the following expression "{Tags}" it gets rendered as "Stimulsoft.Report.StringList".
I think it is logical to assume that the type is correct. However, if I use one of the following expressions, nothing gets rendered:
{Tags[0]}
{Tags.Count}
{Tags[PageNumber-1]}
Re: report.CompiledReport[""] vs report.Dictionary.Variables
Posted: Thu Apr 04, 2013 11:42 am
by mmmmmm
Calculation mode is set to report.CalculationMode = StiCalculationMode.Interpretation;
(due to out of memory of w3wp.exe when compiling a large report)
Re: report.CompiledReport[""] vs report.Dictionary.Variables
Posted: Fri Apr 05, 2013 6:28 am
by mmmmmm
Hi Aleksey,
I honestly think I've tried everything I could think of to achieve what I need. Please help me on this one.
Here is the exact scenario:
1. I have a report with multiple pages, each page displays a table of data (DataTables dynamically registered from code behind)
2. report.CalculationMode = StiCalculationMode.Interpretation; to avoid out of memory when compiling
3.On each page;s header I need to display different names (each DataTable's data source name)
Something like: "Data for {Tag}"
Having multiple pages and multiple datatables I thought the right approach is to pass a List<string> as a report variable and in the header use "Data for {Tags[PageNumber]}"
Even though, with report.CalculationMode set to Compilation, this scenario works, when using as described it does not.
Aleksey, can you please supply me a basic simple working sample of such implementation.
Thank you and I hope for an early reply.
Regards.
Re: report.CompiledReport[""] vs report.Dictionary.Variables
Posted: Fri Apr 05, 2013 12:07 pm
by HighAley
Hello.
Please, look at the attached report template.
Thank you.
Re: report.CompiledReport[""] vs report.Dictionary.Variables
Posted: Mon Apr 08, 2013 10:20 am
by mmmmmm
Hi,
thank you for the sample report.
I see it does work when the values are initialized from within the report itself. It also works when StiCalculationMode is set to Compile.
However, when passing this string list from codebehind with StiCalculationMode set to Interpretations it does not work.
List<Stimulsoft.Report.Dictionary.StiDialogInfoItem> list = report.Dictionary.Variables["EntityTags"].DialogInfo.GetDialogInfoItems(typeof(StringList));
Stimulsoft.Report.Dictionary.StiStringDialogInfoItem it = new Stimulsoft.Report.Dictionary.StiStringDialogInfoItem();
it.Value = "item 1";
list.Add(it);
Stimulsoft.Report.Dictionary.StiStringDialogInfoItem it2 = new Stimulsoft.Report.Dictionary.StiStringDialogInfoItem();
it2.Value = "item 2";
list.Add(it2);
This shows count = 2
Code: Select all
Log(String.Format("list count: {0}", list.Count)); // <---- this shows count = 2
In a databand inside the mrt, this shows nothing:
Code: Select all
{EntityTags[PageNumber-1]} <==== this shows nothing
Thank you.
Re: report.CompiledReport[""] vs report.Dictionary.Variables
Posted: Tue Apr 09, 2013 9:48 am
by HighAley
Hello.
We couldn't reproduce your issue.
Please, send us a working sample project which reproduces the issue.
Thank you.