close×
Steema Documentation / TeeBI VCL/FMX / Tutorials

BIWeb server

BIWeb Server

BIWeb is a simple project to generate an executable (VCL and Firemonkey) that implements a simple http server using Indy THttp component.

Full sources are included.

The server runs as a taskbar tool icon and allows remote clients to request data, calculate and return summaries, and to return exported data in html (table tag), jpeg, png, json, xml, etc formats.

When using the TStore.Load method from a client application pointing to a remote "store", the store automatically configures the url and initiates the request to a BIWeb.

BIWeb then responds with a binary stream that is a mirror 100% of the stream persisted in the remote disk.

The default ip port for BIWeb is 15015.

Clients can request data using zip compression, by code or configuring it at TStore editor dialog.

BIWeb can also be called and managed from a normal browser (Chrome, Firefox, etc), for example:

http://steema.cat:15015/?data=SQLite_demo|Products&format=.htm

http://steema.cat:15015/?data=SQLite_demo|Products&format=.htm&sort=UnitsInStock:descending

Requesting data from a BIWeb server by code, example:

if TStores.IndexOf('London')=-1 then
   TStores.Add('London','web:www.acme.co.uk:15015');

var Products : TDataItem;
Products:=TStore.Load('London','SQLite_Demo')['Products'];

Remote Queries

Queries (TDataSelect class) and summaries (TDataSumary class) can be executed remotely in a BIWeb server and the query output results returned as a TDataItem object by requesting a URL with the query parameters.

For example:

Sum of Order Quantity by Category Name, executed server-side:

http://steema.cat:15015/?data=SQLite_demo|%22Order%20Details%22&format=.htm&summary=sum(Quantity);Categories.CategoryName