Error while trying to print a quote

AyaNova v3.1.7 with SQL Database on server. I got this error while using the server.

I don’t do quotes very often, which is why I hadn’t noticed this before. I did one today and attempted to print it out and no matter which template I chose I got this error (I even got it when I went into edit the template and clicked on the preview tab):

Unhandled Exception:
The following error occurred when the script in procedure Detail1.OnBeforePrint:
Object reference not set to an instance of an object.
Procedure Detail1.OnBeforePrint was executed, it will not be called again.

System.Exception

Stack Trace:
at DevExpress.XtraReports.XRControlEventsScriptManager.RunEvent(String eventName, Object[] parameters)
at DevExpress.XtraReports.UI.XRControl.RunEventScript(String eventName, Object[] args)
at DevExpress.XtraReports.UI.XRControl.OnBeforePrint(PrintEventArgs e)
at DevExpress.XtraReports.UI.Band.GenerateContent(DocumentBand docBand, Int32 rowIndex)
at DevExpress.XtraReports.UI.Band.DevExpress.XtraReports.Native.IContentGenerator.GenerateWithSubreports(DocumentBand docBand, Int32 rowIndex)
at DevExpress.XtraReports.UI.Band.CreateDocumentBand(Int32 rowIndex, RootDocumentBand rootDocBand)
at DevExpress.XtraReports.UI.DetailBand.CreateDocumentBand(Int32 rowIndex, RootDocumentBand rootDocBand)
at DevExpress.XtraReports.Native.Printing.DetailWriter.WriteDetail()
at DevExpress.XtraReports.Native.Printing.DetailWriterWithDS.WriteInternal()
at DevExpress.XtraReports.Native.Printing.DetailWriter.Write()
at DevExpress.XtraReports.Native.Printing.DocumentBuilder.Build()
at DevExpress.XtraReports.UI.XtraReportBase.BuildDocument(DocumentBuilder builder)
at DevExpress.XtraReports.UI.DetailReportBand.BuildDocument(DocumentBuilder builder)
at DevExpress.XtraReports.UI.XtraReportBase.WriteToDocument(DocumentBuilder docBuilder)
at DevExpress.XtraReports.Native.Printing.DetailWriter.WriteDetail()
at DevExpress.XtraReports.Native.Printing.DetailWriterWithDS.WriteInternal()
at DevExpress.XtraReports.Native.Printing.DetailWriter.Write()
at DevExpress.XtraReports.Native.Printing.DocumentBuilder.Build()
at DevExpress.XtraReports.UI.XtraReportBase.BuildDocument(DocumentBuilder builder)
at DevExpress.XtraReports.UI.DetailReportBand.BuildDocument(DocumentBuilder builder)
at DevExpress.XtraReports.UI.XtraReportBase.WriteToDocument(DocumentBuilder docBuilder)
at DevExpress.XtraReports.Native.Printing.DetailWriter.WriteDetail()
at DevExpress.XtraReports.Native.Printing.DetailWriter.WriteInternal()
at DevExpress.XtraReports.Native.Printing.DetailWriter.Write()
at DevExpress.XtraReports.Native.Printing.DocumentBuilder.Build()
at DevExpress.XtraReports.Native.Printing.RootReportBuilder.Build()
at DevExpress.XtraReports.UI.XtraReportBase.BuildDocument(DocumentBuilder builder)
at DevExpress.XtraReports.UI.XtraReport.BuildDocument(DocumentBuilder builder)
at DevExpress.XtraReports.UI.XtraReport.CreateDocument(PrintingSystem ps, Single progressRange)
at DevExpress.XtraReports.UI.XtraReport.CreateDocument(Single progressRange)
at DevExpress.XtraReports.UI.XtraReport.CreateIfEmpty(Single progressRange)
at DevExpress.XtraReports.UI.XtraReport.ShowPreviewDialog()
at AyaNova.Util.ReportHandleToolClick(ToolBase lTool, String ReportKey, Object DataSource)
at AyaNova.WorkorderForm.(Object , ToolClickEventArgs )
at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnToolClick(ToolClickEventArgs e)
at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.FireEvent(T

Hi

The part of the error message

*** The following error occurred when the script in procedure Detail1.OnBeforePrint:
Object reference not set to an instance of an object.
Procedure Detail1.OnBeforePrint was executed, it will not be called again.

would indicate an issue with a script within the report template.

You say it happens with any of the sample report templates for Quotes that come standard with AyaNova v3.1.7?

Pleaseidentify the exact name of one of the sample report template you are selecting that you get this error message with?

Please can I have you export this report template (Administration navigation pane, Report Templates, select the report, select to Export it) and than zip up the exported report template file using WinZipand attach to your reply so that I may test with your report template

I’m not getting an error using the sample report templates here, so perhaps it is something particular with yours.

Thank you

  • Joyce

Also could you select menu Help -> About AyaNova and copy the contents to a text file and attach (you can XXX out the sa username and password if used).

Thank you.

I apologize for the delay in responding. Unfortunately I cannot get the information from where I’m at right now. I will check tomorrow morning and post the requested information ASAP.

Wait. I just remembered something.

When I first installed Ayanova back a few months ago I had a problem printing reports and it ended up being a font that needed to be reinstalled. Could this be the same problem? My system has crashed since and I can’t say for sure whether I have printed a quote since then or not. Again, I’ll check first thing in the morning and give you the info you need.

Hi again

That was in topic http://forum.ayanova.com/Topic800-91-1.aspx

The error message you are getting is different this time pointing towards an issue with a script used.

But because you did experience another system crash you may have an issue with your computer itself, or your operating system.

I would also suggest that you do a complete virus scan with up to date signatures, check with Windows Updates making sure all Microsoft products are up to date, check out your hardware too, as well as the info above.

Let me know when you can.

  • Joyce

Sorry for the delay. Turns out the problem I had was that I didn’t check the box next to “default phone” on the client’s information. Go figure.

Hi

Could you confirm what version of AyaNova v3 you are running? (Select menu Help -> About AyaNova)

If you are using the latest version of AyaNova v3.1.7, could I get additional detailed information on what is occurring when you are in a client entry screen - in that how are you saving a client contact record with no Default Phone selected? (you will note even if no phone number is entered, you will see grayed out a row showing a default phone with no entry, but it is checkmarked as Default Phone)

I wish to reproduce the error you received so that it can be addressed in the AyaNova program, but I do need a bit more details as not able to presently reproduce.

Thank you

  • Joyce