1 / 20

Converting reports to Silverswitch and running VFP reports in Silverswitch

Converting reports to Silverswitch and running VFP reports in Silverswitch. Venelina Jordanova Venelina@VandU.eu. Uwe Habermann Uwe@VandU.eu. Silverlight Printing API. Similar to Reportbehavior 90 in VFP Whole page gets printed as an image Resolution 600 dpi Page description in XAML.

oswald
Download Presentation

Converting reports to Silverswitch and running VFP reports in Silverswitch

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Converting reports to Silverswitch and running VFP reports in Silverswitch VenelinaJordanova Venelina@VandU.eu Uwe Habermann Uwe@VandU.eu

  2. Silverlight Printing API • Similar to Reportbehavior 90 in VFP • Whole page gets printed as an image • Resolution 600 dpi • Page description in XAML

  3. Silverlight Printing API • Example • Drag Button from Visual Studio Toolbox • Add event handler to Click event

  4. Silverlight Printing API • Class PrintDocument usingSystem.Windows.Printing; PrintDocumentPrintObject= newPrintDocument(); PrintObject.Print("myprintjob");

  5. Silverlight Printing API PrintObject.PrintPage += new System.EventHandler<PrintPageEventArgs>( PrintObject_PrintPage); void PrintObject_PrintPage(object sender, PrintPageEventArgs e) { e.PageVisual = this.LayoutRoot; }

  6. Silverlight Printing API • Print must be started by a user interaction • Printer selection dialog is shown in any case • So always similar to … TO PRINTER PROMPT • Migration of VFP reports possible

  7. Silverswitchreports • ProductsTemplate.frx • Migrated to: • ProductTemplate.xaml • DataGrid reports

  8. FRX with VFP COM server • Print processing at the server side • FRX execution in VFP COM server • Creation of a PDF file • Using reportlistener • Create PDF with freeware DLL Libhpdf.dll

  9. FRX with VFP COM server • PDF output at the client side • Output in text mode like Reportbehavior 80 or as image like Reportbehavior 90

  10. FRX with VFP COM server • VFP COM server must be EXE file • DLL does not work!

  11. FRX with VFP COM server • Registration at target server • ComPdfCreator.exe /regserver • Un- Registration at target server • ComPdfCreator.exe /unregserver

  12. FRX with VFP COM server • Bericht should work autonomously • Tables in dataenvironment • Private data session

  13. FRX with VFP COM server • Function returns PDF file name

  14. FRX with VFP COM server • Call from ActionButton Name="vfxCreatePDFActionButton" ProcedureName= "cexample.createpdf" ProcedureParameter="customers.frx" OperationName= "CreatePDFFromFRX" OperationResultLoaded= "vfxCreatePDFActionButton_ OperationResultLoaded"

  15. FRX with VFP COM server • Determine 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", ""));

  16. FRX with VFP COM server • Create URL of PDF file string pdfPageURL = applicationUrl+ "UploadedFiles/" + vfxCreatePDFActionButton.OperationResult.result;

  17. FRX with VFP COM server • Open 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"); }

  18. Comparison • Silverlight • 600 DPI • Text cannot be copied • FRX • Output in text mode like Reportbehavior 80 or as image like Reportbehavior 90

  19. Anyquestions?

  20. ThankyouverymuchandhavefunwithSilverswitch Venelina & Uwe

More Related