Report Script: Get Field that is not in Report v2: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 81:
}
</syntaxhighlight>
<br/><br/>
 
===Differences of '''direct assign to label.Text''' and '''assign to a Calculated Field'''===
Though the task is the same, which both display the result in a label,<br/>.
directly Direct assign resultvalue to a label.Text does not store the value in the Table.<br/>
While, Calculated Field is able to temporary store the value.
 
*Calculated Field is especially useful when the report needs to calculate
Line 92:
*:as the replacement of a label to another control will require only rebinding of data.
 
<br/><br/>
===Get project no. from Detail, and show the Project Description as a string with 'comma' separated===
This is an example of how to grab the detail(s) and display as a text on header.
Below coding requires adding directive of '''using System.Data;'''
Line 135:
</syntaxhighlight>
 
====Build a Sql string of Project Multiple Values=Projects===
Build a string for SQL SELECT statement with Multiplecondition of one or more than one valuesprojects<br/>
Example of Multiple values in SQL statement:
SELECT [Description] FROM Project WHERE ProjNo in (''''ProjA', 'ProjB'''')