Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2004
    Posts
    38

    Unanswered: Simplified Gantt Chart Report

    I have a client that wants a special kind of report. It's similar to a Gantt chart, however it's a little more simple. By that, I mean that a project will be represented entirely in one row with only major phases being shown 'end to end'.

    Here's the concept:
    1) Each row will represent one project.
    2) Each project goes through 8 phases that they want to show as horizontal or bars.
    3) The left side of each bar will line up with the begin date and the right side will line up with the end date.
    4) One vertical line will show the current date.
    5) The background needs to contain a sort of a calender view that displays 21 (maybe more, maybe less) months at a time.

    There's a little more to it, but getting this will give me enough of the framework to figure out the rest on my own.

    I searched and found an old thread (http://www.dbforums.com/showthread.php?t=552504) that seemed to touch on some techniques that I might use, but I thought that starting a new one might be a good idea since I'm not really doing the exact thing that the old thread discusses.

    Any ideas on this? I'm in the brainstorming phase of this, so even some general ideas on how to approach this thing would really help..

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    If you are interested in drawing the bars, just get the data all lined up and convert each piece to an appropiate size. What I mean is, dates are really just numbers with particular formatting. The start date to end date represents "100%". The date range of each piece is a portion of that 100%, calculated by the size of the portion divided by the total.

    Once you have a series of numbers that describe the "percent of full time span" each block represents, you then use those numbers to draw the boxes on the screen. You can align labels on the screen using the same percentage values and the "left" poperty of labels.

    The code would be fairly short, using a recordset to get the data, a couple setup calculations to get the total time span and some conversion factors to convert the percentages into twips (multiply the percentage by the total width of the form).

    There'd be some checking necessary, such as checking for overlapping labels, etc., but the rest is just tweaking.

    Sounds like fun - all I need to do now is to find a client to pitch it too!

    tc

  3. #3
    Join Date
    Oct 2004
    Posts
    38

    Coming back to this...

    I'm seriously in need of some help here... I've attached a sample of what I'm after...

    I searched here and found some Gantt-type solutions to imitate. Based on those, the solution was to write code that opens a form in 'single form' mode, programatically inserts & manipulates controls, then shows that form in print preview mode.

    I divided the attached sample into two pieces First, the calender which needs to adjust itself month to month. Works great. No problems.. Next piece was the grid and progress bars..

    The code to draw the background grid just adds empty label controls and adjusts their coordinates & appearance. When I ran it, it quit after about 800 labels with the error message : "Access can't add any more controls to this form.".. Huh? Never seen this before, but then again, I've never needed to create a form with several hundred labels.

    The best solution would be to find a way to implement progress bars on continuous forms (or reports).

    Next best thing would be a way of drawing that grid on a form or report without using hundreds of controls.

    I have a few other ideas to try, but I wanted to see if you folks had a magical solution before I spend too much time.
    Attached Files Attached Files

  4. #4
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    I'm thinking that each row should be a seperate record, use continuous forms. You could make each block a text box with the solid block character and use conditional formatting to set the color. It'd be a messy query and a bunch of code.

    Are you sure there isn't a solution out there that is close? This looks pretty common.

    tc

  5. #5
    Join Date
    Oct 2004
    Posts
    38
    Quote Originally Posted by tcace
    I'm thinking that each row should be a seperate record, use continuous forms. You could make each block a text box with the solid block character and use conditional formatting to set the color. It'd be a messy query and a bunch of code.

    Are you sure there isn't a solution out there that is close? This looks pretty common.

    tc
    I don't just need to set the color, I need to set the width based on dates gathered from my data source. I don't think that I can get there with conditional formatting or with the 'OnFormat' event in a report.

    I've gotten pretty close to what I want..

    I drew the grid with lines rather than empty labels. I was able to get it done with about 220 of them. I added that as a subform, and then placed the timeline bars on top of it as another subform.

    I honestly don't know if there's anything else that's close or if it's common. I searched on "Gantt charts", and the only workable thing I found used this method of using code to build a form piece by piece. If you have any suggestions on other stuff to search for, I'm all ears.. I just don't know what else to look for..

Posting Permissions

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