SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
Graphical RPG Framework for IBM i 
SilverDev Tutorial 
Export to Excel, PDF and HTML
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 2 / 16 
Steps: 
1. Menu Creation ...................................................................................................................................... 4 
2. Add OnClick Events ............................................................................................................................... 6 
3. Export to Excel ...................................................................................................................................... 7 
4. Export to PDF ........................................................................................................................................ 8 
5. Export to HTML ..................................................................................................................................... 9 
6. Save and compile the screen .............................................................................................................. 10 
7. RPG source compilation ...................................................................................................................... 11 
8. Result .................................................................................................................................................. 12 
9. More: Export options .......................................................................................................................... 13 
10. More: Select columns to export.......................................................................................................... 14 
11. More: Add icons .................................................................................................................................. 15
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 3 / 16 
This tutorial assumes you have already followed SilverDev Tutorial « Grid and Pop-up Menu ». 
The application displays a books list, their IDs and respective prices. 
We’ll add it a menu for the user to choose the format he wants to export the grid data. 
Open the application in SilverDev Designer:
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 4 / 16 
1. Menu Creation 
In the Components tab, select CMainMenu 
Place it on the screen, double click it 
to open the Menu Designer. 
Right click to add a new item 
Right click to create a sub menu. Add 3 items.
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 5 / 16 
Rename the components: 
For each component, select it and, in the Inspector tab, change Caption and Name properties. 
Display, in Caption: « Export », « Excel », « PDF » et « HTML ». 
Name it, respectively, in: « ItemExport », « ItemExcel », « ItemPDF » et « ItemHTML ».
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 6 / 16 
2. Add OnClick Events 
We add an OnClick Event on each sub menu element: 
Select the menu element to click and go on the Inspector’s Event tab 
Select and double click OnClick 
The cursor is now in the source in the itemExcel_Onclick event. 
Do the same for ItemPDF and ItemHTML elements. 
Tip: Press F10 to display the screen
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 7 / 16 
3. Export to Excel 
Enter the following code under ItemExcel_Onclick event description. 
Use sdSet funtion to define the export type: 
sdSet(F1:'SFL1':'ExportOptions.TypeExport':'exXLSX'); 
Then export the content of SFL1 grid component: 
sdExport(F1:'SFL1');
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 8 / 16 
4. Export to PDF 
Enter the following code under ItemPDF_Onclick event description. 
Use sdSavePdf funtion to export the content of SFL1 component: 
sdSavePdf(F1:'SFL1');
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 9 / 16 
5. Export to HTML 
Enter the following code under ItemHTML_Onclick event description. 
Use sdSet funtion to define the export type: 
sdSet(F1:'SFL1':'ExportOptions.TypeExport':'exHtml'); 
Then export the content of SFL1 grid component: 
sdExport(F1:'SFL1');
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 10 / 16 
6. Save and compile the screen 
Save and compile the screen on the Form Menu: 
We have already saved this screen on the previous tutorial: don’t forget to tick “Overwrite the existing object”
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 11 / 16 
7. RPG source compilation 
Save your modifications with this button 
or via the Member/Save member Menu 
Compile the program using the 
“Compiling/Generate program” menu.
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 12 / 16 
8. Result 
Your application has been updated on MyDesk. 
Double-Click to launch it.
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 13 / 16 
9. More: Export options 
Select CSFL grid element and, in the properties tab / ExportOptions, turn ShowDialog property to True 
When the user exports the grid, this dialog box will be displayed:
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 14 / 16 
10. More: Select columns to export 
Double click CSFL component 
to open this dialog box: 
We don’t want to export IDs. 
Select it and, in the Inspector tab, turn its Exportable property to False 
Save and compile. 
The user can no longer select the ID column to export it.
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 15 / 16 
11. More: Add icons 
In the Menu Designer, select the menu element where you want to add an icon 
In the Inspector tab, use its Bitmap property. 
Click « … » to load an icon from your PC. 
The icon must be in .bmp format 
Recommended picture size: 16x16 pixels. 
Save and compile
SilverDev Tutorial – Export to Excel, PDF and HTML 
Experia -- Reproduction Rights Reserved -- 16 / 16 
More info on www.silverdev.com 
EXPERIA Europe 
4, rue L.Beridot 
Les jardins d'Epione 
38500 VOIRON - FRANCE 
www.experia.com 
info@experia.com

