Page 1 of 1

StiViewerControl not showing Variables

Posted: Tue Mar 30, 2010 11:03 am
by Robin
Hello,

Steps to illustrate problem.
1. Create a simple report & in the Dictionary create a variable called "Robin" with a default value of "Robin".
2. Drag the Robin variable onto the "data" report line.
3. When you run the report, on each line it shows the variable text as "Robin" - like I'd expect.
4. However, when I use the StiViewerControl to preview the report, the text is not shown.

This is obviously an oversimplification of what I am doing. I am trying to use variables in the report events, in order that customers can translate using the Globalization Strings, but I am getting exactly the same problem. It's like the variables are
not set when you preview the report.

Have you any ideas what could be causing this problem ?

I am using version 2009.2.422.0 of the Stimulsoft dlls & will be upgrading soon.

Thanks for any help
Robin



StiViewerControl not showing Variables

Posted: Wed Mar 31, 2010 1:11 am
by Jan
Hello Robin,

Unfortunately i can't reproduce this bug with provided steps. I think i don't take in considaration some other conditions. Can you attach report with this problem to your post?

Thank you.

StiViewerControl not showing Variables

Posted: Wed Mar 31, 2010 3:29 am
by Robin
Jan,

I am so sorry Jan - I've been a absolute puppet. I just found in our code before displaying the preview we do the following

foreach (StiVariable variable in report.Dictionary.Variables)
{
variable.Value = string.Empty;
}

I'm really sorry for wasting your time
Robin

StiViewerControl not showing Variables

Posted: Wed Mar 31, 2010 6:24 pm
by Jan
Hello Robin,

No problems! Please contact us if you need any help.

Thank you.