• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 724
  • Last Modified:

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

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
0
ALaRiva
Asked:
ALaRiva
1 Solution
 
imrancsCommented:
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.


0
 
vidruCommented:
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:
http://support.businessobjects.com/communityCS/TechnicalPapers/scr8_ttxado.pdf.asp

-dave

0
 
fadlounCommented:
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"
Crystalreport1.printout

that is it

regards
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
ALaRivaAuthor Commented:
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
0
 
vidruCommented:
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.

-dave
0
 
ALaRivaAuthor Commented:
Hey, it worked perfect!!!

Thank You!!!

- Anthony
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now