Wrox Programmer Forums
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 12th, 2004, 10:00 PM
Registered User
 
Join Date: Jun 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataReport

Hey,
I have an application that adjust inventories during runtime. During the run, the program reads some text files and extracts this info into several different tables. I want to run a report after the application runs thru the files that shows what materials where adjusted. For example, the program runs and extracts material A and saves the info in a table. At the same time it extracts material B and saves that to another table. Both tables contain a field called jobid. Everything works great until the report. I created a dataenvironment that connects to the tables. I set the command1 properties with the sql builder. To summarize the sql, it opens to seperate tables and pulls the records where jobpart.jobid=jobinprocessrs!jobid. It should sum the field jobpart.qty. It does the same for the trussplate table. The jobinprocess!jobid is a variable where the jobid is stored in a table. For instance, the jobid="1000", then the sql should pull all records with jobid="1000". It looks like the following:

SELECT jobpart.jobid, jobpart.id, SUM(jobpart.qty) AS Expr2, trussplate.plid, SUM(trussplate.plqty) AS Expr1, trussplate.plqty FROM jobpart, trussplate GROUP BY jobpart.jobid, jobpart.id, trussplate.plid, trussplate.plqty HAVING (jobpart.jobid = 'where jobpart.jobid=jobinprocessrs!jobid') ORDER BY jobpart.id

I then opened the datareport and set the datasource to the dataenvironment and the datamember to the command1. I then retrieved the structure. I then dragged the fields to the datareport sections.
When the report runs I get a blank page. I know there is info in the tables since the report runs only after the info is stored in the tables. Everything is stored in the correct place I just can't get it out.
Any help appreciated.
Thanks
Todd
 
Old February 19th, 2004, 10:46 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default

Hi Todd,

I am trying to learn how to use Data Report. I was wondering if you can suggest a book that shows you how to use it. If you did not use a book to learn how to use data report, please let me know how you went about learning it on your own.

Sorry this is not a reply to help you on your data report problem.

Thanks,
Judy





Similar Threads
Thread Thread Starter Forum Replies Last Post
Datareport need help please sleith Beginning VB 6 3 November 20th, 2007 08:45 AM
datareport error binil Beginning VB 6 0 December 15th, 2005 01:57 AM
VB6 DataReport and ADO mike123abc Pro VB 6 1 June 8th, 2004 12:01 AM
Datareport Group By btpoole VB Databases Basics 0 October 26th, 2003 04:51 PM
DataReport With DataShaping acko Pro VB 6 0 August 20th, 2003 12:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.