RP3 Header and Footer Bands report property not loaded correctly
Open any RP3 report created with the VO version of RP3, with the (Section) property Header and Footer Bands enabled. In the X# version, this is shown as disabled.
This is a new problem, did not exist in version 3.6 according to the customer
The Header and Footer are included. But the context menu option header/footer in the section properties is not checked. If you check it then 2 headers and footers are in the report
The problem is caused by the BandType enum. The value for the Header is defined as 1, but should have been -1. See https://github.com/X-Sharp/Rp3Net/commit/445908463d9ddaa6183d24088c4f4a8595fbdaf9
I have also created a Rp3 Runtime project for VS. See https://github.com/X-Sharp/Rp3Net/commit/9fb8fcfee417b3961717467d65884a58660d1339
This excludes the source code that is only used by the designer. The reportViewer example now has a link to the runtime project to demonstrate that it is working.
Good catch! How did you notice it?
But now when I am trying to open the Section menu after loading any report in the designer, I get an exception:
Description : Object reference not set to an instance of an object.
Subsystem : ReportPro3.Rdd
GenCode : EG_NULLVAR Variable not initialized
FuncSym : OOPHELPERS.SENDHELPER
Severity : ES_ERROR
Can Default : False
Can Retry : False
Can Substitute : False
Stack Trace :
RPHIERARCHICALLISTBOX:SETBITMAP (Line: 364)
RPSECTIONCFGDLG:INITPARAMS (Line: 250)
RPDESIGNER:MENU_SECTIONCFG (Line: 1118)
OOPHELPERS:SENDHELPER (Line: 0)
OOPHELPERS:DOSEND (Line: 0)
SEND (Line: 0)
CMENU:_PROCESSCOMMANDMSG (Line: 344)
CWINDOW:ONCOMMAND (Line: 254)
RPDESIGNER:ONCOMMAND (Line: 1380)
CWINDOW:DISPATCH (Line: 705)
CMDICHILD:DISPATCH (Line: 197)
_CMDICHILDPROC (Line: 153)
SENDMESSAGE (Line: 0)
CWINDOW:SENDMESSAGE (Line: 1754)
CMDISHELL:ONCOMMAND (Line: 408)
RPSHELLWINDOW:ONCOMMAND (Line: 165)
CWINDOW:DISPATCH (Line: 705)
CMDISHELL:DISPATCH (Line: 248)
_CMDISHELLPROC (Line: 129)
DISPATCHMESSAGE (Line: 0)
CAPP:EXEC (Line: 117)
CAPPEX:START (Line: 41)
RUNTIMEMETHODHANDLE:INVOKEMETHOD (Line: 0)
RUNTIMEMETHODINFO:UNSAFEINVOKEINTERNAL (Line: 0)
RUNTIMEMETHODINFO:INVOKE (Line: 0)
OOPHELPERS:SENDHELPER (Line: 0)
OOPHELPERS:SENDHELPER (Line: 0)
OOPHELPERS:DOSEND (Line: 0)
SEND (Line: 0)
CMSTART (Line: 363)
CMSTART (Line: 372)
START (Line: 11)
In my attempt to remove unneeded resources from the runtime project I had deleted the incorrect resources. I have restored the nativeresources.rc file and it is working again.
Good catch! How did you notice it?
Good old detective work. I found the variable that sets the checkmark in the menu and located the places where this value was assigned. I then remembers that the defines were changed into enums and compared the values.
Great, looks good now! Will send it to Stavros to confirm that this has fixed also the other issues he was seeing, which I suspect have the same root cause.
Stavros is on holidays, will wait for his response
Confirmed by customer