Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Edit an FRX with SFR
Message
 
À
11/06/2001 11:47:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Stonefield
Divers
Thread ID:
00517439
Message ID:
00518081
Vues:
18
I may fall back to your suggestion if I fail at my current attack. What I have done is copy SfrWizardQuick to SfrWizardFrx. Added a record to SfrWizard.dbf to launch it when Report_Type="S". Now the user will be able to set the filter, sort, etc. options, and create new FRX reports. Assuming I can get it to work. (Coping the class may not be right, but seams to be easier to work with while I figure out what I am doing.)

Things I have changed so far: (this would be easier to figure out if I had sub-classed instead of copying and modifying your classes or added the proper notes in .about…)

SfReportVfp
.CDefaultReportClass = "SFReportFrx"

** Method: sfreportvfp::preparereport()
llFileExists = FILE( this.cReportFileName )
IF llFileExists
lcTempName = ADDBS( SYS(2023) ) + "ccTemp.frx"
SELECT 0
USE ( this.cReportFileName )
COPY to (lcTempName)
USE
this.cTempfrxname = lcTempName
endif
RETURN llFileExists

SfrWizardFrx
** Method: sfrwizardfrx::ModiRepo()
with This.oWizardObject
.oUtility.PleaseWait()
.SetReportEngineProperties(This)
.oReportEngine.SetUpDataEnvironment()
.oUtility.ClearPleaseWait()

SET Resource TO misc\RepoReso
modify report (this.cReportFilename)
SET RESOURCE to


.SetNewWizardProperties()

.cReportFileName = toWizardForm.cReportFileName

.setupsteps()
.aSteps[2, 4] = upper(alltrim(.cNewOrEdit)) = 'NEW' && only allow picking fields for NEW.

Most of the controls on page 5:
Refresh():
This.Visible = upper(alltrim(.cNewOrEdit)) = 'NEW'

Added a text box to page 5:
FRX file name
ControlSource = ThisForm.cReportFileName
Refresh():
This.readonly = upper(alltrim(.cNewOrEdit)) <> 'NEW'

Added a MODI REPO button:
Thisform.ModiRepo()

Things to do:
For new reports, create a 'quick report' frx from the fields that were picked in step 2 and the header, footer, orentation, etc on step 5.

Looks like I need to swap out File menu that VFE built and put in one that uses the stock VFP Save, SaveAs, Close and Preview.

Other than that, it seams to be working. Any comments?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform