I'm new user of X# and ReportPro2 for X#.
I put this statements first
USING VO
USING ReportPro2
USING ReportPro2_Base
USING ReportPro2_Runtime
USING VOGUIClasses
USING VOWin32APILibrary
after using this code
oReport := RpReport{SELF, cRptPath + cRpt, cDBFPath}
IF oReport:IsValid
oReport:PrintPreview (cJobName, cPrint2FileName, cCaption, cMessage, TRUE, SW_SHOWMAXIMIZED)
I get error:
error XS0144: Cannot create an instance of the abstract class or interface 'ReportPro2.RpReport'
error XS1061: 'ReportPro2.RpReport' does not contain a definition for 'IsValid' and no accessible extension method 'IsValid' accepting a first argument of type 'ReportPro2.RpReport' could be found (are you missing a using directive or an assembly reference?)
error XS1061: 'ReportPro2.RpReport' does not contain a definition for 'PrintPreview' and no accessible extension method 'PrintPreview' accepting a first argument of type 'ReportPro2.RpReport' could be found (are you missing a using directive or an assembly reference?)
does anybody know what problem is.
Zeljko
Problem using ReportPro2 for X#
Problem using ReportPro2 for X#
Hi!
I think you need:
RpReportRDD instead of RpReport.
My call is like
oReport :=RpReportRDD{ SELF, cReport +".rpt", "D:MiscTuKVN_VersionDATAChris", Null_Array}
I think you need:
RpReportRDD instead of RpReport.
My call is like
oReport :=RpReportRDD{ SELF, cReport +".rpt", "D:MiscTuKVN_VersionDATAChris", Null_Array}
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)
Problem using ReportPro2 for X#
Yes, you are right.
But, now there is another error:
Description : No exported variable 'HELPDISPLAY'
Subsystem : BASE
GenCode : EG_NOVARMETHOD No exported variable
FuncSym : XSHARP.RT.OOPHELPERS.IVARGET
Severity : ES_ERROR
Can Default : False
Can Retry : False
Can Substitute : False
Argument Number : 2
Argument : cIVar
Arguments : {MainWin, Text: DBF-XML Demo,HELPDISPLAY}
Stack Trace :
at XSharp.RT.OOPHelpers.IVarGet(Object oObject, String cIVar, Boolean lSelf)
at XSharp.RT.Functions.IVarGet(Object oObject, String symInstanceVar)
at VO.ChildAppWindow..ctor(__Usual[] Xs$Args)
at ReportPro2.ChildAppWindowEx..ctor(__Usual[] Xs$Args)
at ReportPro2.RpReport..ctor(Object oOwner, Boolean lManager)
at ReportPro2.RpReportRDD..ctor(Object oParent, String cFileName, String cDataPath, __Array aDbfSwap)
But, now there is another error:
Description : No exported variable 'HELPDISPLAY'
Subsystem : BASE
GenCode : EG_NOVARMETHOD No exported variable
FuncSym : XSHARP.RT.OOPHELPERS.IVARGET
Severity : ES_ERROR
Can Default : False
Can Retry : False
Can Substitute : False
Argument Number : 2
Argument : cIVar
Arguments : {MainWin, Text: DBF-XML Demo,HELPDISPLAY}
Stack Trace :
at XSharp.RT.OOPHelpers.IVarGet(Object oObject, String cIVar, Boolean lSelf)
at XSharp.RT.Functions.IVarGet(Object oObject, String symInstanceVar)
at VO.ChildAppWindow..ctor(__Usual[] Xs$Args)
at ReportPro2.ChildAppWindowEx..ctor(__Usual[] Xs$Args)
at ReportPro2.RpReport..ctor(Object oOwner, Boolean lManager)
at ReportPro2.RpReportRDD..ctor(Object oParent, String cFileName, String cDataPath, __Array aDbfSwap)
Problem using ReportPro2 for X#
Hi Zeljko,
I think you have an old version of ReportPro, current versions have been refactored and allow you to use the class RpReport directly. Is it an X# or the old vlcan version of RP2 that you are using?
I think you have an old version of ReportPro, current versions have been refactored and allow you to use the class RpReport directly. Is it an X# or the old vlcan version of RP2 that you are using?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Problem using ReportPro2 for X#
ReportPro 2 for XSharp 2.35.0.4
date: 26.11.2019
date: 26.11.2019
Problem using ReportPro2 for X#
Hi Zeljko,
I can't see your email address, can you please send me an email at chris@ xsharp (dot) eu, so I will send you an updated RP version?
I can't see your email address, can you please send me an email at chris@ xsharp (dot) eu, so I will send you an updated RP version?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Problem using ReportPro2 for X#
Problem is solved, thanks to Chris.
Because I call ReportPro from winform not VO window, I had to put this code
LOCAL oOwner AS USUAL
oOwner := __ForeignWindow{SELF:Handle}
and change this code:
oReport := RpReport{oOwner, cRptPath + cRpt, cDBFPath}
Chris, thanks again.
Zeljko
Because I call ReportPro from winform not VO window, I had to put this code
LOCAL oOwner AS USUAL
oOwner := __ForeignWindow{SELF:Handle}
and change this code:
oReport := RpReport{oOwner, cRptPath + cRpt, cDBFPath}
Chris, thanks again.
Zeljko
Problem using ReportPro2 for X#
Glad it works for you now Zeljko and thanks for posting the solution here! Have to say I took that tip from Robert though
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu