-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Ravikumarcbe
Message 1 in Discussion

    Hi ,     I have written the code for passing the parameter ,  
Dim pcol As New CrystalDecisions.Shared.ParameterValues() 
Dim pval As New CrystalDecisions.Shared.ParameterDiscreteValue() 
Dim tl As Table 
Dim loginfo As TableLogOnInfo 
Dim rp As New ReportDocument() 
Me.Cursor = Cursors.WaitCursor 
rp.Load(Application.StartupPath & "\crp.rpt") 
For Each tl In rp.Database.Tables 
loginfo = tl.LogOnInfo 
With loginfo.ConnectionInfo 
.ServerName = ServerNAme 
.UserID = UserID 
.Password = Pwd 
.DatabaseName = Database 
End With 
tl.ApplyLogOnInfo(loginfo) 
Next tl 
pval.Value = 2 
pcol.Add(pval) 
rp.DataDefinition.ParameterFields("@Code").ApplyCurrentValues(pcol) 
pcol.Clear() 
pval.Value = "01/" & CType(DTMonth.Value, Date).Month & "/" & CType(DTMonth.Value, 
Date).Year 
rp.DataDefinition.ParameterFields("@FromDate").ApplyCurrentValues(pcol) 
pval.Value = DTMonth.Value.DaysInMonth(DTMonth.Value.Year, DTMonth.Value.Month) & "/" 
& CType(DTMonth.Value, Date).Month & "/" & CType(DTMonth.Value, Date).Year 
rp.DataDefinition.ParameterFields("@ToDate").ApplyCurrentValues(pcol) 
pcol.Clear() 
pval.Value = CboEmployee.SelectedValue 
pcol.Add(pval) 
rp.DataDefinition.ParameterFields("@EmpCode").ApplyCurrentValues(pcol) 
pcol.Clear() 
pval.Value = CboEmployee.SelectedValue 
pcol.Add(pval) 
rp.DataDefinition.ParameterFields("@EmpCode").ApplyCurrentValues(pcol) 
pcol.Clear() 
CV.ReportSource = rp    
  
My problem is , it doesn't take this parameter values what I have specified thru code, 
it keep asking the parameter values thru dialog box, 
what could be the problem , anything missing in my code 
  
Thanx in advance 
  
Rgds, 
Ravi 
 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to