How to Use Variables.

Stimulsoft Reports.NET discussion
Post Reply
Arunkumar S
Posts: 21
Joined: Mon Jul 23, 2007 5:12 am
Location: Chennai

How to Use Variables.

Post by Arunkumar S »

Hi

My data source has 15 columns, its all attributes. i have to display those vertically like...

Application Name : xyz
Application ID : 02120154
Backup available : YES
....
....

There are 15 such coulumns. Now i should display the lables and data (Application Name -> Label and xyz -> data) only when data is not Null. How to handle this.

Thanks in advance.
Arunkumar.s
Senior Application Developer.
Indepth Solutions Pvt Ltd.
India.
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

How to Use Variables.

Post by Guest »

For all textboxes you must have following:
1. Property "Can shrink" = True
2. Property "Shift Mode" = Increasing Size, Decreasing Size

Thank you.









Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

How to Use Variables.

Post by Guest »

For all textboxes you must have following:
1. Property "Can shrink" = True (textbox shrink if need)
2. Property "Shift Mode" = Increasing Size, Decreasing Size (textbox move up if upper textbox haven't value)
3. Use IIF function, for example: {IIF(DataSource1.Field1 == "" || DataSource1.Field1 is System.DBNull, "", "Application Name: " + DataSource1.Field1)}

Thank you.
Arunkumar S
Posts: 21
Joined: Mon Jul 23, 2007 5:12 am
Location: Chennai

How to Use Variables.

Post by Arunkumar S »

Thanks For your reply. I got the shrink property, and done with that. It works really cool.

I'm facing some other problem Now.
I have created a variable vApplicationType In which i have the following code

iif (Application.fkPickFromListApplicationType.TOSTRING().Trim().LENGTH()=0,"",Application.PickFromListValue)

It Does not display any data but, when i use the field directly, it displays the actual value. And also i found that inside iif (true or false part) if i use any of the datasource.field it is not displaying any data, if i use any variable or hardcode some values it is coming up fine. is there any other way to do this or i'm not using it in the right way?.

This report has 140 such formula columns, i have to display different column and its values that is
iif(aplication.functionNm="xyz",application.column1,application.column2)

Nested iif is possible, i have 2-3 such cases which needs nested iifs?

Note: In the report setup i have selected the source code as "VB"

Thanks in advance.
Arunkumar.s
Senior Application Developer.
Indepth Solutions Pvt Ltd.
India.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to Use Variables.

Post by Edward »

yesarunkumar wrote:I have created a variable vApplicationType In which i have the following code

iif (Application.fkPickFromListApplicationType.TOSTRING().Trim().LENGTH()=0,"",Application.PickFromListValue)

It Does not display any data
Please note that variable can be assigned with default value/function value only during initialization of this variable. This occurs in InitializeComponent method of the report when initialization of all variables is in process.
yesarunkumar wrote: when i use the field directly, it displays the actual value. And also i found that inside iif (true or false part) if i use any of the datasource.field it is not displaying any data, if i use any variable or hardcode some values it is coming up fine. is there any other way to do this or i'm not using it in the right way?.
You can assign the default value of the variable only once. The order of the assignment of the Variables you can see in the Code Tab, when you expand "StiReport Designer generated code - do not modify" region and see the InitializeComponent method. When variables is assigned in the InitializeComponent method the DataSources of Dictionary is created but not connected to data so you are not able to use in the default values of the variables any data from the DataSources.
yesarunkumar wrote:This report has 140 such formula columns, i have to display different column and its values that is
iif(aplication.functionNm="xyz",application.column1,application.column2)
You can do this assignment in the BeforePrint event of the report's Page for example.
yesarunkumar wrote:Nested iif is possible, i have 2-3 such cases which needs nested iifs?
Yes the nesting can be used with any level you need.

Thank you.
Arunkumar S
Posts: 21
Joined: Mon Jul 23, 2007 5:12 am
Location: Chennai

How to Use Variables.

Post by Arunkumar S »

Thanks For your Reply, Actually i am new to this reporting tool, So i misunderstood that the variables as the Formula (In Crystal Reports). Later i spent some more time, and got it and my reports were ready now.

Basically it is a conversion project. The client wanted a replacement for Crystal reports and they have suggested us 3 tools (one of that is Stimul Soft) and gave us some of the toughest reports that they have in Crystal Reports. Initaily i had few issues, i used to post the questions, and does not have the patience till i get the reply. so Went through the entire Forum once and got the answers for all my questions. I have completed my task. My Vote on the 3 Tools is StimulReports only.

Thanks for your support.
Arunkumar.s
Senior Application Developer.
Indepth Solutions Pvt Ltd.
India.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to Use Variables.

Post by Edward »

Thank you very much for a such good words. We are trying. Can we use your words on our testimonial page, please?

Thank you.
Arunkumar S
Posts: 21
Joined: Mon Jul 23, 2007 5:12 am
Location: Chennai

How to Use Variables.

Post by Arunkumar S »

Sure. Thanks.
Arunkumar.s
Senior Application Developer.
Indepth Solutions Pvt Ltd.
India.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to Use Variables.

Post by Edward »

Thanks a lot. It is a really appreciated.

Thank you.
Post Reply