Results 1 to 9 of 9

Thread: Best way to multi page report on VB?

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2021
    Posts
    9

    Best way to multi page report on VB?

    Ok! hi!
    So, this could be a little bit large...
    I have a store procedure that returns this table:

    Name:  ForoCuadro1.png
Views: 115
Size:  12.6 KB

    I colored for the explanation:
    columns in yellow are data for the headers, and columns in green are the detail rows for every header.

    the threatment for this table is the next:
    I wanna group the rows by IdClient and IdCar, (the table is ordered with this secuence) in this case the result are four groups (marked in blue and gray because they are diferents combinations)
    I need that the groups resulted of this grouping process splits on distinct tables (pages), and every table with diferent header (according data from yellow columns) and obviously with its own detail list (rows from the green columns).
    so if you can undestand me the result from de image above would be this four pages (tables):

    Name:  ForoCuadro2.png
Views: 110
Size:  21.5 KB

    What is the best way to do it? Consider than in this case the result are 4 groups, but it could be more... or less
    I was trying with reportviewer control and a dataset... and I can get and show the entire table... but how group it? and split it in 4 tables (pages) diferents???
    is this the way? is there another ways?
    Help Please.

    Thanks a lot!!!

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    36,143

    Re: Best way to multi page report on VB?

    If there are just a few groups, then you might put each group on a tab page. If the number of groups is down around 4, this might work pretty well. If the number gets up around a dozen, it won't look good at all. So, you say there could be more, but it sounds like you don't expect the number to be very high. What is the maximum number of groups you are expecting?
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2021
    Posts
    9

    Re: Best way to multi page report on VB?

    Actually it could be just 1 or it could be 20.... So?
    What should I do?

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,967

    Re: Best way to multi page report on VB?

    You could use your original DataTable, along with a combobox for filtering. So you'd just need the one DGV. You can hide any columns you don't want in your reports...

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2021
    Posts
    9

    Re: Best way to multi page report on VB?

    Thanks! but its a report... so we just came here from a previous buttom click to reporting... the thing is, here all tables (groups) should be list to print with just another buttom (in the case of using reportviewer control this control already has a print buttom, so it would be nice if I can get it with this control)...
    I just need to split the table an use de result on diferents sub tables (pages)...
    Thanks a lot Paul.

  6. #6
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,967

    Re: Best way to multi page report on VB?

    Your report viewer has a datasource... you just need to ensure you provide the right table. How are you getting your initial table?

  7. #7

    Thread Starter
    New Member
    Join Date
    Mar 2021
    Posts
    9

    Re: Best way to multi page report on VB?

    Sure! the data source is a dataset with a tableadapter, the table result is returned from a store procedure (that recieves some parameters)...
    my project looks like this:

    Attachment 181300

    It's tiny because is a testing project... till I get it I wont embeded on my real project...

  8. #8
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    23,967

    Re: Best way to multi page report on VB?

    I canít see your attachment. Thereís an known error on the site. Iím not the best person to ask with the way youíre set up with stored procedures and design time data components. When I use ADO.Net, I do it all in code..
    But you need to be looking at filtering, unless you want grouping of any fields.
    Keep trying. Iím sure someone else can assist you later.

  9. #9

    Thread Starter
    New Member
    Join Date
    Mar 2021
    Posts
    9

    Re: Best way to multi page report on VB?

    Oka! thank you bery much!
    I keep looking for.

Tags for this Thread

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