Contenu connexe

Plus de SilverDev by Experia

[Tutorial] SilverDev for IBM i: Quick Start
[Tutorial] SilverDev for IBM i: Quick Start[Tutorial] SilverDev for IBM i: Quick Start
[Tutorial] SilverDev for IBM i: Quick StartSilverDev by Experia
 
Comment simplifier et améliorer l'interfaçage IBM i / PC?
Comment simplifier et améliorer l'interfaçage IBM i / PC?Comment simplifier et améliorer l'interfaçage IBM i / PC?
Comment simplifier et améliorer l'interfaçage IBM i / PC?SilverDev by Experia
 
How to simplify IBM i / PC exchanges with SilverDev?
How to simplify IBM i / PC exchanges with SilverDev?How to simplify IBM i / PC exchanges with SilverDev?
How to simplify IBM i / PC exchanges with SilverDev?SilverDev by Experia
 
IBM i: How modernized applications facilitate interactions with PCs?
IBM i: How modernized applications facilitate interactions with PCs? IBM i: How modernized applications facilitate interactions with PCs?
IBM i: How modernized applications facilitate interactions with PCs? SilverDev by Experia
 
Témoignage Igloo Post-Mix (Orangina-Schweppes / Pepsi Cola)
Témoignage Igloo Post-Mix (Orangina-Schweppes / Pepsi Cola)Témoignage Igloo Post-Mix (Orangina-Schweppes / Pepsi Cola)
Témoignage Igloo Post-Mix (Orangina-Schweppes / Pepsi Cola)SilverDev by Experia
 
SilverDev / ARCAD Skipper Interface - for Structured Graphic Developments in ...
SilverDev / ARCAD Skipper Interface - for Structured Graphic Developments in ...SilverDev / ARCAD Skipper Interface - for Structured Graphic Developments in ...
SilverDev / ARCAD Skipper Interface - for Structured Graphic Developments in ...SilverDev by Experia
 
Temoignage SilverDev - Moderniser l’existant en RPG avec SilverDev
Temoignage SilverDev - Moderniser l’existant en RPG avec SilverDevTemoignage SilverDev - Moderniser l’existant en RPG avec SilverDev
Temoignage SilverDev - Moderniser l’existant en RPG avec SilverDevSilverDev by Experia
 
[Tutorial] SilverDev Designer - RPG Development Studio
[Tutorial] SilverDev Designer - RPG Development Studio[Tutorial] SilverDev Designer - RPG Development Studio
[Tutorial] SilverDev Designer - RPG Development StudioSilverDev by Experia
 
[Tutoriel] Studio de développement RPG SilverDev Designer
[Tutoriel] Studio de développement RPG SilverDev Designer[Tutoriel] Studio de développement RPG SilverDev Designer
[Tutoriel] Studio de développement RPG SilverDev DesignerSilverDev by Experia
 
[Tutorial] SilverDev Wizard - english
[Tutorial]  SilverDev Wizard - english[Tutorial]  SilverDev Wizard - english
[Tutorial] SilverDev Wizard - englishSilverDev by Experia
 
[Tutoriel] SilverDev Wizard - français
[Tutoriel]  SilverDev Wizard - français[Tutoriel]  SilverDev Wizard - français
[Tutoriel] SilverDev Wizard - françaisSilverDev by Experia
 
Experia annonce la nouvelle version de SilverDev pour AS400 / IBM i
Experia annonce la nouvelle version de SilverDev pour AS400 / IBM iExperia annonce la nouvelle version de SilverDev pour AS400 / IBM i
Experia annonce la nouvelle version de SilverDev pour AS400 / IBM iSilverDev by Experia
 
RPG : Développez des applications graphiques avec Silverdev
RPG : Développez des applications graphiques avec SilverdevRPG : Développez des applications graphiques avec Silverdev
RPG : Développez des applications graphiques avec SilverdevSilverDev by Experia
 
