[SOLVED]to hyperlink External URLs that may contain unspecified parameters
Hi, I have a situation where the drilldown URL has to be an external listing site coming from a DB field which may contain &'s as part of the URL.
Could any please suggest a way for me to drilldown to an obsolute URL with &'s like -
-* File car_url_externalhttp.fex
DEFINE FILE CAR
Listing/A500='http://www.mlsfinder.com/kwls/kw/index.cfm?action=listing_detail&property_id=10633656915&searchkey=c4ec985d-c668-fd35-539a-54553abc6c03&npp=10&sr=1';
END
TABLE FILE CAR
PRINT COUNTRY
Listing NOPRINT
ON TABLE SET STYLE *
TYPE=DATA,
COLUMN=N1,
TARGET='_blank',
URL=(Listing),$
ENDSTYLE
END
Thanks very much!This message has been edited. Last edited by: Kal,
The syntax is URL=url(name=value ...),$ where url is everything up to and including the ? that preceeds the parameters, and the parenthsized list gives the parameters.
Note that value may be a numeric constant, a column-name in the report, or a character-string (single-quoted to distinguish it from a column name).
TABLE FILE CAR
PRINT COUNTRY
ON TABLE SET STYLE *
TYPE=DATA,
COLUMN=N1,
TARGET='_blank',
URL=http://www.mlsfinder.com/kwls/kw/index.cfm?( \
action='listing_detail' \
property_id='10633656915' \
searchkey='c4ec985d-c668-fd35-539a-54553abc6c03' \
npp=10 \
sr=1 \
),
$
ENDSTYLE
END
In real life you would code property_id=a column name so each row of the report would link to its respective listing page.
- Jack Gross WF through 8.1.05
April 22, 2009, 12:11 PM
Kal
Thanks very much for your reposnse Jack -
The problem with this is that, for each row we have a different listing url that is saved in a 'Listing' field (It's the Property's External site listing, so could be listed with any website like realters.com etc). we have no way of knowing the parameters that the url will be having.
When I do like URL=(Listing),$ It is picking up the whole URL, but with the Reporting server's baseURL as the prefix (like ['http://Server/ibi_apps/“%20http://www.mlsfinder.com/kwls/kw/index.cfm?action=listing_detail&property_id=10633656915&searchkey=c4ec985d-c668-fd35-539a-54553abc6c03&npp=10&sr=1'])
I've tried with setting FOCEXURL & FOCHTMLURL as '' but no luck, Could any one suggest what am i missing here? Thanks much!
-* File LISTINGS_WEBLINK.fex
SET BASEURL = '' ;
SET FOCEXURL = '' ;
SET FOCHTMLURL = '';
DEFINE FILE LISTING
MLS_IMG/A50='<IMG SRC="/approot/images/house2.jpg" border=0>';
TESTURL/A100 = 'WWW.YAHOO.COM';
END
TABLE FILE LISTING
PRINT
MLS_IMG
URLFIELD
TESTURL
ON TABLE SET STYLE *
TYPE=DATA,
COLUMN=N1,
TARGET='_blank',
JUSTIFY=CENTER,
URL=(URLFIELD),
-* URL='WWW.YAHOO.COM',
$
ENDSTYLE
END
Thanks JG! Your comment prompted me to check for the values of my Database field. I've got it fixed now, by adding an additional Define field to my DB field.
[ When I use my DB field directly in the stylesheet, like URL=(ListingDBfield); somehow it's coming out with a space in front; so WF is using BASEURL to prefix, as 'http://server/ibi_apps/%20http://www.mlsfinder.....'
It works well, when I use a new defined field as URL=(Definedfield), $