如何看待分报告:asp.net |With ConnInfo
.ServerName = "BAHARSLXP1"
.DatabaseName = "SLX_BAHAR_PROD"
.UserID = "admin"
.Password = "bahar$slx"
End With
Dim x As String, y As String
x = Format(CDate(Session("MDT1")), "yyyy,MM,dd")
y = Format(CDate(Session("MDT2")), "yyyy,MM,dd")
CrystalReportViewer1.ReportSource = Npath & "\PSSRCom5.Rpt"
Crpt.Load(Npath & "\PSSRCom5.Rpt")
Crpt.SummaryInfo.ReportComments = "PSSR Commission Claim Summary By Oppr. Type " & CDate(Session("MDT1")) & " - " & CDate(Session("MDT2")) & ""
If Session("MLEVEL") <= 2 Then CrystalReportViewer1.SelectionFormula = "{@flag}=1 and {OPPORTUNITY.ACTUALCLOSE}>= DATE(" & x & ") and {OPPORTUNITY.ACTUALCLOSE}<=date(" & y & ") and {va_Users.Usercode} IN '" & Session("STRWHERE") & "'"
If Session("MLEVEL") >= 2 Then CrystalReportViewer1.SelectionFormula = "{@flag}=1 and {OPPORTUNITY.ACTUALCLOSE}>=date(" & x & ") and {OPPORTUNITY.ACTUALCLOSE}<=date(" & y & ") and {va_Users.Usercode} IN " & Session("STRWHERE")
CrystalReportViewer1.ReportSource = Crpt
CrxSubreport = Crpt.OpenSubreport("PSSRCom3a.rpt")
CrxSubreport.Load(Npath & "\PSSRCom3a.Rpt")
CrxSubreport.RecordSelectionFormula = "{@flag}=1 and {OPPORTUNITY.ACTUALCLOSE}>={?StartDate} and {OPPORTUNITY.ACTUALCLOSE}<={?EndDate} and {va_Users.Usercode}={?Pm-vA_Users.USERCODE}"