Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Unanswered: Color Bar in REPORT Field Access 2003

    Page HEADER
    City HEADER
    City CODE (group by is here)
    Code:
    DETAIL section        ([count])
    LISTINGDATE               8       color bar  ||||||||
    PENDING DATE              4       color bar  ||||
    CLOSED DATE               6       color bar  ||||||
    CITY FOOTER section
    SUM LISTING TYPES 18

    What I'm trying to accomplish is to expand, according to the count of each of the three listing types, a colored bar in a field to the right of each listing type.

    Detail has . . .
    GROUP HEADER YES
    GROUP FOOTER YES
    GROUP ON EACH VALUE
    GROUP INTERVAL 1
    KEEP TOGETHER WHOLE GROUP

    WOW - I can't believe I got this far. Whew!

    I tried =(String([count],"|")) but this just places the same number of "|" even though the count is different.

    I got a head ache.

    Any ideas . . . Thanks

    Rick

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you can do what you want assuming you are prepared to insert come code into the reports detail 'on format' event.

    if you want a vertical bar then I'd suggest you write a function, eg:-

    Code:
    private sub AddSymbols(NoItems as integer, optional SymbolToUse as string = ' | ')
    Dim ReturnValue as string 'will hold the string with the number of specified symbols in
    Dim iLoop as integer ' will be are loop counter
    ReturnValue = ""  ' set our default return value
    if NoItems >0 then 'we will only populate ReturnValue if ther number of items is >0
      for iLoop = 1 to NoItems
        ReturnValue = ReturnValue & SymbolToUse
      next iLoop
    endif
    return ReturnValue
    end sub

    the set the datasource for each of the controls to
    Code:
    =AddSymbols([what ever the column holding the number of symbols you want is called],' | '
    say you wanted 10 symbols

    Code:
    dim NoSymbols as integer
    NoSymbols = 10
    mytextboxcontrol.value = AddSymbols(NoSymbols," * ")
    you can get a similar effect by adjusting the textbox width.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2004
    Location
    California
    Posts
    502
    healdem - I wouldn't know where to start with all of that.

    It's way above my skill level I'm afraid. Rats!

    I can't understand any of it. Even if I did I wouldn't know where to place all of the code.

    Thanks . . . Rick

Posting Permissions

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