Hi,
PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I REALLY NEEEEEDDD THIS... I CAN"T LIVE WITHOUT THIS... MY LIFE AND SANITY DEPEND ON KNOWING HOW TO DO THIS
I have reports in my vb6 app that are created with crystal reports 8.5.
I need a way to be able to set report names (like rptReport1, rptReport2... and I don't mean hard code them in...) to a Global variable at run time so that I can then use this variable to set the ReportSource of the viewer to view the report.
Currently I have the names of reports and their file names in my database table from which I populate my list box. Once the report is clicked on I do the folowing... but there is a problem..
global Report as Object
dim rptName
If Not rst.EOF Then
rptName = rst("fld_Rpt_File_Name")
Set Report = rptName
Report.ParameterFields(1).SetCurrentValue frmProgramsParameters.ProgramID
Else
MsgBox "This is invalid Report! It does not exist in the system", vbCritical, "Bad Report!"
Exit Sub
End If
The problem is that I can't Set Report to rptName because it doesn't see it as Object, but it does contain the report name. I tried making Report a different type but... no luck.
Is there something like ReportFileName property or a general CrystalReport type or Designer type????????????????




Reply With Quote