Simple query builder

This forum is for eXpress++ general support.
Post Reply
Message
Author
skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Simple query builder

#1 Post by skiman »

Hi,

I need a very simple query builder for reports. I want a builder as for the following sample.

Report with 3 columns.
Column one: country
Column two: sales
Column three: year

I want it to be possbile for a user to have a query as 'sales > 1000 .and. year = 2015'.

When I evaluate the query, I can use strtran(cQuery,'sales','sales->amount').

My problem is that I haven't any control for building the query. I checked the dc_querybuild(), but this needs an open database. My user doesn't know in what field the data is in. He only sees the header of my browse which isn't the same as my fieldname.

I'm looking for something as cQuery := MakeSimpleQuery( aStructure). According to Type of an element (Character, Numeric, Data, Logical) the result of the query should be as in dc_querybuild.

I was hoping that dc_querybuild( "","","", aStructure) would work, but it tries to start a dcbrowse.

Is there maybe a dc_xxx function which is not documented for this purpose?
Best regards,

Chris.
www.aboservice.be

Post Reply