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!

What is the ideal way to program reports ?

Status
Not open for further replies.

Utpal

Programmer
Mar 28, 2002
19
IN
Hi everybody,
I am about to implement Item Master printing in VB 6.0 - SQL Server 7. The Items are grouped under a hierarchy of group levels v.i.z. Super groups (Raw Material, Work-in-progress, Finished Goods), Main groups, Sub groups, Sub Sub groups and Sub Sub Sub groups. The printing options to be given are :
* Multi-selection of either of the group levels, i.e. multi-selection of either Super groups or Main groups or Sub groups or Sub Sub groups or Sub Sub Sub groups
OR
* Multi-selection of items.
After the user prints a report and comes out of the print preview, he is taken back to the Print options form, where he can choose another report (by changing print options) to print.
Now, my question is which of the following 2 ways would be better to implement this ?
1) Fetch the entire Item master table in a recordset on invoking the print options form and then filter the recordset according to the print options selected using VB code
2) Fetch the selected groups/items from the database into the recordset, each time the user prints according to a new print option ?
 
If you fetch the entire table at once, it is going to take longer initially, but if you then have all the info in a disconnected recordset, you will be able to access it without rehitting the database. If you have to go across a network to hit the database server, the can be a big savings in network traffic. Also, doing it this way you will get a snapshot in time of the data. If you use multiple hits, the data may change between hits and reports may not exactly agree (which can be VERY important if these reports are going to "bean counter" types.
 
Regarding your statement "Also, doing it this way you will get a snapshot in time of the data. If you use multiple hits, the data may change between hits and reports may not exactly agree", in this case it is an Item master, which is not updated frequently. Moreover, there is no material relations between 2 groups of items.
What do you mean by "bean counter" types ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top