Hi Steve
If want to pad zeros that would require a C# script to determine what the datafield’s length is (in this case the workorder number object), and set what the length would be so that if less then five to pad zeros to the left of it and is a maximum of five characters in length.
If not familiar with C# scripting, a suggestion is to search online as well as through the existing report templates and reporting section of this forum for what you want to do with C# for examples used elsewhere that you can then refer to when creating your own. I myself too would search online for examples if I was to do this for you, trying out with a copy of the report template, trying different scripts etc till it worked how I wanted.
For example, to pad just zero’s, through searching would find url’s such as http://bytes.com/topic/c-sharp/answers/443581-string-format-padding-zeros and from that would try until got something like:
private void xrLabel1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
decimal WOstring;
WOstring =Convert.ToDecimal(DetailReport.GetCurrentColumnValue(“LT_O_Workorder”));
label1.Text = String.Format("{0:00000}", WOstring);
}
Or something like:
private void label2_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
label2.Text = DetailReport.GetCurrentColumnValue(“LT_O_Workorder”).ToString().PadLeft(5, ‘0’);
}
Both would have the output to 5 numbers long, with leading zeros.
And then if would want a character in the very beginning, then just add it as you would any text you want to show regardless as per other examples in for example the Sample Detailed Service Workorder with Grand Total which includes prefixing what is shown in the subject line if auto emailed from the print preview, or what is showned for the custom script for the physical city, state and postal code:
label3.Text = “I” + (DetailReport.GetCurrentColumnValue(“LT_O_Workorder”).ToString().PadLeft(5, ‘0’));
Above is a no charge example to get you started. Anything further I can certainly provide custom report template design and scripting for you - just export your report template to file, and email to support@ayanova.com along with details on what you want done and I can provide a quote. See also forum topic Custom-report-templates