Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Simple Report with VB6

Posted on 2005-03-28
7
Medium Priority
?
472 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
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month11 days, 23 hours left to enroll

564 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