A A A
C  C  Off 

Custom exports with Iron Speed Designer


Introduction

Iron Speed Designer has export functions built in. These allow you to export out of the box in a variety of formats including PDF, Microsoft Excel, Microsoft Word and CSV. The system is built around exporting data from a specific database table which contains the data you need. This system is great when all your data is in a single table but this can be quite limiting. To customise your exports you can make use of database views or Iron Speed Designer’s own custom queries to pull all your required data in to one place so you can export it and then add additional custom code to modify it further.

Solution

To demonstrate some of your options in regards to customising Iron Speed Designer exports I have created a simple app in Iron Speed Designer v8. The guide will focus on using custom queries to pull together the data you need as using views requires database access and knowledge that some Iron Speed Designer users might not have.

  1. Start off as normal by opening your application or creating a new application.
  2. To create custom queries you need to open the databases tab.
Create Custom Query
  1. Right click on custom queries and click new.
New Query
  1. Enter a name for your new query. I tend to use the names of the tables it is pulling data from.
  2. Select the tables/views you want to get your data from.
Choose Tables
  1. Press next and then select the fields you want to include in the query.
Choose Fields
  1. On the next screen you can create the where clause. This defines how the tables are linked. Iron Speed Designer should add links based on the foreign key links (Real or Virtual). You can add additional filters if you need.
Create Where Clause
  1. Now the custom query is created you can generate pages on it using the Application Wizard like any other table.
  2. Assuming you have export buttons turned on in your settings your new page will have export buttons which will allow you to export data from your custom query.
Sample Page
  1. Once you have created your custom query and your export page in the application you can then go one step further and customise the export code. This can be done by simply overriding the Export button click event. This method contains all the code that goes into exporting a file. A simple change here would be to remove a column from the export. This can be achieved by commenting out one line of code as highlighted below.
Code Screen

Conclusion

Using Iron Speed Designer you can export data from a collection of tables without writing any code by using custom queries. Iron Speed Designer’s custom code model then allows you to build on this framework if you need more advanced customisation of your exports.

About the Author

Ben Demes holds a bachelor’s degree in computer science from the University of Essex and is a professional member of the British Computer Society (MBCS). Ben has been instrumental in completing a number of web applications for the National Health Service (NHS) in the UK. Working against tight deadlines, he just loves working with Iron Speed Designer. Ben’s skill set extends to programming in C#, VisualBasic.NET and JavaScript and working on data migration scripts for Microsoft SQL Server.

Download Article

View comments on the Iron Speed Forums or download the article in Microsoft Word or PDF format.

  • Facebook
  • Twitter
  • Digg It!
Leave a comment
Close

Enter your details and click subscribe to sign up to our newsletter

 *
   
 
 

* Required Field

Subscribe