SilverDev: Modernize Your IBM i User Experience
SilverDev: Modernize Your IBM i User ExperienceSilverDev: Modernize Your IBM i User Experience
SilverDev: Modernize Your IBM i User ExperienceSilverDev by Experia
 

Plus de SilverDev by Experia (14)

[Tutorial] SilverDev for IBM i: Quick Start
[Tutorial] SilverDev for IBM i: Quick Start[Tutorial] SilverDev for IBM i: Quick Start
[Tutorial] SilverDev for IBM i: Quick Start
 
Comment simplifier et améliorer l'interfaçage IBM i / PC?
Comment simplifier et améliorer l'interfaçage IBM i / PC?Comment simplifier et améliorer l'interfaçage IBM i / PC?
Comment simplifier et améliorer l'interfaçage IBM i / PC?
 
How to simplify IBM i / PC exchanges with SilverDev?
How to simplify IBM i / PC exchanges with SilverDev?How to simplify IBM i / PC exchanges with SilverDev?
How to simplify IBM i / PC exchanges with SilverDev?
 
IBM i: How modernized applications facilitate interactions with PCs?
IBM i: How modernized applications facilitate interactions with PCs? IBM i: How modernized applications facilitate interactions with PCs?
IBM i: How modernized applications facilitate interactions with PCs?
 
Témoignage Igloo Post-Mix (Orangina-Schweppes / Pepsi Cola)
Témoignage Igloo Post-Mix (Orangina-Schweppes / Pepsi Cola)Témoignage Igloo Post-Mix (Orangina-Schweppes / Pepsi Cola)
Témoignage Igloo Post-Mix (Orangina-Schweppes / Pepsi Cola)
 
SilverDev / ARCAD Skipper Interface - for Structured Graphic Developments in ...
SilverDev / ARCAD Skipper Interface - for Structured Graphic Developments in ...SilverDev / ARCAD Skipper Interface - for Structured Graphic Developments in ...
SilverDev / ARCAD Skipper Interface - for Structured Graphic Developments in ...
 
Temoignage SilverDev - Moderniser l’existant en RPG avec SilverDev
Temoignage SilverDev - Moderniser l’existant en RPG avec SilverDevTemoignage SilverDev - Moderniser l’existant en RPG avec SilverDev
Temoignage SilverDev - Moderniser l’existant en RPG avec SilverDev
 
[Tutorial] SilverDev Designer - RPG Development Studio
[Tutorial] SilverDev Designer - RPG Development Studio[Tutorial] SilverDev Designer - RPG Development Studio
[Tutorial] SilverDev Designer - RPG Development Studio
 
[Tutoriel] Studio de développement RPG SilverDev Designer
[Tutoriel] Studio de développement RPG SilverDev Designer[Tutoriel] Studio de développement RPG SilverDev Designer
[Tutoriel] Studio de développement RPG SilverDev Designer
 
[Tutorial] SilverDev Wizard - english
[Tutorial]  SilverDev Wizard - english[Tutorial]  SilverDev Wizard - english
[Tutorial] SilverDev Wizard - english
 
[Tutoriel] SilverDev Wizard - français
[Tutoriel]  SilverDev Wizard - français[Tutoriel]  SilverDev Wizard - français
[Tutoriel] SilverDev Wizard - français
 
Experia annonce la nouvelle version de SilverDev pour AS400 / IBM i
Experia annonce la nouvelle version de SilverDev pour AS400 / IBM iExperia annonce la nouvelle version de SilverDev pour AS400 / IBM i
Experia annonce la nouvelle version de SilverDev pour AS400 / IBM i
 
RPG : Développez des applications graphiques avec Silverdev
RPG : Développez des applications graphiques avec SilverdevRPG : Développez des applications graphiques avec Silverdev
RPG : Développez des applications graphiques avec Silverdev
 
SilverDev: Modernize Your IBM i User Experience
SilverDev: Modernize Your IBM i User ExperienceSilverDev: Modernize Your IBM i User Experience
SilverDev: Modernize Your IBM i User Experience
 

Dernier

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 

Dernier (20)

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 

