xsharp.eu • ReportPro2, English and translation: now ok! - Page 2
Page 2 of 7

Nuovo progetto

Posted: Mon Oct 17, 2022 5:14 am
by Gfb22
Grazie!
E' comunque mia intenzione acquistare la versione #X di Report Pro.
Per Robert: del precedente acquisto di RP2 per VO non ho più la documentazione. Grazie comunque per la disponibilità!

Nuovo progetto

Posted: Mon Oct 17, 2022 6:38 am
by robert
Gian,
If you cannot "prove" that you have bought ReportPro before, then you can buy a license. The costs are EUR 99 for the binaries only and EUR 299 for the binaries AND the source code,

Robert

Nuovo progetto

Posted: Thu Oct 27, 2022 5:35 pm
by Gfb22
Ho acquistato RP2 for .NET e guardato un po' di esempi e la documentazione disponibile (non specifica per XSharp).
Non sono riuscio a capire come legare le nuove librerie al progetto CAVO e quali modifiche sono necessarie per utilizzare la nuova versione di RP2 nelle app.
Sicuramente è semplice ma non sono riuscito: chi può fornirmi qualche consiglio sulla strada da percorrere?
Grazie in anticipo!

I purchased RP2 for .NET and looked at some examples and documentation available (not specific to XSharp).
I couldn't figure out how to bind the new libraries to the CAVO project and what changes are needed to use the new version of RP2 in apps.
It is certainly simple but I have not succeeded: who can give me some advice on the way to go?
Thanks in advance!

Nuovo progetto

Posted: Thu Oct 27, 2022 7:13 pm
by ic2
Hello Gian,

In Rp2dev.chm, Class Overview there's a basic sample:

Code: Select all

METHOD PrintReport CLASS StandardShellWindow
LOCAL oReport AS RpReport
LOCAL cJobName,cPrint2Filename,cCaption,cMessage AS STRING
oReport := RpReport{ SELF, "C:RP2BIT.RPT" }
IF oReport:IsValid
       cJobName             := "My Report"
       cPrint2Filename      := "REPORT.PRN"
       cCaption            := "My App Name"
       cMessage            := "Printing in progress..."
oReport:Print(cJobName,cPrint2Filename,cCaption,cMessage)
ENDIF
oReport:Close()
Include rp2rdd32.dll or lib (I think one is the source version) and it should already work.

I have a more complete sample also supporting the creation of PDF's, selection of trays etc. If you want the sample, leave your mail address, I'll make a few small modification and send it to you.

Dick

Nuovo progetto

Posted: Sat Oct 29, 2022 3:59 pm
by Gfb22
Hello Dick,
Thank you for your answer.
The problem is that rp2rdd32.dll is not compatible with xSharp: in CAVO 2.6 it works fine but switching to xSharp doesn't work.
My doubts concern which new DLLs I have to insert (in XIDE/Application/Properties/references/Browse/Browse disk for dll files)) for the RP2 classes to be recognized (Classes like RpReport, ecc.)
I attach the image with the DLLs that I tried to insert in XIDE: the reference to RP2's RpReport is still missing.
Dll-Test.jpg
Dll-Test.jpg (76.57 KiB) Viewed 422 times
Dll-Test.jpg
Dll-Test.jpg (76.57 KiB) Viewed 422 times
However, I leave you my email and I thank you if you want to send me some examples.
Thank you!
Gfb: gf.brambilla@tiscali.it

Nuovo progetto

Posted: Sun Oct 30, 2022 6:45 am
by Chris
Hi Gian,

Indeed the file rp2rdd32.dll is for the Vo version of RP2, not for X#. For X#, you have already used the correct RP2 files in the references. The Xsharp.Rdd.dll and the two XSharp.Macrocompiler dlls you do not need them (they get loaded automatically), so you can remove them, but you need to also add references to XSharp.Core and XSharp.RT.

