VB Form to Crystal Reports Unbound Field (No Database Involved)

Posted on 2005-03-30
Medium Priority
Last Modified: 2013-12-26
OK, I'm wondering if someone can point me in the direction of a good example of the following:

I have a form in VB6 that requires user input, after which it performs a couple of calculations, and the form becomes a printout that should be issued to others.  Now, originally I was just using the PrintForm method, but my client would prefer it be done in Crystal Reports so I can make the formatting of the Print Out a little better.

Thing is, I've never done a Crystal Report that wasn't tied to a Database, and I haven't been able to find a good example on how to do this.  It only needs to be done once, that's all there is to this application.

I read somewhere that I'd need to use a CDO Rowset and an Array to pass the information from the VB6 Form to the Crystal Report.

Can someone point me in the direction of an example of the above, or maybe offer an alternative.

As I said, it's just passing information from the form into the Report for printing purposes.

Thank You.

- Anthony
Question by:ALaRiva
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
LVL 10

Expert Comment

ID: 13670075
Create an empty report and then create parameter fields to pass data to report and then from vb code pass values to these parameters fields.

LVL 13

Expert Comment

ID: 13671987
You don't need to use CDO.  You can use an ADO recordset in conjunction with a report that was designed using a Field Defintion File (.ttx file).

Here's the whitepaper:



Accepted Solution

fadloun earned 2000 total points
ID: 13674252
I THINK the easiest way is to add RDC(Report designer components it is included in crystal installation) to your project
from project menu select add crystal report

to pass a text from your form to report

Crystalreport1.text1.settext "your text"

that is it

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 10

Author Comment

ID: 13674391
fadloun, That's exactly what I was looking for, but I didn't see that option before, don't know how.

Let me give it a quick test and then I'll assign points

- Anthony
LVL 13

Expert Comment

ID: 13674732
That should work fine if all you need are flat, text objects.  If you actually need multiple records, you'll have to go with the recordset method.

LVL 10

Author Comment

ID: 13674839
Hey, it worked perfect!!!

Thank You!!!

- Anthony

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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, 8 hours left to enroll

765 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