[Tutorial] IBM i Apps: Export to Excel, PDF & HTML with SilverDev

  • 1. Graphical RPG Framework for IBM i SilverDev Tutorial Export to Excel, PDF and HTML
  • 2. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 2 / 16 Steps: 1. Menu Creation ...................................................................................................................................... 4 2. Add OnClick Events ............................................................................................................................... 6 3. Export to Excel ...................................................................................................................................... 7 4. Export to PDF ........................................................................................................................................ 8 5. Export to HTML ..................................................................................................................................... 9 6. Save and compile the screen .............................................................................................................. 10 7. RPG source compilation ...................................................................................................................... 11 8. Result .................................................................................................................................................. 12 9. More: Export options .......................................................................................................................... 13 10. More: Select columns to export.......................................................................................................... 14 11. More: Add icons .................................................................................................................................. 15
  • 3. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 3 / 16 This tutorial assumes you have already followed SilverDev Tutorial « Grid and Pop-up Menu ». The application displays a books list, their IDs and respective prices. We’ll add it a menu for the user to choose the format he wants to export the grid data. Open the application in SilverDev Designer:
  • 4. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 4 / 16 1. Menu Creation In the Components tab, select CMainMenu Place it on the screen, double click it to open the Menu Designer. Right click to add a new item Right click to create a sub menu. Add 3 items.
  • 5. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 5 / 16 Rename the components: For each component, select it and, in the Inspector tab, change Caption and Name properties. Display, in Caption: « Export », « Excel », « PDF » et « HTML ». Name it, respectively, in: « ItemExport », « ItemExcel », « ItemPDF » et « ItemHTML ».
  • 6. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 6 / 16 2. Add OnClick Events We add an OnClick Event on each sub menu element: Select the menu element to click and go on the Inspector’s Event tab Select and double click OnClick The cursor is now in the source in the itemExcel_Onclick event. Do the same for ItemPDF and ItemHTML elements. Tip: Press F10 to display the screen
  • 7. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 7 / 16 3. Export to Excel Enter the following code under ItemExcel_Onclick event description. Use sdSet funtion to define the export type: sdSet(F1:'SFL1':'ExportOptions.TypeExport':'exXLSX'); Then export the content of SFL1 grid component: sdExport(F1:'SFL1');
  • 8. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 8 / 16 4. Export to PDF Enter the following code under ItemPDF_Onclick event description. Use sdSavePdf funtion to export the content of SFL1 component: sdSavePdf(F1:'SFL1');
  • 9. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 9 / 16 5. Export to HTML Enter the following code under ItemHTML_Onclick event description. Use sdSet funtion to define the export type: sdSet(F1:'SFL1':'ExportOptions.TypeExport':'exHtml'); Then export the content of SFL1 grid component: sdExport(F1:'SFL1');
  • 10. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 10 / 16 6. Save and compile the screen Save and compile the screen on the Form Menu: We have already saved this screen on the previous tutorial: don’t forget to tick “Overwrite the existing object”
  • 11. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 11 / 16 7. RPG source compilation Save your modifications with this button or via the Member/Save member Menu Compile the program using the “Compiling/Generate program” menu.
  • 12. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 12 / 16 8. Result Your application has been updated on MyDesk. Double-Click to launch it.
  • 13. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 13 / 16 9. More: Export options Select CSFL grid element and, in the properties tab / ExportOptions, turn ShowDialog property to True When the user exports the grid, this dialog box will be displayed:
  • 14. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 14 / 16 10. More: Select columns to export Double click CSFL component to open this dialog box: We don’t want to export IDs. Select it and, in the Inspector tab, turn its Exportable property to False Save and compile. The user can no longer select the ID column to export it.
  • 15. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 15 / 16 11. More: Add icons In the Menu Designer, select the menu element where you want to add an icon In the Inspector tab, use its Bitmap property. Click « … » to load an icon from your PC. The icon must be in .bmp format Recommended picture size: 16x16 pixels. Save and compile
  • 16. SilverDev Tutorial – Export to Excel, PDF and HTML Experia -- Reproduction Rights Reserved -- 16 / 16 More info on www.silverdev.com EXPERIA Europe 4, rue L.Beridot Les jardins d'Epione 38500 VOIRON - FRANCE www.experia.com info@experia.com