report.CompiledReport[""] vs report.Dictionary.Variables[""]

Stimulsoft Reports.NET discussion
mmmmmm
Posts: 27
Joined: Mon Oct 24, 2011 5:51 am

report.CompiledReport[""] vs report.Dictionary.Variables[""]

Post by mmmmmm »

Hi,

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];
If I pass the string array as below, everything is ok. The values are available in the .mrt

Code: Select all

report.CalculationMode = StiCalculationMode.Compilation;
report.Compile();
report.CompiledReport["Tags"] = arrTags;
However, if I am passing as below, it seems that the string array is not accesible inside the report:

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();
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:

Code: Select all

{((string[])Tags)[PageNumber-1]}
mmmmmm
Posts: 27
Joined: Mon Oct 24, 2011 5:51 am

Re: report.CompiledReport[""] vs report.Dictionary.Variables

Post by mmmmmm »

I've forgot to mention that when passing simple string variables, like report.Dictionary.Variables["Tag"].Value = sTag; I get them in the report.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: report.CompiledReport[""] vs report.Dictionary.Variables

Post by HighAley »

Hello.

Please, try to use next expression:
{Tags[PageNumber-1]}

This code will work in our next release that will be available this week.

Thank you.
mmmmmm
Posts: 27
Joined: Mon Oct 24, 2011 5:51 am

Re: report.CompiledReport[""] vs report.Dictionary.Variables

Post by mmmmmm »

Thank you Aleksey!

Another small question: I am trying to avoid using StiCalculationMode.Compilation becuase it crashes w3wp.exe. Will the code you showed me work with StiCalculationMode.Interpretation?

I noticed that if Compilation is used Lists work fine. Using Interpretation only base types (string) work.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: report.CompiledReport[""] vs report.Dictionary.Variables

Post by HighAley »

Hello.

Yes, this code will work in the Interpretation mode.

Thank you.
mmmmmm
Posts: 27
Joined: Mon Oct 24, 2011 5:51 am

Re: report.CompiledReport[""] vs report.Dictionary.Variables

Post by mmmmmm »

Thank you Aleksey.

Any ideea when will this pre-relase be available?

Best regards.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: report.CompiledReport[""] vs report.Dictionary.Variables

Post by Alex K. »

Hello,

The next official release will be available on the end of this week.

Thank you.
mmmmmm
Posts: 27
Joined: Mon Oct 24, 2011 5:51 am

Re: report.CompiledReport[""] vs report.Dictionary.Variables

Post by mmmmmm »

Hello,

any news on the new release?

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: report.CompiledReport[""] vs report.Dictionary.Variables

Post by Alex K. »

Hello,

Sorry for the delay.
The release will be available in Wednesday 03-Apr-2013.

Thank you.
mmmmmm
Posts: 27
Joined: Mon Oct 24, 2011 5:51 am

Re: report.CompiledReport[""] vs report.Dictionary.Variables

Post by mmmmmm »

Hi,
Thank you so much for answering.

Looking forward to it.
Regards.
Post Reply