crystal sub report asking for a parameter value? .net
Posted on 2004-09-20
I'm using .net 2002 with crystal 10.
I have a main report linking to a subreport. in Crystal it all works good. individually (without them being linked) they work through .net, however when i include the sub report on the main report and set the datasource correctly for each report, for some reason it asks me to enter a parameter, is there something i'm missing?
Dim myConnection As New SqlClient.SqlConnection()
myConnection.ConnectionString = "data source=sqlserver;initial catalog=MAIN;integrated security=SSPI;persist security info=False;workstation id=CHRISTOPHER;packet size=4096"
Dim MyCommand As New SqlClient.SqlCommand()
Dim MyCommand1 As New SqlClient.SqlCommand()
MyCommand.Connection = myConnection
MyCommand1.Connection = myConnection
MyCommand.CommandText = "SELECT vw_rpt_DevCase_90.* FROM vw_rpt_DevCase_90 where developmentcasename <> 'Change of Zone' and developmentcasename <> 'Lot Line Adjustment' and developmentcasename <> 'Variance' and developmentcasename <> 'General Plan Amendment' and developmentcasename <> 'Specific Plan'"
MyCommand1.CommandText = "select top 100 developmentcaseid,timeextdateentered,timeexttermindays,timeextnotes,timeextphonenotificationdate,timeextdatefiled from vw_developmentcasesforinetwithtimeexts2 command"
MyCommand.CommandType = CommandType.Text
MyCommand1.CommandType = CommandType.Text
Dim MyDA As New SqlClient.SqlDataAdapter()
Dim myda1 As New SqlClient.SqlDataAdapter()
MyDA.SelectCommand = MyCommand
myda1.SelectCommand = MyCommand1
Dim myDS As New DataSet1()
Dim myds1 As New DataSet1()
'This is our DataSet created at Design Time
'You have to use the same name as that of your Dataset that you created during design time
Dim oRpt As New rpt_DevCase_90()
' Set the SetDataSource property of the Report to the Dataset
' Set the Crystal Report Viewer's property to the oRpt Report object that we created
cviewer.ReportSource = oRpt