Results 1 to 8 of 8

Thread: [RESOLVED] Is this possible with a VB6 datareport

  1. #1

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Resolved [RESOLVED] Is this possible with a VB6 datareport

    Hi Guys,

    I have two tables. One stores people information and another stores numbers assigned to them. The numbers table has a foreign key that links to the primary key of the people table.


    I want to display a persons name in the page header and then the numbers assigned to them in the details section of the report.

    also:How can I filter the reportby a certain ID. do I use a parameter, and if so, how?

    Please help

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,513

    Re: Is this possible with a VB6 datareport

    If your planning to use a DataEnvironment then,

    Check out this thread
    http://www.vbforums.com/showthread.php?t=502940


    Also setup the DE with it grouped on "people", then set the group property to page break after each group.

    If you don't want to use a DE the only other option for Grouping a DataReport is creating a MSDataShape recordset and setting it as the reports datasource, at least it's the only other way I know of.

    Good Luck

  3. #3

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Is this possible with a VB6 datareport

    Thanks Wes,

    I have a query like:

    Code:
    SELECT * FROM people where Id IN(?)
    for example.

    when I had:


    Code:
    SELECT * FROM people where = ?,
    it worked great.

    I want to send more than 1 id but im getting an error. Please help me

  4. #4
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,513

    Re: Is this possible with a VB6 datareport

    Do you mean a range of "Id"?

    Setup two parameters, then
    Code:
    SELECT * FROM people where Id >= ? and Id <= ?
    This is shown in the link I posted.

    You could also try the "Like" claus but I have never used it in a DE SQL.

  5. #5

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Is this possible with a VB6 datareport

    Thanks again Wes4dbt,

    How can I show a field in the details section like this:

    1,2,3,4


    instead of:

    1
    2
    3
    4

  6. #6
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,513

    Re: Is this possible with a VB6 datareport

    I don't think it can be done using a DE. You could use SQL to create an ADO recordset of the report data then create a new empty recordset and load it in the format you want. You can use the new rs for the reports datasource.

  7. #7

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Is this possible with a VB6 datareport

    thanks again Wes4dbt,

    I needed my report in that format urgently. So I decided to do a report in HTML and display it in a webbrowser control. It was way easier that trying to figure it our with a DE. It took me just half and hour. Thanks for all your help

  8. #8
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,513

    Re: [RESOLVED] Is this possible with a VB6 datareport

    Thats great, a DataReport can be very difficult to work with, if a hadn't already spent countless hours working with it I'd drop it like a hot rock and learn Crystal Reports. Hopefully, some day I will.

Posting Permissions

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



Click Here to Expand Forum to Full Width