Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pls help!! data report grouping

Status
Not open for further replies.

elizachacko

Programmer
Jan 9, 2003
6
AE
i have ben trying really hard to group on two fields in data reports in vb. but not working out!!!. will someone be kind enough to help???
this is my prob.
i have a table called bookregister with the following fields
category, author, bookname, stock
i want to group by category first and then by author.
the format of the data report that i want is given below
computer(category)
diana(author)
ffffff(bookname)
fgfghgf "
fgfgfggh "

walter(author)
dfgdfgfg(bookname)
dfdgfghg "
economics(category)

siam (author)
gghgh (bookname)
fgfgh "
i hope my prob is understood: ie grouping first on the basis of ategory and then on author
it is so easy in access but it's driving me nuts in vb!!!!

i tried group by but u see, the headers(category, author is repeating

to make it more clear
suppose in access we were to use the report wizard
we would first soecify the table,
then add two grouping levels
first : category
second: author

and we would get a report.

i want this same form of report in vb using data report and data environment

i am relatively new to this

pls help!!!!!!! i really need it.
elizabeth_c123@rediffmail.com

 
Using the DataEnvironment you will setup a connection then a command and then a child command to the first command. Doing this you are actually crating a SHAPE statment also known as Hierarchical type of recordset. When you bind this recordset to a datareport you will chose the first command in the Datamember, then all you do is right-click on the datareport and retrieve the structure. Then using the dataenvironment click and drag each command into there proper sections on the datareport. Now all your fields are on the datareport with labels allyou have to do is move them around to how you want them.

Hope this helps!
Deke2:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top