report.CompiledReport[""] vs report.Dictionary.Variables[""]
Posted: Fri Mar 22, 2013 8:10 am
Hi,
I am trying to pass a string[] variable to a report. In the .mrt I've defined an object type variable named "Tags" .
If I pass the string array as below, everything is ok. The values are available in the .mrt
However, if I am passing as below, it seems that the string array is not accesible inside the report:
Can you please let me know what is the proper way of passing arrays?
In .mrt I am accessing the array as below and in the second passing method I am getting empty values:
I am trying to pass a string[] variable to a report. In the .mrt I've defined an object type variable named "Tags" .
Code: Select all
string[] arrTags = new string[40];
Code: Select all
report.CalculationMode = StiCalculationMode.Compilation;
report.Compile();
report.CompiledReport["Tags"] = arrTags;
Code: Select all
// ******* I am using this becuase it seems that it prevents w3wp.exe from crashing when using StiCalculationMode.Compilation;
report.CalculationMode = StiCalculationMode.Interpretation;
report.Dictionary.Variables["Tags"].ValueObject = arrTags; // not getting them into the report
report.Compile();
In .mrt I am accessing the array as below and in the second passing method I am getting empty values:
Code: Select all
{((string[])Tags)[PageNumber-1]}