Also you need to make sure that the "Dialect" (in App properties/General/Dialect) is set to "VO" and the option "App Properties/Compiler/ins USe implicit namespace" is checked, so the compiler automatically resolves the names of the RP2 (and VO SDK) classes.

Easiest way to get a quick start is to actually create a new app, use form the Gallery the "Standard VO MDI" template, which is very similar to that of VO and has all the regular references already added, and then just add the references for RP2 (the X# version of course again).

.

Nuovo progetto

Posted: Sun Oct 30, 2022 7:14 am
by FFF
Chris,
pmfji, but i just had a look into gallery - there is "Standard VO Mdi" and "Standard VO Mdi -X#-runtime". At a quick glance the former uses dialect VN instead of Vo and quite some .vh includes, but both reference the X# runtime dlls.
Might cause some confusion ;-)

Nuovo progetto

Posted: Sun Oct 30, 2022 7:24 am
by Chris
Hi Karl,

Ah, right, one of the two has remained by accident. Will remove it, thanks!

Nuovo progetto

Posted: Sun Oct 30, 2022 7:33 am
by Gfb22
Thanks Chris.Here are the correct RP2 references. Later I try.
-------------------------------
I also have another error which, perhaps, is related to a missing DLL: "... error XS0246: The type or namespace name 'Sub_ProgDial' could not be found (are you missing a using directive or an assembly reference?)"Below is the code that gives the error.
METHOD Timer() CLASS StandardShellWindow

LOCAL oProg as Sub_ProgDial
IF cTimerCopia == "C"
IF nResult > 32
self:Pointer := Pointer{POINTERARROW}
InfoMsg("Copia terminata con successo.", self )
Y_LAST_BAC := Today()
LastSalva()
ELSE
ErrorMsg("Copia non effettuata", "Errore " + Str(nResult) ) // , "Ripristino archivi", SELF )
ENDIF
ELSEIF cTimerCopia == "R"
IF nResult > 32
self:Pointer := Pointer{POINTERARROW}
InfoMsg("Ripristino effettuato.", self) // Nota: serve anche rendere MODAL la prosecuzione del programma
// RESTORE da DBF FILE
IF File(S_DirIni + "LASTAM.DBF")
Y_MODARCH := CToD("") // Siamo sicuri che prende il valore da LAST.DBF
LastRestore()
ELSE // Né Last.MEM né Last.DBF
ErrorMsg("Errore", "Non trovo il file LASTAM.DBF")
self:FileExit() // termina il programma
ENDIF
AggVar() // Imposta variabili di sistema
self:Caption := ("AMMORTAMENTI visual per " + NomeUtente + " Esercizio " + mEsercizio)
FCopy("C:gfbminereportAmmAmmInd.DBF", S_DirIni + "AmmInd.DBF")
// Controlla se gli archivi hanno la struttura aggiornata
// Le due date non corrispondono: avverti, aggiorna gli archivi e salva LAST.DBF
IF Y_MODARCH # G_MODARCH
AggiornaStruct(self) // Provvede anche ad inviare Msg iniziale all'utente
ENDIF
oProg := Sub_ProgDial{self}
oProg:Show() // Ricrea indici: al termine di Sub_ProgDial c'è già il Beep
ELSE
ErrorMsg("Errore","Ripristino archivi non effettuato: errore " + Str(nResult) )
ENDIF
self:Pointer := Pointer{POINTERARROW}
ENDIF

RETURN nil

DLL-30Oct.jpg
DLL-30Oct.jpg (66.37 KiB) Viewed 422 times

Nuovo progetto

Posted: Sun Oct 30, 2022 8:19 am
by FFF
Gian,
i really doubt, "Sub_ProgDial" to be part of dotNet, Vo X# or RP2 ;-), so mark it, CTRL-Shift-F, "find all" - will list all occurences in this xide-project. If there's none, i'd suspect you wrote this in some other project...