Another example of combined script and making invisible if object not selected

Here is another example of a combined script. This example also includes the script how to set the label to not be visible if no unit selected.

Attached zipped report template is a further customization of the Sample Detailed Quote.

The example is based on that you want the label “Item submitted for repair:” to only show if a unit is actually selected in the quote.

To see the script used to do this, click on the label1 field and view its Before Print script from the Properties tab " "

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)

//this combined script displays the label and the unit
label1.Text = string.Format("{0} {1}", "Item Submitted For Repair: ", DetailReportItem.GetCurrentColumnValue(“LT_Unit_Label_Serial”));

//this states that if there is no Unit (unit is empty (whichis “”)), to set the field label1 to not be visible


*Note the name of the field is exactly that of the field in your report " "

*In this combined script, we will be showing two, so there is only two listed ("{0} {1}",

*Note that the name of the band matches that in the script " "