Welcome, Guest
Username: Password: Remember me
This forum is the place to discuss issues related to ReportPro, Xs2Ado, Vo2Ado, bBrowser and other 3rd party products
  • Page:
  • 1

TOPIC:

RP3 Designer Sample Application for x# 27 Apr 2021 12:13 #18198

  • HeikoP
  • HeikoP's Avatar
  • Topic Author


  • Posts: 48
  • Robert,

    could you send source of the "Designer Sample Apllication" for X# (ReportPro3.ReportDesign)
    I tryed to convert our VO-Designer-App to x# bis haven´t been succesful.

    The Main reason for this is the cApp-Class from Classmate. I think i can´t set __setAppObject() in the Start method or funktion with this class.

    Now I would need a sample that shows me how to start the linkable designer.

    I need to do this, to find out if the X#-version of ReportPro3 has the same Problems with relations as rp3950 for VO.

    This is not very urgent.

    Thanks for your help

    Heiko

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 27 Apr 2021 12:27 #18201

    • Chris
    • Chris's Avatar


  • Posts: 3759
  • Hi Heiko,

    Why don't you simply run the regular X# RP3 designer (ReportPro3.exe), create a new test report or open one you have already created in VO to test this? Or did I not understand you correctly?
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 27 Apr 2021 12:51 #18204

    • HeikoP
    • HeikoP's Avatar
    • Topic Author


  • Posts: 48
  • Chris,

    thanks for you answer.

    We have our own Datasources we pass over to the designer. We have a structure like c:\app\dbf\ where are located Data for all clients and c:\app\dbf001\ for Data for Client 1 c:\app\dbf002\ and so on. This doesn´t work with the comple rp3-designer app. It works only with the linkable Designer app.

    Additionaly i want to thest a lot of user defined functions we are using in the report and try if they are working correctly with x#.

    Heiko

    Please Log in or Create an account to join the conversation.

    Last edit: by HeikoP.

    RP3 Designer Sample Application for x# 27 Apr 2021 14:20 #18208

    • Chris
    • Chris's Avatar


  • Posts: 3759
  • Hi Heiko,

    OK, I am not very sure if the sample code will be enough for this, but here it is! Please let us know if you need anything else.

    File Attachment:

    File Name: ReportPro3...sign.zip
    File Size:3 KB
    XSharp Development Team
    chris(at)xsharp.eu
    Attachments:

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 27 Apr 2021 14:37 #18209

    • HeikoP
    • HeikoP's Avatar
    • Topic Author


  • Posts: 48
  • Chris,

    thank you very much. I will try it and tell if it works.

    Heiko

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 27 Apr 2021 18:35 #18212

    • HeikoP
    • HeikoP's Avatar
    • Topic Author


  • Posts: 48
  • Chris,

    now I got an application to run with the help of your sample. The main trick was:

    CmStart("ReportPro3.ReportPro3Designer") ´
    In a "Start" Function. The old designer sample had an cApp Class with a "Start" Method.

    But now I can confirm the problem with the relations. It´s just the same in x# as in the newest Version for VO. I had wondered if not.

    I think there is another problem with embedded pictures, but i will further investigate this and report it.

    One more thing is a little bit annoying. If you don´t have all the DLLs you need to run the EXE, it just ends without an error and you don´t know really why. That took me some hours to find out what happened.

    Greetings Heiko

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 27 Apr 2021 18:40 #18213

    • HeikoP
    • HeikoP's Avatar
    • Topic Author


  • Posts: 48
  • Chris,

    the problem with the pictures was related to the missing dlls.

    Heiko

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 27 Apr 2021 20:43 #18214

    • Chris
    • Chris's Avatar


  • Posts: 3759
  • Hi Heiko,

    Thanks for your feedback! About the original problem, I would be surprised if there was something recently changed in BOTH the VO and X# versions causing this. At least I don't see such a recent change, but I will let Robert comment on that, maybe he remembers something.

    Which was the previous version, in which it was working as you expected? Also can you send a full sample demonstrating the problem?
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 28 Apr 2021 09:56 #18216

    • HeikoP
    • HeikoP's Avatar
    • Topic Author


  • Posts: 48
  • Chris,

    the Version is 3.9.5 (Internal Number), from October 2012. I got this from Willie Moore. The File was named RP39eFull.exe.

    I will try to fix a full sample to demonstrate the problem, butt this will take me some time.

    Thanks

    Heiko

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 28 Apr 2021 10:00 #18217

    • Chris
    • Chris's Avatar


  • Posts: 3759
  • Hi Hieko,

    Oh, October 2012! OK, by "recent" I meant last few months or so :)
    Certainly a lot may have changed since 10 years ago.
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 28 Apr 2021 10:09 #18218

    • robert
    • robert's Avatar


  • Posts: 3293
  • 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

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 28 Apr 2021 10:39 #18219

    • HeikoP
    • HeikoP's Avatar
    • Topic Author


  • Posts: 48
  • 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

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 29 Apr 2021 13:27 #18236

    • HeikoP
    • HeikoP's Avatar
    • Topic Author


  • Posts: 48
  • 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

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 29 Apr 2021 14:04 #18237

    • robert
    • robert's Avatar


  • Posts: 3293
  • 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

    Please Log in or Create an account to join the conversation.

    RP3 Designer Sample Application for x# 29 Apr 2021 18:47 #18248

    • HeikoP
    • HeikoP's Avatar
    • Topic Author


  • Posts: 48
  • 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

    Please Log in or Create an account to join the conversation.

    Last edit: by robert.
    • Page:
    • 1