How to set a conditional formula on a field using ReportBuilder Automation

Discussion forum about all things Report Builder (all versions).
thomas.uttendorfer
Site Admin
Site Admin
Germany
Posts: 316
Joined: 05 Mar 2017, 17:19
Location: Munich Germany

How to set a conditional formula on a field using ReportBuilder Automation

Post by thomas.uttendorfer » 12 Jun 2017, 11:22

Hi everybody,

was someone of you able to manipulate conditional formulas for a field in a .qrp file with ReportBuilder Automation (typically located in Gupta\ReportBuilder.apl)?
We were successful to create a .qrp from scratch, adding Input items, break groups, fields etc.
But we were not able to place successfully a conditional formula for a field, using Field.SetFormulaText(..) or Field.SetFormulaID(..).
With Field.SetFormulaText(..) we create successfully a formula but we cannot attach it to a field as conditional formula (however it worked to apply a formula to the field Content).

Regards Thomas
Thomas Uttendorfer
[ frevel & fey ] Software-System GmbH
https://thomasuttendorfer.wordpress.com/

thomas.uttendorfer
Site Admin
Site Admin
Germany
Posts: 316
Joined: 05 Mar 2017, 17:19
Location: Munich Germany

Re: How to set a conditional formula on a field using ReportBuilder Automation

Post by thomas.uttendorfer » 24 Jul 2019, 07:32

Hi,
we found it out ourselfs.
It is not possible to set a conditional formula to a field using the ReportBuilder ActiveX (ReportBuilder.apl).
But it is possible when using the QRPTi71.dll-interface (qckrpt.apl).
There you have the function cReportField.SetObjectFormula(..).

The conclusion is: If you want to create or manipulate .qrp-files programmatically look into the ActiveX-API as well as into the DLL-API for appropriate functions.
But: You cannot control every property or attribute programmatically - some can only be set with the ReportBuilder (e.g. conditional font for a field).

Regards Thomas
Thomas Uttendorfer
[ frevel & fey ] Software-System GmbH
https://thomasuttendorfer.wordpress.com/

User avatar
Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 447
Joined: 05 Mar 2017, 20:57
Location: Stroud, England <--> Tauranga, New Zealand

Re: How to set a conditional formula on a field using ReportBuilder Automation

Post by Steve Leighton » 24 Jul 2019, 08:46

Thanks for sharing.
The quirks of Report Builder never cease to amaze. Its capable of some beautiful modern looking reports - you just have to be persistent and persevere a lot.
Greetings from New Zealand
Steve Leighton

Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand

www.banksidesystems.co.uk

Image

Return to “General Discussion Report Builder”

Who is online

Users browsing this forum: [Ccbot] and 1 guest