StiViewerControl not showing Variables

Сonversation on different topics
Post Reply
Robin
Posts: 6
Joined: Tue Mar 30, 2010 7:38 am

StiViewerControl not showing Variables

Post 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


Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

StiViewerControl not showing Variables

Post 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.
Robin
Posts: 6
Joined: Tue Mar 30, 2010 7:38 am

StiViewerControl not showing Variables

Post 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
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

StiViewerControl not showing Variables

Post by Jan »

Hello Robin,

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

Thank you.
Post Reply