Showing posts with label Annoyances. Show all posts
Showing posts with label Annoyances. Show all posts

Thursday, 17 July 2014

OnPageEvent Missing Handles in ServerPage

A ServerPage app object allows two framework-supported methods: the InitializeComponent Sub and the OnPageEvent sub meant for handling events raised from the web page.

When adding the OnPageEvent method via the drop-down selection at the top of the IDE page within a ServerPage code tab, the following method stub is added (for a ServerPage called MyServerPage):

Protected Sub MyServerPage_OnPageEvent(ByVal ctl As NextGen.Framework.WebUI.HtmlBuilder.BaseCtl, ByVal evtArgs As NextGen.Framework.WebUI.HtmlBuilderEventArgs)

End Sub

The template sub has the "Handles" assignment missing from the end of the method signature. Without this, the method will not get called when page events are raised. To fix this, just add the following to the end of the signature: Handles Me.OnPageEvent. The above example would then look like this:

Protected Sub MyServerPage_OnPageEvent(ByVal ctl As NextGen.Framework.WebUI.HtmlBuilder.BaseCtl, ByVal evtArgs As NextGen.Framework.WebUI.HtmlBuilderEventArgs) Handles Me.OnPageEvents

End Sub

Tuesday, 7 February 2012

Project Rename Produces Duplicate

In the IDE, right clicking on the Project node in the Project pane gives an option to "Rename Project ID".
Renaming a Project in the 3e IDE
On the face of it, renaming the Project seems to work as expected. However, if the IDE is refreshed (or closed and reopened), both a Project with the old name and a Project with the new name now exist. This can be seen by pressing the Open... button at the top of the Project pane.

To workaround this, best practice when renaming Projects would be to:
  1. Rename the Project.
  2. Save the Project.
  3. Refresh the IDE (Refresh button next to Logout).
  4. Open the Project with the old name.
  5. Delete the Project with the old name.
  6. Open the Project with the new name.
This avoids a build up of unnecessary, renamed Projects.

Thursday, 5 January 2012

BillSum Table Rebuild

The BillSum table is a snapshot of all billing information per Timekeeper and Matter. It is effectively a non-live amalgamation of the Timecard, Costcard and Chargecard tables. It is updated periodically but can become out of date and inaccurate due to various errors in the system.

To rebuild the BillSum table take the following steps, courtesy of Weronika Kozlowska, Application Support Consultant at Elite Thomson Reuters UK:

1. Go to Notification task Manager > select the BillsumMsgQueue task > tick the 'Disable' option and release
2. Go to the Build Billsum Tables process > tick all 4 month / period options > Background > Release
3. After a while, go to Notification Task and Log viewer and click the 'View Background Tasks' button you will see your process initally with a 'Running' status > periodically check whether the status changes to 'Complete' (It might take a few hours)
4. Once the task is complete, go back to Notification task Manager > select the BillsumMsgQueue task un-tick the 'Disable' option and release.

If you have a period of the day/week when no billing information (time, costs, charges) is ever captured, late at night or early morning for example, the Build Billsum Tables can be scheduled to run automatically via the Notification Task Manager process. The BillsumMsgQueue task need not be disabled first if you are confident no billing information will be captured during the run time. Note that the Build Billsum Tables task can take several hours to run.

Tuesday, 6 December 2011

Process Else Rules - Accessing the DataObject in Code

Within the Code tab of a Process, the Base Object can be accessed as a property. For example, the evaluation of CUSTOM rules can sometimes require a decision to be made based on a value contained within the Base Object.
Access to the ProfMaster Base Object from a custom rule in Process code
Function Evaluate As System.Boolean
Return Me.IM_AutoBillEdit.IsOutsideProcess.Value(False)
End Function

However, this Base Object property is not accessible in Else rules. To access it, cast Me.Process to its type and then access individual objects though the object collection.
Access to the ProfMaster Base Object from an ELSE rule in Process code
Public Overrides Sub OnRule()
For Each profMasterItem As ProfMaster In _
CType(Me.Process, NextGen.Application.Process.ProfProcess). _
ProfMasterCollection

NextMessage = profMasterItem.Description
Next
End Sub

Friday, 4 November 2011

Time Out During Upgrade - Toggle READ_COMMITTED_SNAPSHOT Failed

Utilities 3e can sometimes fail when running the Upgrade process and throws a time out error. The Upgrade process then hangs and doesn't respond to the stop command/button. The only way out is to close the whole Utilities app.

The error message has a comment of "Toggle READ_COMMITTED_SNAPSHOT Failed" with extra info along the lines of "Error executing System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

The reason for this is the database has its READ_COMMITTED_SNAPSHOT setting turned OFF before upgrading and does not turn it back ON before failing. Utilities 3e fails to function correctly, as does the IDE and the front end!

The database can become inaccessible in Sql Query Analyser / SSMS, preventing queries being ran against it. Taking the database offline then bringing it back online solves this problem.

What's required is to turn READ_COMMIT_SNAPSHOT back on. This is typically done by running this on the DB in question:

ALTER DATABASE <DATABASE_NAME> SET READ_COMMITTED_SNAPSHOT ON

However, this statement can fail to run correctly and endlessly run in Query Analyser, never completing. A better option (for Sql Server 2005 - i.e. 3e 2.5 and below) is:

IF(CHARINDEX('Microsoft SQL Server 2005',@@VERSION) > 0)
BEGIN
    DECLARE @sql VARCHAR(8000)
    SELECT @sql = '
    ALTER DATABASE ' + DB_NAME() + ' SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
    ALTER DATABASE ' + DB_NAME() + ' SET READ_COMMITTED_SNAPSHOT ON;
    ALTER DATABASE ' + DB_NAME() + ' SET MULTI_USER;'
    EXEC(@sql)
END

An IIS Reset may be needed after this, but after that all 3e systems should be running as before. The Update from within Utilities3e always seems to work the second time around.

Tuesday, 28 June 2011

Disabled (Greyed-Out) Fields on Forms

A field on a form can sometimes look disabled in the web browser without any apparent reason. The Access property is not set to ReadOnly and is not changed anywhere in the code.

This can occur when a change is made to an object and it becomes custom, i.e. it overrides the stock object for the first time.

A Rebuild with Dependencies on the Form will fix the problem. The field should then be enabled in the front end.

Thursday, 19 May 2011

No Intellisense in IDE

No Intellisense showing in the IDE code page? CTRL + SPACE not showing the helpful drop down?

Sometimes this just happens, especially when the code contains errors. Usually, a CodeDOM rebuild (CTRL + SHIFT + B), then a code parse (CTRL + R) will solve the issue.

However, this doesn't always work - even though you are well within your rights to be shown some Intellisense. In that case, try closing and reopening the object. If that gives on joy, try restarting the IDE.

After that, you're on your own.

Tuesday, 3 May 2011

Form Labels Not Displayed/Updating

Sometimes, the text of a label on a Form is not displayed in the browser after making a change in the IDE. To force the label to update:

  • In the IDE, load the project that contains the problem form.
  • Right click the top most project node and select Build Project.
  • For Build Type, select "All AppObjects that use any AppObject in <Project Name> (Runtime Only)" and click Start Build.
  • After building, close all instances of browsers hosing 3e and open a new instance. The labels should now display correctly. 

Friday, 18 March 2011

Annoyance: Huge Default Report Parts

After creating a new report and giving the Root Object ID property a value, the Header, DetailsHeaderStandard, DetailStandard and Footer have their heights set to massive values. The height value of each has to be manually reduced to make it easier to work with.