Report in AX 2012 does not open;List of errors - axapta

I have created a report in AX 2012 and Visual Studio properly but once I try to open it the following list of erors appears:
Thank you
Error executing code: FormRun (data source) has no valid runable code in method 'new'.
Stack trace
(C)\Classes\FormRun\new
(C)\Classes\SysSetupFormRun\new - line 4
(C)\Classes\ClassFactory\formRunClassOnClient - line 10
(C)\Classes\ClassFactory\formRunClass - line 24
(C)\Classes\DialogForm\doInit - line 12
(C)\Classes\Dialog\doInit - line 12
(C)\Classes\Dialog\doRun - line 24
(C)\Classes\SysOperationDialog\run - line 12
(C)\Classes\SysOperationController\dialogShow - line 6
(C)\Classes\SysOperationController\dialogRun - line 40
(C)\Classes\SysOperationController\prompt - line 9
(C)\Classes\SrsReportRunController\runToScreen - line 26
(C)\Classes\SrsReportRunController\runReport - line 68
(C)\Classes\SrsReportRunController\run - line 27
(C)\Classes\SysOperationController\startOperation - line 10
(C)\Classes\SrsReportRunController\startOperation - line 12

To me, this is mostly base code, so it's a compile or CIL-compile issue most likely.
Have you compiled your CIL or performed an incremental CIL compile?
Refresh your report caches (Tools>Caches>Refresh Report Server).
Are the WCF settings in the AXC used for the report server refreshed?
Is the report server using a specific AXC that may not be refreshed? (https://technet.microsoft.com/en-us/library/hh389774.aspx)

You can find that the issue is with form (as the infolog suggest). The name of the form can be found out if you debug the code in classes.
Try putting debugger on DialogForm.doInit(). In this method, you can find the name of the form in the object variable, "form", used inside this method in a call to args.object(form).
You have to compile this form; Restore it and report does get generated.
Remember, DialogForm.doInit() gets called 2 times, Once, launching input UI form and another when trying to launch report viewer. So if the input/contract form is getting opened and the error comes before showing the report output, its the second time when you are interested to find the name of the form.
In my case, culprit forms were, SysOperationTemplateForm and SRSReportViewer form.

Related

Running multiple xdtool commands from activateResult

I'm creating a gnome shell extension and implementing the search provider. In the activateResult method I want to run some code like
GLib.spawn_command_line_sync('xdotool windowactivate ' + window_id);
GLib.spawn_command_line_sync('xdotool key "ctrl+r"');
GLib.spawn_command_line_sync('xdotool type ' + some_text);
The problem is that only the first command works, and I get some errors like:
Jul 27 20:05:09 comp org.gnome.Shell.desktop[3334]: Window manager warning: Received a NET_CURRENT_DESKTOP message from a broken (outdated) client who sent a 0 timestamp
Jul 27 20:05:09 comp org.gnome.Shell.desktop[3334]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x2e00001 (somestuff)
Jul 27 20:05:09 comp org.gnome.Shell.desktop[3334]: Window manager warning: last_focus_time (93207838) is greater than comparison timestamp (93207584). This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW. Trying to work around...
Jul 27 20:05:09 comp org.gnome.Shell.desktop[3334]: Window manager warning: last_user_time (93207838) is greater than comparison timestamp (93207584). This most likely represents a buggy client sending inaccurate timestamps in messages such as _NET_ACTIVE_WINDOW. Trying to work around...
Jul 27 20:05:09 comp org.gnome.Shell.desktop[3334]: Window manager warning: 0x2e00001 (somestuff) appears to be one of the offending windows with a timestamp of 93207838. Working around..
One thing I tried was to combine all the xdotool commands with bash -c "... ... ..." with no luck.
After selecting a search result, how can I switch to a window and simulate key presses?
(I'm brand new to gnome stuff, gjs stuff, and even JS, but, do write python daily)
edit: Just tried spawn_command_line_async and it works. Feels sloppy, someone with more experienced might have a better answer.
If you are writing a GNOME Shell extension, it's worth noticing that there are a number of GNOME platform libraries that you can rely on being available.
For simulating mouse and keyboard event, Atspi will work in most situations. As a simple example of simulating pressing the a key:
const Atspi = imports.gi.Atspi;
Atspi.generate_keyboard_event(0, 'a', Atspi.KeySynthType.STRING);
Activating a window, on the other hand, is probably something best done with the built-in window manager functions, however these aren't documented and you'd have to inspect the GNOME Shell JavaScript source or the source of another extension that does this.

PeopleSoft AE with GetNextNumberWithGapsCommit function erroring out initially, but goes to success later on

Production environment-> 2 app server domains, 2 web server domains, 3 process schedulers [AIX, 1 NT], NON RAC Oracle DB
PT 8.55.15, HCM 9.2 DB 12.2.0.1
We are running a custom AE program in our production environment. This AE that calls delivered EOEN application packages. No customization's have been made in this package. Custom component interface is also involved. This AE has been running in our environment since 5 years ago. No change has been done to the code in near past.
This AE has been behaving very weirdly since some 2-3 weeks ago. It errors out for the first time but goes to success when re-run in second/third run. We are not changing any parameters nor bouncing any services in second/third run. This application package [EOEN_MVC.EOEN_MODEL] makes calls to PeopleCode function - GetNextNumberWithGapsCommit.
We had set trace on this AE and found that the program goes to error every time the "GetNextNumberWithGapsCommit" function is called. These are the lines from the trace:
3905919 23:51:18.263 0.005472 Cur#8.15073404.HCMPRO RC=0
Dur=0.000094 COM Stmt=SELECT DESCR,DESCRLONG FROM PS_EOEN_REGE_LNG
WHERE EOEN_EVENT_NAME=:1 AND LANGUAGE_CD = :2
3905920 23:51:18.264 0.000974 Cur#8.15073404.HCMPRO RC=0
Dur=0.000001 Bind-1 type=2 length=16 value=CreateTriggerESP
3905921 23:51:18.265 0.000966 Cur#8.15073404.HCMPRO RC=0
Dur=0.000000 Bind-2 type=2 length=3 value=ESP
3905922 23:51:18.270 0.004369 258: If
All(&RS_RegEvnt(1).EOEN_REG_EVNT.EOEN_EVENT_NAME.Value) Then
3905923 23:51:18.271 0.001026 Fetch Field:
EOEN_REG_EVNT.EOEN_EVENT_NAME Value=CreateTriggerESP
3905924 23:51:18.272 0.001004 259:
&NextEventID = GetNextNumberWithGapsCommit(EOEN_CONFIG.EOEN_LAST_ID,
2147483647, 1);
3905925 23:51:18.273 0.001065 Cur#7.15073404.HCMPRO RC=0
Dur=0.000031 COM Stmt=UPDATE PS_EOEN_CONFIG SET EOEN_LAST_ID =
EOEN_LAST_ID + 1
3905926 23:51:18.274 0.001453 Cur#2.15073404.HCMPRO RC=0
Dur=0.000042 COM Stmt=SELECT
TO_CHAR(SYSTIMESTAMP,'YYYY-MM-DD-HH24.MI.SS.FF') FROM PSCLOCK
3905927 23:51:18.278 0.003895 Caught Exception: Error
grave de SQL. (2,125) EOEN_MVC.EOEN_MODEL.EOENInterface.OnExecute
Name:RaiseEvent PCPC:14959 Statement:259
Called from:FUNCLIB_HR_ESP.TRGR_FUNCTIONS_ESP.FieldFormula
Name:Create_Triggers_ESP Statement:60
Called from:JOB.REPORTS_TO.SavePostChange Statement:3
Error message in the process monitor is same as above:-
Error -> Error grave de SQL. (2,125)
EOEN_MVC.EOEN_MODEL.EOENInterface.OnExecute Name:RaiseEvent PCPC:14959
Statement:259 Called
from:FUNCLIB_HR_ESP.TRGR_FUNCTIONS_ESP.FieldFormula
Name:Create_Triggers_ESP Statement:60 Called
from:JOB.REPORTS_TO.SavePostChange Statement:3
I have tried keeping the DBFlags parameter as "8" and "0" in both application server and process schedulers.
I also checked the EOEN_MSG_CHNL queue, its associated service operation EOEN_MSG, handlers, routings etc. Everything is active and running. No failed IB messages. Domain status active.
Nothing works. And the error remains.
Any suggestions may be of great help.

Stack trace error when using standard AX auto report

I get a stack trace error (DictField object not initialized.
Stack trace
(C)\Classes\SysQuery\packDataSource - line 65
(C)\Classes\SysQuery\packDataSource - line 148
(C)\Classes\SysQuery\packRangeAndSortorder - line 37
(C)\Classes\SysQueryForm\querySave - line 18
(C)\Classes\SysQueryForm\buildSavedQueriesMap - line 21
(C)\Classes\SysQueryForm\buildSavedQueriesBox - line 8
(C)\Forms\SysQueryForm\Methods\run - line 5
(C)\Classes\SysSetupFormRun\run - line 9
(C)\Classes\QueryRun\prompt
(C)\Forms\SysTableForm\Methods\queryOpenDialog - line 10
(C)\Forms\SysTableForm\Designs\DesignList\QueryBtn\Methods\Clicked - line 4
)when I try to select a range for any auto report(Click select from the report dialog) when generating a standard ax auto report. This only happens when I try to generate the report in the details form.(It works fine on all listpages but fails in the detail page). To generate I go to File -> Print -> Print/Print Preview this shows a dialog then I click select to set the range. On click of select the error is thrown. Any ideas would be appreciated.
You need to reset your usage data.

Sales Order Confirmation Error

I am trying to confirm the sales order but I am getting error shown below. The environment is updated from CU1 to CU9 recently. I did Full Compilation and Full CIL and Incremental CIL with out errors. Can you please suggest what could be the issue?
Thanks in advance.
Error : Map object not initialized.
Stack trace
(S)\Classes\FormletterService\postJournal - line 52
(S)\Classes\FormletterService\run - line 221
(S)\Classes\FormletterService\postSalesOrderConfirmation - line 14
(S)\Classes\DictClass\callObject
(S)\Classes\SysOperationServiceController\runOperation - line 93
(S)\Classes\SysOperationServiceController\runServiceOperation - line 22
(S)\Classes\DictClass\callStatic
(S)\Classes\SysDictClass\invokeStaticMethod - line 26
(S)\Classes\SysDictClass\invokeStaticMethodIL - line 39
(S)\Classes\SysOperationRPCFrameworkService\runServiceOperation - line 5
(C)\Classes\SysOperationServiceController\runOperationWithRunAs - line 7
(C)\Classes\SysOperationServiceController\run - line 22
(C)\Classes\FormLetterServiceController\run - line 3
(C)\Classes\SalesFormLetter\run - line 95
(C)\Classes\SalesFormLetter\main - line 138
(C)\Classes\FormFunctionButtonControl\Clicked
The error is caused because the docuRefRecIdsPerJournalMap variable of class FormLetterService is not initialized. Debug method initDocuRefRecIdsPerJournalMap where this variable gets initialized and also method run where the initialization method gets called. You may also have to check classes that extend from FormLetterService and overwrite any of these methods or change the docuRefRecIdsPerJournalMap variable. Also check if you have any customizations on these classes.
Try to 'Compile forward' the base class FormletterService and afterwards do a full CIL compilation again
Hope that helps

Powerbuilder word OLE: Run time error 35 while setformresult

I am using powerbuilder 12.5 to add data to word templates using bookmarks.When I use objword.setformresult(bookmarkname,value) I get run time error 35
"error calling external object function setformresult"
Info: We have recently migrated powerbuilder 6.5 to 12.5 but still we use Office 2003
This is how I do it:
lole_word = CREATE OLEObject
lole_word.ConnectToNewObject ("word.application")
lole_Document = lole_word.Documents.Open (is_infile,FALSE,TRUE,FALSE)
lole_range = lole_document.Bookmarks.item(ls_bookmark).Range
lole_range.Text = ls_newText
Always put code like this a Try..Catch block and catch OleRuntimeError and RuntimeError. Note that replacing the text will remove the bookmark. If you need the bookmark you have to remember where it is (for example lole_document.Bookmarks.item(ls_bookmark).Start) and add the bookmark to the document again.

Resources