Alpha Video Training
Results 1 to 10 of 10

Thread: Very Complex Report - Best Approach???

  1. #1
    Member
    Real Name
    Scott Moore
    Join Date
    Oct 2010
    Posts
    256

    Default Very Complex Report - Best Approach???

    Hi,

    Hoping to get some feedback on this one....

    I need to a build a very complex web report. It will have subtotals, different data groupings and different data atomic levels.

    I am pretty handy with SQL Queries and if it were even possible to build a single select statement it would be the query from hell it would be so large!

    So that leads me to my question - how to build this report? From what I can tell I can't use the report builder function for PDF's because it can only rely on one SQL select statement...

    Possible Solution

    What I am thinking is that the only way to do this is with Xbasic and html coding on an A5W page. I use Xbasic to read all of the data I need (using a few select statements) and calculate the data. I then write it to the page using HTML.

    The user has to be able to enter a date range for the report, so I would call the report from a grid and pass the date's as session variables...

    Is this how more experienced Alpha developers would handle this problem? I guess with version 11 and HTML reporting this might be a lot easier?


    Thanks,

    Scott

  2. #2
    Member MichaelCarroll's Avatar
    Real Name
    Michael Carroll
    Join Date
    Feb 2008
    Posts
    467

    Default Re: Very Complex Report - Best Approach???

    Grids + CSS + SQL Views

    Regards,

    Michael Carroll

    www.redrocksbluesky.com
    www.theminimalistrunner.com
    michael.vision360@gmail.com
    435-275-5170

  3. #3
    Member
    Real Name
    Scott Moore
    Join Date
    Oct 2010
    Posts
    256

    Default Re: Very Complex Report - Best Approach???

    Hi Michael,

    So I'm looking at multiple read only grids arranged on a web page?

    Could you validate my assumptions based on your suggestion...

    1) Each view would pull the required data. So if I had one particularly complex field I would have a view to pull just that one field and a grid based on just that one field.

    2) I would strip each grid of all built in CSS and simply apply my own CSS. To return to my previous example, if I just wanted to show a number as a bolded total I would strip out all of the grid CSS and simply bold the result field?


    Thanks,

    Scott

  4. #4
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,649

    Default Re: Very Complex Report - Best Approach???

    Quote Originally Posted by ssmoore1 View Post
    Is this how more experienced Alpha developers would handle this problem? I guess with version 11 and HTML reporting this might be a lot easier?
    A last resort for complex reports is to use a dummy table - fill it with values as needed (xbasic) and base the report on that.

  5. #5
    "Certified" Alphaholic chadbrown's Avatar
    Real Name
    Chad Brown
    Join Date
    Aug 2007
    Location
    Aurora, Ontario, Canada
    Posts
    1,412

    Default Re: Very Complex Report - Best Approach???

    Scott are you needing live reports or could it be a day old maybe?
    If its the later you could make a large view that at night gets converted to a passive link table refreshed at say midnight and the report could then be based off of the active link table instead of a complicated view. I have a report that takes about 45 seconds to run off of a complex view but when the same report is built off of the same data in a passive link table its only 4-5 seconds. You loose the live data feel but its so much faster.
    Chad Brown

  6. #6
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,636

    Default Re: Very Complex Report - Best Approach???

    I'll pitch in the same direction as Chad and Peter. A temporary or holding table of some kind, populated in manner that makes sense to you.

    For instance, I have one report that's run daily -- it's complex drawing data from everywhere, so I created about 90 separate functions -- each fill a particular value, and just call them one after the other. Sounds messy, but it actually made a large, complex, messy job into something very manageable and clean.
    -Steve


  7. #7
    Member
    Real Name
    Jay
    Join Date
    Jun 2008
    Location
    Detroit, Michigan
    Posts
    159

    Default Re: Very Complex Report - Best Approach???

    For some of my more complex reports I use SQL procedures. They can handle very complex queries, take inputs (such as dates), and even use temporary tables if need be.

  8. #8
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,441

    Default Re: Very Complex Report - Best Approach???

    Why don't you build yourself an OLAP Cube - (read Summarised Tables) with a frequent refresh rate?
    I demo'd this with the Desktop version a couple of years ago.
    (Not a clue how to do it in SQL but I know it's possible.)
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  9. #9
    Member
    Real Name
    Scott Moore
    Join Date
    Oct 2010
    Posts
    256

    Default Re: Very Complex Report - Best Approach???

    Hi All,

    Thanks for all the great feedback, gives me a lot to think about! I think what all of this confirmed is that its possible but going to take some work (i.e. there was no obvious solution :)

    Cheers,

    Scott

  10. #10
    "Certified" Alphaholic
    Real Name
    Lee Vasic
    Join Date
    May 2010
    Location
    Salt Lake City
    Posts
    1,225

    Default Re: Very Complex Report - Best Approach???

    The only solution is a stored procedure using temp tables and the SQL rollup command. I have many years of experience and have tried many approaches.
    1. Our reports were so complex that Crystal reports couldn’t run it.
    2. One large query in SQL is too complicated. Microsoft recommends smaller queries loading temp tables until you have the data at the level you need.

Similar Threads

  1. Complex Lookup
    By TTI in forum Alpha Five Version 10 - Desktop Applications
    Replies: 4
    Last Post: 11-04-2010, 02:44 PM
  2. Complex Set Report Speed
    By Peter.Greulich in forum Alpha Five Version 5
    Replies: 9
    Last Post: 06-06-2004, 07:43 PM
  3. Complex Filter Help
    By Sam Wagoner in forum Alpha Five Version 5
    Replies: 7
    Last Post: 11-04-2003, 08:32 PM
  4. Complex Microsoft Word Report
    By awj in forum Alpha Five Version 5
    Replies: 5
    Last Post: 03-24-2003, 04:25 PM
  5. complex lookup
    By bob muzik in forum Alpha Five Version 4
    Replies: 14
    Last Post: 12-17-2000, 07: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
  •