Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2004
    Posts
    13

    Question Unanswered: Customizing Queries

    Hey, I would like to make it AS EASY AS POSSIBLE for a user to choose which fields from specific tables to view, and then view these fields (with the proper primary keys maintaining their status) in something like a datareport.

    Now I've fooled with Crystal Reports trial version, and it seems VERY difficult to set conditions or view things properly: If you have a Title, First, Middle, Last Name... how do you show them without any spaces that ate designated for them? Group By?

    Also, how easy is it for a user, who knows NOTHING about the tables, to just pick and choose fields from multiple tables and have the outcome show the proper records from each table VIA Crystal Reports?

    Thank you all so much for your time

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    In my opinion, Crystal Reports is fine for the "power user" that wants to manage their own data, and is willing to spend a few hours figuring out how to do that management. It will allow them to make things happen with a minimum amount of effort, and at a reasonable cost.

    I don't know of any tool that does this well for J. Q. User, that doesn't know a mailing label from a shipping envelope. There are too many things that the user needs to understand in order to effectively use a general purpose reporting tool for anyone I know to write a truly simple report writer. There is just too much gap between the blank paper and the finished product for any software I can imagine to bridge that gap successfully.

    -PatP

  3. #3
    Join Date
    Oct 2004
    Posts
    13
    IS there a way to return all the field structures from a given table via ADO or some other method in Visual Basic?

    Like, if a table has three fields: ID, LName, SSN- how do you get VB to return the title of all the fields from that table?

    The point of this is to allow the user to pick and choose which fields to throw into a huge query, and then allow them to click a "Create" button that will write them out in a report (line by line)?

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Unfortunately the answer is "sort of" in this case. Yes, there is a way to get schema information, no there isn't a generic way that works for many databases... Each database engine works differently.

    One relatively portable way that you can approximate this behavior is to use the dreaded:
    Code:
    SELECT * FROM myTable
    This will retrieve all of the columns from the table, leaving your code to figure out how many columns of which types related in an unknown fashion.

    Maybe someone else has a better answer. I'd certainly like one!

    -PatP

Posting Permissions

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