General discussion

Locked

Report on VB out of 3 database tables

By MadestroITSolutions ·
I need to generate a report (Sales order) on VB out of three tables from a SQL Database. Im using Microsoft Data Report that ships with VB. the problem is that M. Data reports only takes one datasource. The only way I can think of is to make a Temp table, and retrieve the information to this table, then use it as a source. The problem is that the tables' structure is slightly differently, so it will be complicated, but still doable. My question is, Is there any other solution, or perhaps, a Data Report software with this functionality that I am unaware of? Thank you in advance

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Report on VB out of 3 database tables

by R. A. Caluste In reply to Report on VB out of 3 dat ...

Are the three tables related by means of primary key/foreign key relationships? If so, you can create a ADO datashaped recordset either through code or through Data Environment. You then establish a heirarchy based on a predefined relationship amongtables. You then use Groupings in your Data Report depeding on the heirarchy of your data. For example, you have three tables, table1 related to table2 (one is to many) and table2 related to table3 (one is to many). You put the data of table 1 in your header, the data of table 2 in your subgroup (you create that group), and the data in table3 in the details section. You use the datamember property to indicate which data command (or which part of the heirarchy) the group belongs to.

Also you may want to check out the Crystal Report Designer, which offers a lot more functionality than the simple data report.

hope this helps.

Collapse -

Report on VB out of 3 database tables

by MadestroITSolutions In reply to Report on VB out of 3 dat ...

Poster rated this answer

Collapse -

Report on VB out of 3 database tables

by MadestroITSolutions In reply to Report on VB out of 3 dat ...

Actually, There is one table that holds the order number. The items in the order are stored in 3 other order-information tables, one for regular items, one for toys, and one for special items. The 2 foreign keys on every table are the order number, and the Item ID. This last one relates to its respective Primary key table (Item, Toy, Special) Every table has different fields. If it can be done with a shape, please explain how. Thank you.

Collapse -

Report on VB out of 3 database tables

by Miss Kitty In reply to Report on VB out of 3 dat ...

If you are using VB 6.0 Professional, Crystal Reports shipped with it but does not install when you install VB. You have to go into Windows Explorer; look at the VB cd and find Crystl32.exe; and double click on it. After you install it, go into Crystal and run the report wizard. It will guide you through setting up your report. After you have got your report set up correctly, email me and I'll send you an example of VB code to call in the report. Crystal is geared toward Sql and Access reporting not at all like Data Report.
Cathy
covcat@riverstonegrp.com

Collapse -

Report on VB out of 3 database tables

by MadestroITSolutions In reply to Report on VB out of 3 dat ...

Poster rated this answer

Collapse -

Report on VB out of 3 database tables

by MadestroITSolutions In reply to Report on VB out of 3 dat ...

This question was closed by the author

Back to Web Development Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums