Converting reports to Silverswitch and running VFP reports in Silverswitch

  • Upload
    oswald

  • View
    29

  • Download
    2

Embed Size (px)

DESCRIPTION

Converting reports to Silverswitch and running VFP reports in Silverswitch. Venelina Jordanova [email protected]. Uwe Habermann [email protected]. Silverlight Printing API. Similar to Reportbehavior 90 in VFP Whole page gets printed as an image Resolution 600 dpi Page description in XAML. - PowerPoint PPT Presentation

Citation preview

  • Uwe Habermann

    [email protected] Jordanova

    [email protected] reports to Silverswitch and running VFP reports in Silverswitch

  • Silverlight Printing APISimilar to Reportbehavior 90 in VFPWhole page gets printed as an imageResolution 600 dpiPage description in XAML

  • Silverlight Printing APIExampleDrag Button from Visual Studio ToolboxAdd event handler to Click event

  • Silverlight Printing APIClass PrintDocumentusing System.Windows.Printing;PrintDocument PrintObject = new PrintDocument();PrintObject.Print("my print job");

  • Silverlight Printing APIPrintObject.PrintPage += new System.EventHandler( PrintObject_PrintPage);

    void PrintObject_PrintPage(object sender, PrintPageEventArgs e){ e.PageVisual = this.LayoutRoot;}

  • Silverlight Printing APIPrint must be started by a user interactionPrinter selection dialog is shown in any caseSo always similar to TO PRINTER PROMPTMigration of VFP reports possible

  • Silverswitch reportsProductsTemplate.frxMigrated to:ProductTemplate.xaml

    DataGrid reports

  • FRX with VFP COM serverPrint processing at the server sideFRX execution in VFP COM serverCreation of a PDF fileUsing reportlistenerCreate PDF with freeware DLL Libhpdf.dll

  • FRX with VFP COM serverPDF output at the client sideOutput in text mode like Reportbehavior 80 or as image like Reportbehavior 90

  • FRX with VFP COM serverVFP COM server must be EXE fileDLL does not work!

  • FRX with VFP COM serverRegistration at target serverComPdfCreator.exe /regserver

    Un- Registration at target serverComPdfCreator.exe /unregserver

  • FRX with VFP COM serverBericht should work autonomouslyTables in dataenvironmentPrivate data session

  • FRX with VFP COM serverFunction returns PDF file name

  • FRX with VFP COM serverCall from ActionButton

    Name="vfxCreatePDFActionButton" ProcedureName="cexample.createpdf"ProcedureParameter="customers.frx"OperationName="CreatePDFFromFRX"OperationResultLoaded="vfxCreatePDFActionButton_ OperationResultLoaded"

  • FRX with VFP COM serverDetermine URL of running application

    private void vfxCreatePDFActionButton_OperationResultLoaded (object sender, EventArgs e){string applicationUrl = string.Format("{0}/", Application.Current.Host.Source.AbsoluteUri.Replace("/ClientBin/VfxLoader.xap", ""));

  • FRX with VFP COM serverCreate URL of PDF file

    string pdfPageURL = applicationUrl + "UploadedFiles/" + vfxCreatePDFActionButton.OperationResult.result;

  • FRX with VFP COM serverOpen PDF in new browser window

    System.Windows.Browser.HtmlPage.Window.Navigate(new Uri(pdfPageURL, UriKind.RelativeOrAbsolute),"_blank", "toolbar=no, location=no,status=no, menubar=no, resizable=yes");}

  • ComparisonSilverlight600 DPIText cannot be copiedFRXOutput in text mode like Reportbehavior 80 or as image like Reportbehavior 90

    SilverlightFRXImageXXTextX

  • Any questions?

  • Thank you very much and have fun with Silverswitch Venelina & Uwe

    *