Crystal Reports:
Changing the
selection formula on a Web report
The Web component server is very easy to invoke from
a Web page. But you can also modify the record selection formula when you
call the report. This allows you to have one report, with links invoking
different selection formulas.
The selection formula is invoked using the sf tag as
follows:
http://servername/folder/this.rpt?sf=xxxxxx
where xxxxx is a valid crystal selection formula.
The catch is that you cannot type a equals sign (=) in directly to the
formula. The equal sign is interpreted as another tag to send to the
report.
S,o how do you enter these record selection
formulas? You have to
replace the equal sign with its URL equivalent. To select region equals
to "CA" enter the URL as:
…./this.rpt?sf={Customer.Region}+%3d+’CA’
This will general a record selection formula of:
{Customer.Region}=’CA’.
Group Selection formulas can be done in a similar way with the ?gf= tag
This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd.
It may be freely copied and distributed as long as the
original copyright is displayed and no modifications are made to this
material. Extracts are permitted. The names Crystal Reports and Seagate
Info are trademarks owned by Business Objects.
|