Report Pro 2: Laufzeitfehler wenn Reportfenster minimiert wird
Moderator: wriedmann
Report Pro 2: Laufzeitfehler wenn Reportfenster minimiert wird
Hallo zusammen
Aktuell habe ich zwei Probleme:
[*]
[*]Wenn ich im Report-Designer (RpReportDesigner) ein offenes Fenster "minimiere" kommt es zu einem Laufzeitfehler (siehe Anhang)
[*]Wenn ich mein Shellwindow von rpShellWindow ableite (oder darf man das nicht?) wird meine "QueryClose()" Routine 2x aufgerufen.
Punkt 1 kann mit "Rp2Net-main.zip" auf GitHub direkt nachvollzogen werden. Der Fehler ist jedoch auch in den älteren Varianten vorhanden.
Frage:
Habt Ihr diese Probleme nicht? Oder verwendet Ihr den "RpReportDesigner" nicht?
Gruss
Heinrich
Aktuell habe ich zwei Probleme:
[*]
[*]Wenn ich im Report-Designer (RpReportDesigner) ein offenes Fenster "minimiere" kommt es zu einem Laufzeitfehler (siehe Anhang)
[*]Wenn ich mein Shellwindow von rpShellWindow ableite (oder darf man das nicht?) wird meine "QueryClose()" Routine 2x aufgerufen.
Punkt 1 kann mit "Rp2Net-main.zip" auf GitHub direkt nachvollzogen werden. Der Fehler ist jedoch auch in den älteren Varianten vorhanden.
Frage:
Habt Ihr diese Probleme nicht? Oder verwendet Ihr den "RpReportDesigner" nicht?
Gruss
Heinrich
- Attachments
-
- Laufzeitfehler im RpReportDesigner.png (83.03 KiB) Viewed 662 times
Report Pro 2: Laufzeitfehler wenn Reportfenster minimiert wird
Hi Heinrich,
Normally both should work fine. Do you have a (complete) sample showing those problems?
Normally both should work fine. Do you have a (complete) sample showing those problems?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Report Pro 2: Laufzeitfehler wenn Reportfenster minimiert wird
Hi Chris
Yes, the original from Github (without modifications).Compile and Run with Microsoft Visual-Studio Community 2017, Version 15.9.37 see the attachement
For the 2the Example, change the "Start.prg" with this:
Then the "QueryClose()" is called twice
Regards Heinrich
Yes, the original from Github (without modifications).Compile and Run with Microsoft Visual-Studio Community 2017, Version 15.9.37 see the attachement
For the 2the Example, change the "Start.prg" with this:
Code: Select all
USING System.Windows.Forms
[STAThread] ;
FUNCTION Start(aArgs AS STRING[]) AS VOID
LOCAL oApp AS ReportPro2App
EnableLBOptimizations(TRUE)
TRY
oApp:=ReportPro2App{}
oApp:Start(aArgs)
CATCH e AS Exception
ErrorBox{ NIL, e:ToString() }:Show()
END TRY
RETURN
CLASS ReportPro2App INHERIT App
PROTECT oShellWindow AS MyShellWindow // rpShellWindow
METHOD Start(aArgs as STRING[])
SetAnsi(FALSE)
IF aArgs:Length > 0
* oShellWindow:=rpShellWindow{SELF, FALSE}
oShellWindow:=MyShellWindow{SELF, FALSE}
oShellWIndow:OpenRptFile(aArgs[1])
ELSE
oShellWindow:=MyShellWindow{SELF, TRUE}
ENDIF
SELF:Exec()
RETURN NIL
END CLASS
CLASS MyShellWindow INHERIT rpShellWindow
CONSTRUCTOR(oApp)
SUPER(oApp, FALSE)
RETURN
METHOD QueryClose()
LOCAL lEnde AS LOGIC
lEnde := MessageBox.Show( "Wollen sie das Programm beenden?", "Programm Ende", MessageBoxButtons.YesNo, MessageBoxIcon.Question ) == DialogResult.Yes
RETURN lEnde
END CLASS
Regards Heinrich
Report Pro 2: Laufzeitfehler wenn Reportfenster minimiert wird
Hi Heinrich,
Unfortunately the attachment for the first problem is not accessible!
I do see the problem with QueryClose() though, thanks for the sample! Will fix the problem in RP2.
Unfortunately the attachment for the first problem is not accessible!
I do see the problem with QueryClose() though, thanks for the sample! Will fix the problem in RP2.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Report Pro 2: Laufzeitfehler wenn Reportfenster minimiert wird
Chris,
1) is easy to show: Start Rp2Designer, i use 2.36.0.4, e.g. open "recent files" any rpt, click in the form the minimize button in the caption, and:
Problemsignatur:
Problemereignisname: CLR20r3
Problemsignatur 01: ReportPro2.exe
Problemsignatur 02: 2.36.0.4
Problemsignatur 03: 5f6865ab
Problemsignatur 04: ReportPro2.Runtime
Problemsignatur 05: 2.36.0.4
Problemsignatur 06: 5f6865a4
Problemsignatur 07: 34e
Problemsignatur 08: c8
Problemsignatur 09: System.AccessViolationException
Betriebsystemversion: 6.3.9600.2.0.0.256.103
Gebietsschema-ID: 1031
Zusatzinformation 1: 3931
Zusatzinformation 2: 39318975b0826d60fbcc811b5674ab1a
Zusatzinformation 3: c819
Zusatzinformation 4: c8193034f71ec652fa0054bf97b4896c
1) is easy to show: Start Rp2Designer, i use 2.36.0.4, e.g. open "recent files" any rpt, click in the form the minimize button in the caption, and:
Problemsignatur:
Problemereignisname: CLR20r3
Problemsignatur 01: ReportPro2.exe
Problemsignatur 02: 2.36.0.4
Problemsignatur 03: 5f6865ab
Problemsignatur 04: ReportPro2.Runtime
Problemsignatur 05: 2.36.0.4
Problemsignatur 06: 5f6865a4
Problemsignatur 07: 34e
Problemsignatur 08: c8
Problemsignatur 09: System.AccessViolationException
Betriebsystemversion: 6.3.9600.2.0.0.256.103
Gebietsschema-ID: 1031
Zusatzinformation 1: 3931
Zusatzinformation 2: 39318975b0826d60fbcc811b5674ab1a
Zusatzinformation 3: c819
Zusatzinformation 4: c8193034f71ec652fa0054bf97b4896c
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Report Pro 2: Laufzeitfehler wenn Reportfenster minimiert wird
Hallo Karl
Vielen Dank für den Test und die Präzisierung des Fehlers.
Da bin ich ja beruhigt, dass der Fehler nicht nur bei mir auftritt.
Grüsse Heinrich
Vielen Dank für den Test und die Präzisierung des Fehlers.
Da bin ich ja beruhigt, dass der Fehler nicht nur bei mir auftritt.
Grüsse Heinrich
Report Pro 2: Laufzeitfehler wenn Reportfenster minimiert wird
Thanks guys, now I understand and can confirm the problem! Should be fixed soon, will post an update here.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Report Pro 2: Laufzeitfehler wenn Reportfenster minimiert wird
I see there's also a newer ReportPro for VO (2.33 while I use 2.31), changes are all related to rotated text.
Which makes me wonder of this version fixes the following problem, and if not, if it can be fixed in the next version:
When I double click a .rpt file, (I have indicated in Windows that I want to open it with C:rp231sp4Rp2_32.EXE) ReportPro shows the splash screen, and that's it. The splash screen eventually disappears but the double clicked report does not open.
Would be great if that would work.
Dick
Which makes me wonder of this version fixes the following problem, and if not, if it can be fixed in the next version:
When I double click a .rpt file, (I have indicated in Windows that I want to open it with C:rp231sp4Rp2_32.EXE) ReportPro shows the splash screen, and that's it. The splash screen eventually disappears but the double clicked report does not open.
Would be great if that would work.
Dick
Report Pro 2: Laufzeitfehler wenn Reportfenster minimiert wird
Hi Heinrich,
The problem with minimizing windows is fixed now. Since you already have the code, you can change line 357 of ReportPro2, Runtime/Report/RpReportDesigner.prg
from
to
(add the _CAST)
Regarding the QueryClose, looking at the QueryClose method defined in the rpShellWindow class itself, it is defined as:
We could change the code to not require this check for SELF:lWarnOnExit, but I think it is probably safer (to avoid breaking someone else's code) that you just modify your code, so it follows the same pattern, something like:
Dick, I did a quick test and RP2 seems to correctly parse the command line and open files that you specify. Please try opening a command prompt, navigate to the folder where the rp2 exe is located and type
specifying the path to your rpt file, does it work this way?
The problem with minimizing windows is fixed now. Since you already have the code, you can change line 357 of ReportPro2, Runtime/Report/RpReportDesigner.prg
from
Code: Select all
SendMessage(oEvent:hWnd,WM_ICONERASEBKGND,DWORD(sPaint:hDC),0)
Code: Select all
SendMessage(oEvent:hWnd,WM_ICONERASEBKGND,DWORD(_CAST, sPaint:hDC),0)
Regarding the QueryClose, looking at the QueryClose method defined in the rpShellWindow class itself, it is defined as:
Code: Select all
METHOD QueryClose (oQCE)
LOCAL cSetting AS STRING
IF SELF:lWarnOnExit
cSetting:=Upper(AllTrim(SELF:oIniFileSpec:GetString("Environment", "WarnOnExit")))
IF cSetting=="TRUE" .or. cSetting=="ON"
IF !YesNo(SELF, RpLangString(IDS_WARN_CAPTION), RpLangString(IDS_WARN_MESSAGE))
RETURN FALSE
ENDIF
ENDIF
SELF:lWarnOnExit := FALSE
ENDIF
RETURN TRUE
Code: Select all
METHOD QueryClose(oEvent)
LOCAL lEnde := TRUE AS LOGIC
IF SELF:lWarnOnExit
lEnde := MessageBox.Show( "Wollen sie das Programm beenden?", "Programm Ende", MessageBoxButtons.YesNo, MessageBoxIcon.Question ) == DialogResult.Yes
IF lEnde
SELF:lWarnOnExit := FALSE
END IF
END IF
RETURN lEnde
Dick, I did a quick test and RP2 seems to correctly parse the command line and open files that you specify. Please try opening a command prompt, navigate to the folder where the rp2 exe is located and type
Code: Select all
Rp2_32.EXE C:...myreport.RPT
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Report Pro 2: Laufzeitfehler wenn Reportfenster minimiert wird
Good morning Chris
Thank you very much for your super fast help.
Both problems are solved.
Best regards Heinrich
Thank you very much for your super fast help.
Both problems are solved.
Best regards Heinrich