ReportPro2, English and translation: now ok!

Forum dedicato ai programmatori di X# in lingua italiana – Italian language forum

Moderator: wriedmann

User avatar
Gfb22
Posts: 105
Joined: Sat Oct 08, 2022 7:43 pm
Location: Italy

bBrowse: and now?

Post by Gfb22 »

Ok: luckily I'm not the only one distracted... :-)
Here is the source folder C:Rp2Net-SourceRp2Net-main and the program..
RP2Sorce.jpg
RP2Sorce.jpg (13.83 KiB) Viewed 1468 times
RP2dir.jpg
RP2dir.jpg (10.72 KiB) Viewed 1468 times
RP2English.jpg
RP2English.jpg (14.42 KiB) Viewed 1468 times
gfb
User avatar
Chris
Posts: 4899
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

bBrowse: and now?

Post by Chris »

Hi Gian,
Gfb22 post=24439 userid=6903 wrote:
rp.jpg
I'm trying to localize RP2 menus and messages (for rpReport).
In ReportPro2.English Lib I inserted the translations that interest me in 'NativeResources.rc': I tried to compile and Run and it doesn't give any message but the DLL is not created.
Where am I wrong?
OK, so I tried this and it seems to work well here. What do you mean the dll is not created, you do not see the file "ReportPro2.English.dll" at all? It should be in the Debug or Release folder of the XIDE project. If you still can't see it, maybe there's some problem with compiling...Can you please zip the whole XIDE project folder (please make sure to include also the .xiproj file) and send it to me to have a look? My address is chris (at)xsharp. eu

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Gfb22
Posts: 105
Joined: Sat Oct 08, 2022 7:43 pm
Location: Italy

INDEX ON, again :-)

Post by Gfb22 »

Here I am again.
I'm porting the second app to X# and everything is ok (almost) :-)
The only remaining error concerns the Index ON command: as already suggested by Chris (Posts: 3658 of November 1st), I inserted at the beginning of the module that uses the INDEX ON command the definition "#command INDEX ON...." but the error is due to the presence of the 'DESCENDING' key which is used for some of my indexes.
Err1.jpg
Err1.jpg (34.6 KiB) Viewed 1469 times
The part of the code that gives the error is:
Cod1.jpg
Cod1.jpg (35.51 KiB) Viewed 1469 times
If I delete the "DESCENDING" argument the app compiles normally and works.
Thanks for the tips.
gfb
User avatar
robert
Posts: 4518
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

INDEX ON, again :-)

Post by robert »

What is the definition of your INDEX ON command ?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Gfb22
Posts: 105
Joined: Sat Oct 08, 2022 7:43 pm
Location: Italy

INDEX ON, again :-)

Post by Gfb22 »

Here's the definition Chris suggested to me in his November 1 post:

Code: Select all

#command INDEX ON <key>     ;
     [TAG <order>]  ;
     [TO <file>]  ;
     [FOR <fo>]     ;
     [<all:ALL>]    ;
     [WHILE <wh>]   ;
     [NEXT <nx>]    ;
     [RECORD <rec>] ;
     [<rs:REST>]    ;
     [EVAL <ev>]    ;
     [EVERY <evr>]  ;
     [<u:UNIQUE>]   ;
     [<asd:ASCENDING>]      ;
     [<dsd:DESCENDING>]     ;
     [<lCur:USECURRENT>]    ;
     [<lAdd:ADDITIVE>]      ;
     [<lCus:CUSTOM>]        ;
     [<lNop:NOOPTIMIZE>]    ;
        ;
    => OrdCondSet( <fo>, <{fo}>,  ;
     [<.all.>],     ;
     <{wh}>,        ;
     <{ev}>, <evr>, ;
     RecNo(), <nx>, <rec>,  ;
     [<.rs.>], [<.dsd.>],   ;
     <.lAdd.>, [<.lCur.>], [<.lCus.>], [<.lNop.>] )      ;
    ;;  ;
       OrdCreate(<(file)>,<(order)>,<(key)>,,IF(<.u.>,.T., NIL))
