Alpha Video Training
Results 1 to 3 of 3

Thread: One to Many Set and html table

  1. #1
    Member
    Real Name
    Terry Morgan
    Join Date
    Nov 2014
    Location
    Essex, England
    Posts
    242

    Default One to Many Set and html table

    An extract of the code used on an a5w page is set out below. This has been used for many years producing the desired affect, however recently a One to Many link has been added to the set which creates duplicate entries in line with the number of one to many links. What do I need to add so the result table ignores the one to many links.
    Thanks
    Terry

    s=set.open_session("\\OFFICE\BD.SET")
    tbl = set.BD
    tbli = set.BD_NO

    query.filter="postcode = " + """ + postc + "".and.schno = 1"
    query.order=""
    'query.options="U"
    ix=tbl.query_create()
    ? "<strong>Building Policies</strong>"
    tbl.fetch_first()
    ? "<table cellSpacing=2 cellPadding=5 width=/""99%/"" border=5>"
    ? "<tr><td>Policy No.</td><td>Trading Name</td><td>Name</td><td>Premises</td><td>Postcode</td><td>Inception Date</td><td>Cancellation Date</td><td>Cancellation Reason</td><td>Policy</td><td>Status</td></tr>"
    while .NOT. tbl.fetch_EOF()
    ? "<tr><td>"+tbl.prepol+tbl.Policyno+"</td><td>"+tbl.Tradeas+"</td><td>"+tbl.Insdname+"</td><td>"+tbl.Premises1+" "+tbl.Premises2+"</td><td>"+tbl.Postcode1+" "+tbl.Postcode2+"</td><td>"+tbli.originalinception+"</td><td>"+tbli.cancellationdate+"</td><td>"+tbli.cancellationreason+"</td><td>"+nw_lower(tbl.schemename)+"</td><td>"+ tbli.polstatus +"</td></tr>"
    tbl.fetch_next()
    end while
    ? "</table>"
    s.close()

  2. #2
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,563

    Default Re: One to Many Set and html table

    Make another set without the One to Many link.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  3. #3
    Member
    Real Name
    Terry Morgan
    Join Date
    Nov 2014
    Location
    Essex, England
    Posts
    242

    Default Re: One to Many Set and html table

    Too obvious - thanks
    Al

Similar Threads

  1. HTML Table Formatting Help
    By iRadiate in forum Mobile & Browser Applications
    Replies: 19
    Last Post: 01-29-2016, 12:55 PM
  2. Replies: 13
    Last Post: 07-10-2014, 09:00 PM
  3. Table Field in HTML Email
    By markbwillard in forum Alpha Five Version 11 - Desktop Applications
    Replies: 3
    Last Post: 09-30-2013, 01:24 PM
  4. Grid <TABLE> HTML Template
    By jmsilva in forum Application Server Version 11 - Web/Browser Applications
    Replies: 4
    Last Post: 09-20-2012, 01:26 PM
  5. Table error html
    By JH10 in forum Application Server Version 9 - Web/Browser Applications
    Replies: 2
    Last Post: 09-26-2009, 08:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •