Category Archives: FireDAC

Creating PDF Reports in RAD Server

Creating PDF Reports in RAD Server

Reporting is a critical aspect of any enterprise application, but the data and the programming components to create reports are not always available on all platforms?

It took a little trial and error to work out the best path to create reports via RADServer using the components out the box.  In this post, I will share what I have learned along the way.

Reporting Components

The obvious answer to generating a report that can show on mobile is to create a report PDF report remotely download the PDF to the client over REST. But which version and platforms can be used?

Fast Reports (Embarcadero Edition), which is included in RAD Studio, provides everything we need to create a report and save it out to PDF for export.

Fast Reports – VCL or FMX?

Continue reading Creating PDF Reports in RAD Server

Creating and connecting to MSSQL Database on Azure with Delphi / C++Builder

Creating and connecting to MSSQL Database on Azure with Delphi / C++Builder

I have been asked multiple times recently about connecting to a  Azure databases with Delphi and C++Builder. So….I decided to make a video! Which even shows how to use the data directly at design time in the RAD Studio IDE.

The video follows the the 3 phases.

  • Creating an account
  • Creating a database
  • Connecting to the database from the RAD Studio IDE

Continue reading Creating and connecting to MSSQL Database on Azure with Delphi / C++Builder

Attributes for Documenting TEMSDataSetResource

Attributes for Documenting TEMSDataSetResource

I recently blogged about a number of RAD Server topics, including using TEMSDataSetResource, (the component that enables a TDataSet to be expose as a RESTful resource, and manage all the List, Get, Put, Post, Delete methods – very cool!), how to set named parameters for the TEMSDataSetResource documentation (where multiple keys are passed in e.g. with Master Detail relationships (reviewed below)), and how the YAML and JSON documentation is auto generated with custom RESTful resources / end points

Typically, each custom REST endpoint method (List, Get, Put, Post, Delete), would be supported by separate procedures in the code, with each having their attributes to support documentation, resource name etc. Continue reading Attributes for Documenting TEMSDataSetResource

Developing client applications using RESTful master-detail data with TRESTResponseDataSetAdapter

This is part 3 in my series of developing an REST server and client application and will focus around using the TRESTResponseDataSetAdapter.

In my last two posts, we have created a REST server with a fully documented API using YAML , and exposed 3 datasets with master detail relationships over REST using zero lines of code.  If you have not read and watch the videos. I would suggest starting there. – It’s now time to consume the API into a cross platform Delphi Client.

Steps to making the client

The video and supporting blog post take you through the following.

  1. Setting up components to connect to the REST API. (RAD Style)
  2. Converting the JSON into a master detail datasets (based on the current item in the JSON data)
  3. Enabling the data in the UI with LiveBindings and zero code.
  4. Tricks for reducing API calls.

Continue reading Developing client applications using RESTful master-detail data with TRESTResponseDataSetAdapter

Master Detail data in RAD Server using TEMSDataSetResource

Master Detail data in RAD Server

The TEMSDataSetResource is a very powerful component that enables rapid development of full document REST API’s for TDataSet using RAD Server. Using TEMSDataSetResource, along with traditional master detail relationship configurations, it is possible to expose, and automatically document data APIs via REST with no code at all.

In this article, I will cover sharing master detail data with no code, but also how to roll your own REST endpoint to cover more advanced detail with detail embedded calls.

In my previous article, I updated advise on getting started with Swagger UI, using the new WebFiles feature of RAD Server (from 10.3.2) as a way to view your documentation as you build your backend services API. This article will build upon the sample application created in that post.

Continue reading Master Detail data in RAD Server using TEMSDataSetResource

Embedding Swagger UI into RAD Server

This post is an update to the original post written previously showing Swagger UI being used with RAD Server, covering new features of RAD Server.

Why Embed Swagger UI into RAD Server?

Swagger UI (as previously discussed) is a great option for checking your documentation and working with the REST API. One of the challenges has always been CORS (Cross Origin Resource Sharing) that makes execution of the code a challenge when developing.

There are a few options now however. You can either work around this with browser plug-ins, (as seen before), enable CORS in the emsserver.ini under [Server.APICrossDomain], or embed swagger-ui inside your RAD Server instance.

In this video, I cover the latter option. You can watch how to get documentation up and running. The video shows how to configure your EMSServer.ini to share the external resource through RAD Server and also modify the downloaded files to automatically load up the API documentation directly from RAD Server.

WebFiles in RAD Server EMSServer.ini

The key to making this work is the WebFiles option that was added to RAD Studio in 10.3.2. This was primarily added to make it easier to serve out web content and support ExtJS for doing web client development under the Architect edition of RAD Studio, however, this also has the benefit of making other content available to share.

Continue reading Embedding Swagger UI into RAD Server

Database updates in RAD Studio XE8

Database updates in RAD Studio XE8

With RAD Studio XE8 there have been a number of database updates to expand connectivity, and improve and introduce functionality for us programmers.

FireDAC & IBX support for Change Views

FireDAC has introduced new support for Change Views – enabling rapid identification of what has changed on the server side data and updating of client side stored data. See this <2min video for how these work.

Source code for the example ships in the samples directory:

<Samples><language>Database\FireDAC\Samples\DBMS Specific\InterBase\ChangeView

IBX has also introduced new components to make it easier to work with change views and subscriptions.

 New Platform – Teradata

FireDAC now includes support for Teradata, using the driver name TData.

TeraData in FireDAC

 

An example of how to set the driver properties is shown on the docwiki help for connecting to Teradata with Delphi.

DriverID=TData
Server=192.168.43.140
Database=MyDatabase
User_Name=dbc
Password=dbc

TDataSet TField speed up.

Marco Cantu mentioned on the Launch webinar Q&A a customer was claiming seen a speed up of around 25% on a TClientDataSet application due to the refactoring at the base of how TField is used at the core layer. 🙂 This is really cool for both VCL and also FMX developers.

64bit support for iOS

With the new platform for iOS 64bit, the database layer is also seamlessly available, just recompile and run 🙂

Other updates

There are updates for EMS including push notification. EMS is a great way to access central data from mobile devices. EMS now is updated to include InterBase XE7 for both the server and ToGo side, allowing you to use Change Views on both Server and Clients.

Where FireDAC uses SQLite, it has been updated to a newer driver.

For more of whats new in RAD Studio XE8, including EMS updates, please click here Whats new in Delphi XE8 and C++ Builder XE8

 

Free FireDAC training online

FireDAC Training

Free FireDAC training online!

FireDAC is the Universal Data Access library for developing applications for multiple devices, connected to enterprise databases.

Starting tomorrow you can join the embarcadero team for free FireDAC training online in these special sessions, where you will be taken from a beginner to an expert by showing you how to utilise FireDAC in multiple situations.

Having used multiple database technologies over the years of developing with Delphi, I have been exceptionally impressed by the raw power of FireDAC and how fast and easy it makes the most difficult jobs as a database developer.

The sessions run every Thursday from Jan 22-Mar 26 in 3 time zones so no excuse for missing out!

Register now for free

Date Topic
January 22 Introduction to FireDAC
January 29 Monitoring and Tracing
February 5 Cached Updates and Auto-inc Fields
February 12 Array DML
February 19 Cascading Options System
February 26 Preprocessing
March 5 ETL
March 12 In-Memory Dataset
March 19 Local SQL
March 26 BDE to InterBase Migration


Register now for free

Free XE7 Trial

If your not a XE7 customer you can get the most out of these session by downloading a Delphi XE7 free trial here.