?
Solved

Simple Report with VB6

Posted on 2005-03-28
7
Medium Priority
?
465 Views
Last Modified: 2011-10-03
Folks,
I have a small accounting package designed and running in VB6 (very simple) I want to be able to print reports based on user inputs, i.e. "SELECT PaymentsOut FROM Accounts WHERE ....." which will display the results in a form ready for printing. I have looked at using Crystal Reports which seems like the ideal choice but is too complicated at this stage for me to use as I am running out of time. So I have decided to go the Report Designer route that built into VB6. Will the report designer allow me to display records based on quires generated by user inputs? If you could offer me a simple approach using Crystal reports I would be interested. I have created reports using the report generator/wizard but I am at a loss on how to modify this to display specific quires. I other word the crystal report will generate a report of all invoices and their details, I would like to be able to display the details of just one invoice.

I am running out of time in my submission of a final year project hence the smell of desperation about this question!!

Thanks
0
Comment
Question by:davemckenna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 5

Expert Comment

by:jkwasson
ID: 13646285
this link will show you how to create a data report without using the data report designer...allows you more flexibility and it should do what you want...

http://vbcity.com/forums/faq.asp?fid=8&cat=DataReport&#TID20722

jk
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 13647266
0
 

Author Comment

by:davemckenna
ID: 13655772
Thats great, Thanks. What i would like to be able to is Show the details of an invoice which is held on one table, then show the details of another table namely InvoiceItems which shows a breakdown of the invoice with totals etc. Invoices are linked in a one-to-many relationship with InvoiceItems via InvoiceNumber. Should i look to insert a sub report? ,Or could this be handled through an SQL statement? How would i go about either of these?

Thanks
Dave
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 70

Expert Comment

by:Éric Moreau
ID: 13655827
SubReport does not exist in datareport!

You have to JOIN your tables together into the same query and use the GROUP feature to print your header.
0
 

Author Comment

by:davemckenna
ID: 13655879
OK that explains the futility of trying sub reports!
Do i join the tables using SQL on a command whithin the DataEnviroment?  Would you have a link to show me how to do this?

I know this is going away slightly from the main question, i will award points soon and start a new quesiton shortly if this gets much further.

Thanks
Dave
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 13655918
You can create 2 commands and relate them together. This will create a SHAPE recordset.

There is an example at http://support.microsoft.com/default.aspx?scid=kb;en-us;289793 that is all done using code (no DE)

There is also http://support.microsoft.com/default.aspx?scid=kb;en-us;251329 that is using the DE
0
 

Author Comment

by:davemckenna
ID: 13655949
Thanks you.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month10 days, 2 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question