Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 12th, 2004, 10:00 PM
Registered User
Join Date: Jun 2003
Location: , North Carolina, .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataReport

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.
Reply With Quote
  #2 (permalink)  
Old February 19th, 2004, 10:46 AM
Friend of Wrox
Points: 1,035, Level: 12
Points: 1,035, Level: 12 Points: 1,035, Level: 12 Points: 1,035, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: , , USA.
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66

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.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 06:46 PM.

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