Error occurs when trying to preview template

Hello, Me again.

I get this message when I attampt to preview a report. I looked for something similar in the forum but cannot find.

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.Design.ReportTabControl.UpdatePreview()
at DevExpress.XtraReports.Design.ReportTabControl.OnSelectedPageChanged(EventArgs e)
at DevExpress.XtraReports.Design.XtraTabControl.SelectTabButton(TabButton tabButton)
at DevExpress.XtraReports.Design.ReportTabControl.SelectTabButton(TabButton tabButton)
at DevExpress.XtraReports.Design.XtraTabControl.OnButtonClick(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
*** 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.
at DevExpress.XtraReports.Design.ReportTabControl.UpdatePreview()
at DevExpress.XtraReports.Design.ReportTabControl.OnSelectedPageChanged(EventArgs e)
at DevExpress.XtraReports.Design.XtraTabControl.SelectTabButton(TabButton tabButton)
at DevExpress.XtraReports.Design.ReportTabControl.SelectTabButton(TabButton tabButton)
at DevExpress.XtraReports.Design.XtraTabControl.OnButtonClick(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
*** Exception has been thrown by the target of an invocation.
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at DevExpress.XtraReports.ScriptManager.Run(String procedureName, Object[] parameters)
at DevExpress.XtraReports.XRControlEventsScriptManager.RunEvent(String eventName, Object[] parameters)
*** Object reference not set to an instance of an object.
at YYYY.XXXX.Detail1OnBeforePrint(Object sender, PrintEventArgs e)

Hi Mark

Please provide what report template from what navigation pane, grid, screen

Thank you

  • Joyce

Hi Joyce

It is in the Services, Completed WorkOrder Colorful Pane

Hi Mark

Do you mean in the Service navigation pane, viewing the Service Workorders grid, selecting the report template Completed Workorder Service Detailed - Colourful?

Are you print previewing - or do you mean you are holding down the SHIFT key while selecting the report template to access the internal report designer for this report that the error posted above occurs?

Does this error occur performing the same steps you did for the report template Completed Workorder Service Detailed - Colourful? if you select other reports - for example, does this occur selecting Detailed Complete Service Workorder with Grand Total, ?

Does this same message occur or not occur with other report templates from this grid? Please identify which do and do not

  • Joyce

Do you mean in the Service navigation pane, viewing the Service Workorders grid, selecting the report template Completed Workorder Service Detailed - Colourful?

Yes

Are you print previewing - or do you mean you are holding down the SHIFT key while selecting the report template to access the internal report designer for this report that the error posted above occurs?

Holding down shift Key

Does this error occur performing the same steps you did for the report template Completed Workorder Service Detailed - Colourful? if you select other reports - for example, does this occur selecting Detailed Complete Service Workorder with Grand Total, ?

It does not happen when I tag “Service Workorders Invoiced”

It does happen when I tag “Completed Workorder Service Detailed”

It does happen when I tag “Completed Workorder Service Detailed - Colorful”

It does happen when I tag “Detailed Completed Service Workordernwith Grand Total”

It does not with “Dispatching Report - Scheduled User and Tasks”

It does not with “Dispatching Report - Scheduled User and Tasks w WO# and Client for every printed workorder item”

It does not with “Summary Billable Per Service Workorder”

It does not with “Preview Billing”

Does this same message occur or not occur with other report templates from this grid? Please identify which do and do not

See above

Hi Mark

From your report templatelist, it appears to be occurring with some detailed report templates, but not all.

Does this message occur on every computer that has the AyaNova program files local?

I understand you have the AyaNova program files on three different computers - two on local network and one via a DataPortal? Please check each and identify if occurs on all three.

  • Joyce

It happens on all three computers

Hi Mark

I would like to log in via your Data Portal to your live AyaNova data to determine if it occursusing the AyaNova program files I have here, select SHIFT and one of those report templates listed that result in the same exact error for all.

If it also occurs for myself, that will help identify if it is something specific to your database.

If it doesn’t occur for myself, than that would indicate something with the program files or installation used on all three computers.

I have a copy of your Data Portal connection string - can I log in?

  • Joyce

Yes maam

Hi Mark

I logged in via your data portal.

The internal report designer opens for me with no error on “Completed Workorder Service Detailed - Colorful” , “Completed Workorder Service Detailed” nor for “Detailed Completed Service Workorder with Grand Total” report templates.

As no error occurs for myself, but does occur for your three separate computers - this may indicate not an issue with the database

It is possible that there is an issue with your program files on each of the three computers (as the program files would have been copied from one computer to the other two). There could also be an issue with the .NET framework on these computers.

  1. Iwould recommend on each of the computers you first confirm that Microsoft.NET Framework 1.1 is installed and so is the .NET 1.1 service patch (check Add/Remove Programs in Control Panel on each computer) dir=ltr " ">

If not installed be sure to do so before proceeding.

Be sure to reboot after applying any updates and installations

  1. Run the .NET Framework reinitialization on each computer by performing the following: dir=ltr " ">

  2. Select Start -> Run

  3. Browse to the C:\WINNT\Microsoft.NET\Framework\v1.1.4322\ folder and select aspnet_regiis.exe and than place a -i after it so that in the RUN is shows as

C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i

3. Select OK which will bring up a DOS window which will run toreinitialize .NET 1.1.4233 again

  1. Let it run.

  2. When it is finished the DOS window will close itself.

  3. Reboot. This won’t work unless you reboot.

  4. Log back in physically at the computer and perform step #9 and continue on with the configuration.

  5. Perform a fresh install of the AyaNova v3.1.7 installation to obtain the program files. (read through instructions before proceeding) dir=ltr " ">

  6. Although what you are performing shouldn’t affect your actual AyaNova database file as it is in a separate folder location than the program files, it is always recommended to backup. Do so.As using the network Firebird configuration, you would use your edited networkFirebirdsnapshot.bat file to create a snapshot of the AyaNova database file, and than backup thesnapshot.

  7. Make a backup of this edited networkFirebirdsnapshot.bat file (just so you don’t have to edit it again) and the AyaNova.exe.config file on each computer

  8. On the computers where the AyaNova program files were just copied too, delete all the AyaNova 3 program files. Reboot.

  9. On the computer where the AyaNova installation was originally run, un-install AyaNova 3 (do not run a repair - un-install). Be sure to reboot after

  10. This won’t affect your present AyaNova database file because as per the Firebird configuration instructions, you have moved the AyaNova database to a separate location than the program directory.

  11. On this computer, make sure you have a latest downloaded copy of the AyaNovaSetup.exe file

  12. Perform the basic AyaNova 3.1.7 installation taking all defaults

  13. Open Windows Explorer, open C:\Program Files\Ground Zero Tech-Works Inc\AyaNova 3 folder

  14. Delete the AYANOVA.FDB in C:\Program Files\Ground Zero Tech-Works Inc\AyaNova 3 folder as this is just a trial standalone database installed by the installation.

  15. Restore your AyaNova.exe.config file to this folder so that you can connect to your networked Firebird configuration

<FONT

Before I do this did you try to hit preview? That is where it was giving the error

Hi MArk

You said this is occurring when holding down the SHIFT key while selecting a report template - is this not what you are doing?

Markcrum (6/6/2006)

you are holding down the SHIFT key while selecting the report template to access the internal report designer for this report that the error posted above occurs?

Holding down shift Key

Please be specific. Step by step, exact detail by exact detail provide what it is that you are doing.

  • Joyce

I am guessing here - but I think that you are not opening the internal report designer for those report templates - but you are actually trying to print a report but you have no data entered into AyaNova yet.

You have no service workorders to report off of.

Create at least one service workorder before attempting to print preview one of those sample report templates.

As your goal is to get any issued addressed, and our goal is the exact same thing - pleaseprovide specific step by step what it is that you are performing. I know it is frustrating when something doesn’t work, but that means it is even more important to be specific so that we can help you get up and working right away.

Please refer to the topic http://forum.ayanova.com/Topic706-60-1.aspxwhich is also identified in the AyaNova v3 Manual.