RP3 Designer Sample Application for x#

This forum is the place to discuss issues related to ReportPro, Xs2Ado, Vo2Ado, bBrowser and other 3rd party products
User avatar
robert
Posts: 4529
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

RP3 Designer Sample Application for x#

Post by robert »

Heiko,

A lot has changed since 2012. One thing is that the company that gave you that changed version (GrafX) no longer exists.
Did you get just the binaries for that release or did you also get the source code ?
If you got the source code, can you share that with us (send me an email).

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
HeikoP
Posts: 48
Joined: Mon May 30, 2016 4:19 pm
Location: Germany

RP3 Designer Sample Application for x#

Post by HeikoP »

Robert, Chris,

Thanks for you answers.

I thought that ReportPro didn´t have much changes since the last 12 years. At least the errors in the designer are still the same with the actual version. If someone is interested i will help fixing them, by testing and describe them.
Unfortunatel I don´t have the sourcecode. I only got binaries, this will be a thing that I change in the future. I will only use tools where i buy the sourcecode. I have the sourcecode for classmate. I could share this, but i think you have this already.

Heiko
HeikoP
Posts: 48
Joined: Mon May 30, 2016 4:19 pm
Location: Germany

RP3 Designer Sample Application for x#

Post by HeikoP »

Robert, Chris,

since I have bought the sourcecode, i have found the problem!

Thanks that you are doing this buisness and sell the sourcecode, otherwise i could never have changed anything in that product. I must not forget to say "Thank You!" that you are developing x#!

The problem is located in the METHOD InitExpressions class rpRDDTable in the rpRDDTable.DLL, and right now I have at least found a workaround to make things work again, without changing all reports and have additionally PDF. But I will try to make it a little bit better and maybe give you the code that you could merge it, if you like. I found several other things to be improved. I.e. a dialog where the Checkbox is a little bit over a button and other smaller stuff like this.

I don´t know where i can discuss reportpro problems, since they are concerning a sourcecode that not everyone has licensed. Should I post possible changes here? Maybe someone else is interested in that.

Heiko
User avatar
robert
Posts: 4529
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

RP3 Designer Sample Application for x#

Post by robert »

Heiko,

I have created a new forum "3rd party products" and moved this topic to that forum
I do not think discussing the source code is a problem. As long as you do not include the complete source code as an attachment <g>.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
HeikoP
Posts: 48
Joined: Mon May 30, 2016 4:19 pm
Location: Germany

RP3 Designer Sample Application for x#

Post by HeikoP »

Robert,

here is my changed code (for VO 2.8 ) that solved my problem:

~"ONLYEARLY-"

METHOD InitExpressions(oSection AS rpBaseSection,aFlds AS ARRAY,nFlds AS DWORD,aVars AS ARRAY,nVars AS DWORD) AS LOGIC PASCAL CLASS rpRDDTable

LOCAL oError AS Error
LOCAL cRelSeek,cRelExp AS STRING
LOCAL nLp,nLen AS DWORD
LOCAL oTable AS rpRDDTable
* LOCAL cPrefix as STRING

~"ONLYEARLY+"
// initialize the seek code block
IF !empty(SELF:cSeekExp) .AND. (SELF:bSeekBlk:=oSection:ExpBlk(aFlds,nFlds,aVars,nVars,SELF:cSeekExp))==NIL
oError:=Error{} // display error message...
oError:Description:=rpLangString(IDL_ERROR_INVALID_RDD_SEEK)+SELF:cSeekExp
ShowErrorDlg(oError,TRUE)
ENDIF

IF empty(SELF:cWhileExp) // initialize the while code block
SELF:bWhileBlk:={|| TRUE}

ELSEIF (SELF:bWhileBlk:=oSection:ExpBlk(aFlds,nFlds,aVars,nVars,SELF:cWhileExp))==NIL .OR. !UsualType(ExecuteCodeBlock(SELF:bWhileBlk))==LOGIC
SELF:bWhileBlk:={|| TRUE}

