1

Konu: FoxyPreviewer 2.18

son hali ile ozetlemeye calisayim...

2 tür kullanimi var

1- basit ve cok kisinin tercih ettigi

Visual Fox Pro
DO FOXYPREVIEWER.APP 

REPORT FORM YourReport PREVIEW

release etmek isterseniz

Visual Fox Pro
DO FOXYPREVIEWER.APP with "Release"

demeniz yeterli

2-gelismis mode burada ek propertyler vererek daha verimli  kullanim elde ediyorsunuz

Visual Fox Pro
LOCAL loReport AS "PreviewHelper" OF "FoxyPreviewer.App" 

loReport = CREATEOBJECT("PreviewHelper")
loReport.AddReport(_Samples + "\Solution\Reports\colors.frx", "FOR Client = 'VFPx' ") && FRX File, Clauses
loReport.RunReport()

şimdi normal mode,gelismis mode ve normal VFP9 reportları ile karsilastirma tablomuza bakalim

http://www.soykansoft.com/images/foxyp.jpg

bu tabloda su an olmayan ama email gonderirken sizin hazirlamis oldugunuz bir cursor yada table dan "TO" butonuna bastiginizda kayitli email adreslerini gosterebileceginiz ozellik te eklenmis durumda ve her iki modda da calisiyor.

daha detayli bilgi property vs aciklamaları http://foxypreviewer.codeplex.com/documentation adresinden incelenebilir...

FoxyPrevieweri asagidaki linkten indirebilirsiniz
http://foxypreviewer.codeplex.com/relea … oad/212789

buradan da GDI+ icinde kullanilan system.app yi indirebilirsiniz
http://vfpx.codeplex.com/releases/view/15083


asagidaki test kodu ile sonucu gorebilirsiniz ... ayarlar-email-email turunden CDO-email i secmeyi ve SMTP ayarlarini yapmayi unutmayin

http://www.foxite.com/uploads/66573c5f-1b82-4dd5-ba95-c5f41191a125.png

Visual Fox Pro
*- Custom report with FoxyPreiwer with native ways ( with all of features )

DoTestCustomReport()
 
*- quick report with FoxyPreiwer ( only can save Img Type Png , send e-mail -> with ext.TIFF )
*-DoTestQuickReport()
 
Function DoMailCursor
    * Creating a table with the adress book
    Select Cast(Lower(Getwordnum(Contact, 1, " "))+"@vfp4.com" As C(30)) As email,* From (_samples + '\data\customer') ;
        WHERE .T. Into Cursor test &&TABLE c:\Test2 READWRITE
Endfunc
 
Function DoTestQuickReport
 
    DoMailCursor()
 
    m.cSQL = "Select cust_id,company,contact,title,city from _samples + '\data\customer'  Where .T. Into Cursor CrsTemp NOFILTER"
    Do Locfile("SYSTEM.APP")
    Do Locfile("FOXYPREVIEWER.APP")
    _Screen.oFoxypreviewer.cAdressTable  = "test"
    _Screen.oFoxypreviewer.cAdressSearch = "Contact"
    _Screen.oFoxypreviewer.lquietmode =.F.
 
    Generate_Temp_Frx(m.cSQL,.T.)
 
    Use In Select("test")
    Use In Select("Customer")
 
Endfunc
 
Function DoTestCustomReport
 
    DoMailCursor()
 
    Set Procedure To Locfile("FoxyPreviewerCaller.prg") Additive
    m.cSQL = "Select cust_id,company,contact,title,city from _samples + '\data\customer'  Where .T. Into Cursor CrsTemp NOFILTER"
    Do Locfile("SYSTEM.APP")
    Do Locfile("FOXYPREVIEWER.APP")
    Generate_Temp_Frx(m.cSQL,.F.)
 
    Local loReport As "FoxyPreviewerCaller" Of "FoxyPreviewerCaller.Prg"
    loReport = Createobject("FoxyPreviewerCaller")
 
    With loReport As ReportHelper
        .AddReport(Addbs(Sys(2023)) + [SampleFoxyP.frx], "NODIALOG") && "RANGE 1,1 NODIALOG"
 
        .cTitle = "FoxyPreviewer Report custom title"
        .lShowSetup = .T.
        .cAdressTable  = "test"
        .cAdressSearch = "Contact"
        .nWindowState = 2
        .RunReport()
 
        Use In Select("test")
        Use In Select("Customer")
 
        Do Case
 
            Case .lPrinted
                Messagebox("Report was printed !",64, "Report status")
 
            Case .lEmailed
                Messagebox("Report was sent to email, with the attached file: " + ;
                    CHR(13) + .cDestFile,;
                    64, "Report status")
 
            Case .lSaved
                Messagebox("Report was saved as file:" + Chr(13) + .cDestFile,;
                    64, ;
                    "Report status")
                =OpenFile(.cDestFile)
 
            Otherwise
                Messagebox("Report Preview was closed without saving or printing",48, "Report status")
 
        Endcase
 
    Endwith
 
Endfunc
 
Function Generate_Temp_Frx
    * Author Soykan OZCELIK - 01.08.2010
    *-- usage
    * m.cSQL = "Select cust_id,company,contact,title,city from _samples + '\data\customer'  Where .T. Into Cursor CrsTemp NOFILTER"
    * Generate_Temp_Frx(m.cSQL,.t.)  && .f. , .t. default
    *---------
    Lparameters tcSQL,tlPreview
    Local cReport
    m.cReport = Addbs(Sys(2023)) + [SampleFoxyP] &&Sys(2015)
    *!* &tcSQL
    Execscript(m.tcSQL)
 
    If Set("Safety")='ON'
        Set Safety Off
    Endif
 
    Create Report (m.cReport) From Dbf("CrsTemp")
 
    If m.tlPreview
        Repo Form (m.cReport) Preview      &&max 8 fields in portrait, max 11 columns in landscape view
    Endif
    *-Use In 0
Endfunc
 
Procedure OpenFile(tcFileName)
    Declare Integer ShellExecute ;
        IN SHELL32.Dll ;
        INTEGER nWinHandle,;
        STRING cOperation,;
        STRING cFileName,;
        STRING cParameters,;
        STRING cDirectory,;
        INTEGER nShowWindow
    Return ShellExecute(0, "open", m.tcFileName, "", "", 1)
Endproc
http://www.soykansoft.com/images/twitter.jpghttp://www.soykansoft.com/images/wp.jpg