Presentation is loading. Please wait.

Presentation is loading. Please wait.

Uwe Habermann Venelina Jordanova Converting reports to Silverswitch and running VFP reports in Silverswitch.

Similar presentations


Presentation on theme: "Uwe Habermann Venelina Jordanova Converting reports to Silverswitch and running VFP reports in Silverswitch."— Presentation transcript:

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

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 using System.Windows.Printing; PrintDocument PrintObject = new PrintDocument(); PrintObject.Print("my print job");

5 Silverlight Printing API PrintObject.PrintPage += new System.EventHandler ( 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 Silverswitch reports * 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 SilverlightFRX ImageXX TextX * Silverlight * 600 DPI * Text cannot be copied * FRX * Output in text mode like Reportbehavior 80 or as image like Reportbehavior 90

19 Any questions?

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


Download ppt "Uwe Habermann Venelina Jordanova Converting reports to Silverswitch and running VFP reports in Silverswitch."

Similar presentations


Ads by Google