...and so, without 'DESCENDING', compile and run
gfb
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

INDEX ON, again :-)

Post by Karl-Heinz »

Hi Gian,

in the meantime the INDEX ON <key> TAG <order> command became part of the include file dbcmd.xh. I don´t know if it´s a bug, but to make e.g. the DESCENDING clause work it seems that the "[" and "]" chars must be removed from the OrdCondSet() result pattern ?

Code: Select all

   => OrdCondSet( <"fo">, , [<.all.>], <{wh}>, <{ev}>, <evr>, 			;
          RecNo(), <nx>, <rec>,[<.rs.>],[<.dsd.>],<.lAdd.>,					;
          [<.lCur.>], [<.lCus.>], [<.lNop.>] )      						;;  ;
To override the existing command, add this modified code to the beginning of your source file. Now your code should compile and run.

Code: Select all

#command INDEX ON <key>         										;
     TAG <order>                										;
     [TO <file>]                										;
     [FOR <fo>]                 										;
     [<all:ALL>]                										;
     [WHILE <wh>]               										;
     [NEXT <nx>]                										;
     [RECORD <rec>]             										;
     [<rs:REST>]                										;
     [EVAL <ev>]                										;
     [EVERY <evr>]              										;
     [<u:UNIQUE>]               										;
     [<asd:ASCENDING>]          										;
     [<dsd:DESCENDING>]         										;
     [<lCur:USECURRENT>]        										;
     [<lAdd:ADDITIVE>]          										;
     [<lCus:CUSTOM>]            										;
     [<lNop:NOOPTIMIZE>]        										;
    => OrdCondSet( <"fo">, , <.all.>, <{wh}>, <{ev}>, <evr>, 			;
          RecNo(), <nx>, <rec>,<.rs.>,<.dsd.>,<.lAdd.>,					;
          <.lCur.>, <.lCus.>, <.lNop.> )      						;;  ;
       OrdCreate(<(file)>,<(order)>,<(key)>,,IF(<.u.>,.T., NIL))

regards
Karl-Heinz
User avatar
Gfb22
Posts: 105
Joined: Sat Oct 08, 2022 7:43 pm
Location: Italy

INDEX ON, again :-)

Post by Gfb22 »

Thanks Karl,
now compile and run!
:-)
gfb
User avatar
Gfb22
Posts: 105
Joined: Sat Oct 08, 2022 7:43 pm
Location: Italy

ReportPro2, English and translation

Post by Gfb22 »

Hi,I translated some sentences in NativeResources.rc of "ReportPro2, English" but when in XIDE I try to compile it nothing happens and the DLL is not updated.No problem instead to recompile the program and the other libraries (ReportPro2, ReportPro2.Base, ReportPro2.Export and ReportPro2.RunTime).To understand what doesn't work, I attach the 'response file' and the repository image.Thanks for the tips.
XideRep.jpg
XideRep.jpg (27.4 KiB) Viewed 1469 times
ReportPro2.English_rsp.txt
(870 Bytes) Downloaded 138 times
gfb
User avatar
Chris
Posts: 4899
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

ReportPro2, English and translation

Post by Chris »

Hi GIan,

Do you mean there are no messages at all? Please select Windows->Errors and Windows->Output (after compiling), what contents do you see there? It can't be completely empty..
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Gfb22
Posts: 105
Joined: Sat Oct 08, 2022 7:43 pm
Location: Italy

ReportPro2, English and translation

Post by Gfb22 »

Here is the error and the NativeResource.rc file with my changes...
Err1.jpg
Err1.jpg (57.28 KiB) Viewed 1469 times
thank you
NativeResources_rc.txt
(39.01 KiB) Downloaded 139 times
gfb
Post Reply