Template

I am just about done with a template I have been working on, but ran into 2 minor issues. One is that I want to add ‘Notes’ to the workorder before printing it out. These would be for both us and the client to see. I noticed that there is a ‘Client notes’ button you can click on at the top of the screen. How would I get to show in thework orderwhen printing it out?

Also, I am trying to add the client city, state, and zip code on one line. I tried to get this to work based off how you got the Sample Detailed Service Workorder with Grand Total. I want it to look like this: Seattle, Wa 98105. I noticed you were using a script, so I copied it over, made sure the label name matched, and it opened without any errors. It just showed ‘combined address physical’. Here is the script in question:

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrLabel11.Text = string.Format("{0} , {1} {2}", DetailReport.GetCurrentColumnValue(“LT_Address_Label_City”), DetailReport.GetCurrentColumnValue(“LT_Address_Label_StateProv”), DetailReport.GetCurrentColumnValue(“LT_Address_Label_Postal”));
}

How can I get this working? Thanks!

Hi Bleu

Both of these questions are more to deal with Report Templates than service workorder or quote or pm templates. Just a heads up that you will find most questions on report templates already answered in the AyaNova Printing & Report Templates section of this forum http://forum.ayanova.com/Forum100-1.aspx

I am just about done with a template I have been working on, but ran into 2 minor issues. One is that I want to add ‘Notes’ to the workorder before printing it out. These would be for both us and the client to see. I noticed that there is a ‘Client notes’ button you can click on at the top of the screen. How would I get to show in thework orderwhen printing it out?

Client Notes are not available for printing in a service workorder report template. If there is data specific for this workorder that you want to print out, a suggestion is to enter it into one of the available fields in the workorder entry screen such as Service Notes or Labor’s Service Details, and than have those fields display in your report template.

Also, I am trying to add the client city, state, and zip code on one line. I tried to get this to work based off how you got the Sample Detailed Service Workorder with Grand Total. I want it to look like this: Seattle, Wa 98105. I noticed you were using a script, so I copied it over, made sure the label name matched, and it opened without any errors. It just showed ‘combined address physical’. Here is the script in question:

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrLabel11.Text = string.Format(“{0} , {1} {2}”, DetailReport.GetCurrentColumnValue(“LT_Address_Label_City”), DetailReport.GetCurrentColumnValue(“LT_Address_Label_StateProv”), DetailReport.GetCurrentColumnValue(“LT_Address_Label_Postal”));
}

Not sure why it is not working for you. It could be because of where you put the script - i.e. is it in the OnBeforePrint script section? It could be because the actual label you have the script is not xrLabel11 but another label name. It could be something else.

If you export your report template to a file - see the AyaNova 4 Help file section (URL removed as for older version no longer supported - see the latest version of AyaNova) - zip it using WinZip and attach to your reply, I can download it and import to a AyaNova database here and take a look for you. Do let me know.

  • Joyce

I will use the service notes as the general notes section as you recommend.

I have sent you my template via email, as I don’t want to make it publicly available. One other issue I have ran into is that when I print the report, it will print ok when I only have 1 workorder item listed, but when I add additional workorder items, it totally messes up the formatting and sections repeat in an unintended way. Ideally, I would prefer that the workorder items only show in the section I have created labeled ‘Work requested’.

Hi Bleu

The issue with the script for combining data fileds to show in one label was because the script did not reference the actual Workorder Header band that was in this report template. The script that was not working was referencing a band called DetailReport, whereas the actual band for the Workorder Header in Bleu’s report template was called detailReportBand1

(URL removed as for older version no longer supported - see the latest version of AyaNova)

For this report template with this band called detailReportBand1, the script should read:

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrLabel27.Text = string.Format(“{0} , {1} {2}”, detailReportBand1.GetCurrentColumnValue(“LT_Address_Label_City”), detailReportBand1.GetCurrentColumnValue(“LT_Address_Label_StateProv”), detailReportBand1.GetCurrentColumnValue(“LT_Address_Label_Postal”));
}

One other issue I have ran into is that when I print the report, it will print ok when I only have 1 workorder item listed, but when I add additional workorder items, it totally messes up the formatting and sections repeat in an unintended way. Ideally, I would prefer that the workorder items only show in the section I have created labeled ‘Work requested’

If you view this detailed report template in your report designer, you have the workorder item data followed by that workorder item’s labor data followed by that workorder item’s parts data. So iffor example you have two workorder items in one workorder, the report will print out first the first workorder item data - workorder item’s data, workorder item’s labor data, workorder items part data. Than the second workorder item’s data will print out following - 2nd workorder item’s data, 2nd workorder item’s labor data, 2nd workorder items part data.

This is intended and is how a detailed report template will work - all data pertaining to the first workorder item is together (including its labeo, parts etc), then the second workorder item’s is together and so on.

I have also moved this topic to the AyaNova Printing & Report section of this forum.

  • Joyce

Then is there a way I can force additional items to bump down so they start clean on the next page? Ideally we would like the company header, then Item 1 (including the Work Requested, Description of Work Performed, and notes), then a new page with the company header again, then Item 2, (including the Work Requested, Description of Work Performed, and notes), then finally at the very end the signature/date line.

Hi Bleu

A suggestion is to do similar to that identified in the forum topics Making-each-workorder-item-start-on-a-new-page and topic Sample-Detailed-Workorder-report-that-repeats-header-on-every-page so that the workorder header is repeated.

  • Joyce

The script modification worked great. Thanks. I’m still working on the issue for the last post entryI gave, but will let you know ifI have any problems.

How can I add today’s date automatically? I have a monthly customer statement template I have created and need to know how to add the date of the print out. Thanks.

Hi Bleu

Drag the tool box control PageInfo onto the area in the report designer where you want todays date to show. And sets its Pageinfo property to DateTime

This is the same control used in many sample report templates to display todays date. Take a look at theSample Service Workorders Invoiced report template and click on the PageInfo controlin its upper right hand corner and view its properties. Another example is the Sample Dispatching Report template - open it in the report designer, and select the field displaying todays date and than view its properties in the Properties tab.

  • Joyce

Thanks. That worked perfectly. How can I add a signature/date line at the end of the last page of a workorder? I tried adding a footer, but my text isn’t showing up.

Hello Bleu

A PageFooter band is where you place labels that you want to print at the bottom of every page.

A ReportFooter band is where you place labels that you want to print at the end of the report (last page of a workorder).

Thanks. I got it working.