hi How to feeding Crystal Report 8.5 parameters from VB6.0 Application?
+1
A:
Here is one way of doing it (assuming that crxRpt points to a valid report object):
Dim crxParam as CRAXDRT.ParameterField
For Each crxParam In crxRpt.ParameterFields
Select Case crxParam.Name
Case "{?MyStringParam1}"
crxParam.AddCurrentValue "Parameter1 value"
Case "{?MyNumberParam2}"
crxParam.AddCurrentValue 25.35
End Select
Next crxParam
Heather
2009-11-23 20:19:37
Heather,Thank you but I still have some problem while executing my report. let's explain it :I have made a new report using Crystal Reports 8.5 (report1) which uses a stored procedure for its data source.The stored procedure has 2 input parameters (@p1 and @p2) and when I enter some test data for @p1 and @p2, every thing is all right.Then, I added the report1 in visual basic 6.0 IDE and added a new form (form1) and a crystal report viewer control on form1.Now please help me: I wanna to show the report1.What codes exactly should I use ?
odiseh
2009-11-24 08:30:13
A:
Use the GetItemByName(ByVal Name As String, Optional ByVal SubreportName As Object = Nothing) As CRAXDDRT.ParameterFieldDefinition method. Once you have the ParameterFieldDefinition object, the world is your oyster.
Craig
2009-11-24 04:43:00