Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Needs Help Passing Variables From VB6 to CRS 7, bad!! 1

Status
Not open for further replies.

mrericb

Programmer
Oct 9, 2001
5
US
Hello,

I am having a very tough time passing variables from VB6 to Crystal Reports 7. I am using an ADODB object to connect to a database and I am using the CRViewer ActiveX controller to run an already existing CRS report. I am also unsure of the general formula syntax.

If any one can help, it would be greatly appreciated.

Thanks

Eric
 
CrystalReport1.ReportFileName = "report_name.rpt"
CrystalReport1.DataFiles(0) = "access_table.mdb"
CrystalReport1.ParameterFields(0) = "Facility ; " & Combo1.Text & " ; true "
CrystalReport1.ParameterFields(1) = "Begin Date ; Date (" & Text1.Text & "); true "
CrystalReport1.ParameterFields(2) = "End Date ; Date(" & Text2.Text & "); true "
CrystalReport1.Action = 1


Facility, Begin Date and End Date would be your parameter fields which you have to create in crystal report
 
Savok,

You rock! Thanks for taking the time to reply! I am accessing a sql database on MS SQL Server. I am assuming that I should replace the 'DataFiles(0) = "access_table.mdb"' with the connection string or perhaps a variable that contains the connection string. i will be running the report off of a disc.

Regardless, I am going to give you pointers a shot. It is now 7:30PM and I have been working on this since noon :-(

But, I think you tips will help

Thanks Again,

Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top