oError :=Error{} // display error message...
oError:Description:=rpLangString(IDL_ERROR_INVALID_RDD_WHILE)+SELF:cWhileExp
ShowErrorDlg(oError,TRUE)
ENDIF

IF !SELF:oParent==NULL_OBJECT // evaluate the child and parent
// relation expression
// cRelSeek :="("+alltrim(str(SELF:oParent:nArea,5,0))+")->("+SELF:cParentExp+")"
// cRelExp :="("+alltrim(str(SELF:nArea,5,0))+")->("+SELF:cRelationExp+")=("+alltrim(str(SELF:oParent:nArea,5,0))+")->("+SELF:cParentExp+")"

// The above lines are a hack for compatibility with version 1.0x....(expressions in the file were not aliased...
// I'd like to replace them with the code below later...
// BUT, this may not work with indexes because the fields are not aliased!
cRelSeek :="("+self:cParentExp+")"
// cRelExp :="("+self:cRelationExp+") = ("+self:cParentExp+")"
cRelSeek :="("+SELF:cParentExp+")"
cRelExp := SELF:cRelationExp

// MB, RVdH - Need to prefix index expression with table alias name...
IF AT(".", cRelExp) == 0
/*
* Excluded by HJP 20210429
cPrefix := cAbsName+"."
cRelExp := StrTran(cRelExp, " ", "") // remove spaces
IF At("(", cRelExp) > 0
cRelExp := StrTran(cRelExp, "(", "("+cPrefix)
ELSE
cRelExp := cPrefix + cRelExp
ENDIF
IF At("+", cRelExp) > 0
cRelExp := StrTran(cRelExp, "+", "+"+cPrefix)
ENDIF
*/

/*
* Inserted HJP 20210429
* New line to use a 'numeric' alias for the workarea of the table as in the Hack above. The above code before don´t work for me,
* because it create a wrong Index Child Expression that is read from an Indextag, because you don´t really know what a field is in this expression, i.e.:
* Let´s say the alias of the file is: MYFILE
* The Index Expression is: INVTYPE+STR(CUSNUMBER,10,0)+MYFUNCTION()
* The Workarea is 12
* This it works with the following expression "(12)->(INVTYPE+STR(CUSNUMBER,10,0)+MYFUNCTION())"
* instead of "INVTYPE+MYFILE.STR(MYFILE.CUSNUMBER,10,0)+MYFUNCTION(MYFILE.)" what is produced by the excluded code above
* Better would be: "MYFILE.INVTYPE+STR(MYFILE.CUSNUMBER,10,0)+MYFUNCTION()", but to be honest, I don´t really know how to do that!
*/
cRelExp := "("+AllTrim(Str(self:nArea,5,0))+")->("+self:cRelationExp+")"
ENDIF
//cRelExp :="("+SELF:cRelationExp+") = ("+SELF:cParentExp+")"
cRelExp :="("+cRelExp+") = ("+SELF:cParentExp+")"




IF (SELF:bSeek:=oSection:ExpBlk(aFlds,nFlds,aVars,nVars,cRelSeek))==NIL .OR. (SELF:bRelEval:=oSection:ExpBlk(aFlds,nFlds,aVars,nVars,cRelExp))==NIL
self:bSeek :={|| nil }
self:bRelEval :={|| true}

oError :=Error{} // if not valid, display error
oError:Description:=rpLangString(IDL_ERROR_INVALID_REL)+self:oParent:cAbsName+" "+rpLangString(IDL_AND)+" "+self:cAbsName
ShowErrorDlg(oError,true)
ENDIF
ENDIF

nLen:=aLen(SELF:aChildTables)
FOR nLp:=1 UPTO nLen
oTable:=SELF:aChildTables[nLp]
oTable:InitExpressions(oSection,aFlds,nFlds,aVars,nVars)
NEXT nLp

RETURN TRUE

~"ONLYEARLY-"

Heiko
Post Reply