|
Crystal Report - вспоможите
|
|||
---|---|---|---|
#18+
Как передать параметры для запроса в Crystal Report. Сделал запрос, прицепил его к CrystalReportViewer, выполняется, все нормально. Теперь каким образом в него параметры передать. Доки чегой-то на Crystal Report не нашел. Может кто просветит неуча. ... |
|||
:
Нравится:
Не нравится:
|
|||
14.02.2003, 10:46 |
|
Crystal Report - вспоможите
|
|||
---|---|---|---|
#18+
А стандартно - http://server/report.rpt?param1=value1¶m2=value2&... не получается? ... |
|||
:
Нравится:
Не нравится:
|
|||
18.02.2003, 16:22 |
|
Crystal Report - вспоможите
|
|||
---|---|---|---|
#18+
Private Sub cmdBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdBrowse.Click Dim crReportDocument As New ReportDocument() Dim cninfo As New ConnectionInfo() Dim strRepName As String strRepName = Me.Session("RepFileName") crReportDocument.Load(Request.PhysicalApplicationPath + "\reports\" + strRepName + ".rpt") SetParameterFields() Dim logOnInfo As New TableLogOnInfo() logOnInfo = crReportDocument.Database.Tables.Item(0).LogOnInfo logOnInfo.ConnectionInfo.Password = "webvps1976" logOnInfo.ConnectionInfo.ServerName = "crss" logOnInfo.ConnectionInfo.DatabaseName = "VPSWeb" logOnInfo.ConnectionInfo.UserID = "webvps" crReportDocument.Database.Tables(0).ApplyLogOnInfo(logOnInfo) crvReports.DisplayGroupTree = False 'hide the drilldown section crvReports.HasSearchButton = False 'hide the search buttons crvReports.HasDrillUpButton = False 'hide the drillup button crvReports.HasZoomFactorList = False 'hide the zoom factor dropdown crvReports.HasRefreshButton = False 'hide the refresh page button 'crvReports.DisplayToolbar = False crvReports.HasPrintButton = False crvReports.HasToggleGroupTreeButton = False crvReports.HasExportButton = False crvReports.HasGotoPageButton = False crvReports.ReportSource = crReportDocument crvReports.DataBind() crvReports.Visible = True End Sub Private Sub SetParameterFields() Dim strNameReport As String Dim paramfields As New ParameterFields() Dim paramField As New ParameterField() Dim paramField1 As New ParameterField() Dim paramField2 As New ParameterField() Dim paramField3 As New ParameterField() Dim paramField4 As New ParameterField() Dim paramField5 As New ParameterField() strNameReport = Me.Session("RepFileName") '"user_registry" Select Case strNameReport Case "user_registry" paramField.ParameterFieldName = "PARM1" Dim discreteValue As ParameterDiscreteValue = New ParameterDiscreteValue() Dim strPARM1 As String = ddParam1.SelectedItem.Text '"USER LEVEL" 'Request.QueryString("agentcode") discreteValue.Value = strPARM1 paramField.CurrentValues.Add(discreteValue) paramfields.Add(paramField) paramField1.ParameterFieldName = "PARM2" Dim discreteValue1 As ParameterDiscreteValue = New ParameterDiscreteValue() Dim strPARM2 As String = ddParam2.SelectedItem.Text '"NAME" discreteValue1.Value = strPARM2 paramField1.CurrentValues.Add(discreteValue1) paramfields.Add(paramField1) Case "Vio_Status_Stat" paramField.ParameterFieldName = "PARM1" Dim discreteValue As ParameterDiscreteValue = New ParameterDiscreteValue() Dim strPARM1 As String = StartDate.Text '"USER LEVEL" 'Request.QueryString("agentcode") discreteValue.Value = strPARM1 paramField.CurrentValues.Add(discreteValue) paramfields.Add(paramField) paramField1.ParameterFieldName = "PARM2" Dim discreteValue1 As ParameterDiscreteValue = New ParameterDiscreteValue() Dim strPARM2 As String = EndDate.Text '"End date" discreteValue1.Value = strPARM2 paramField1.CurrentValues.Add(discreteValue1) paramfields.Add(paramField1) paramField5.ParameterFieldName = "PARM3" Dim discreteValue5 As ParameterDiscreteValue = New ParameterDiscreteValue() If ddParam3.SelectedItem.Text <> "" Then Select Case ddParam3.SelectedItem.Text Case "VIOLATION" discreteValue5.Value = "Y" Case "INFORMATIONAL" discreteValue5.Value = "N" Case "VIOLATION AND INFORMATIONAL" discreteValue5.Value = "Y,N" Case Else discreteValue5.Value = "" End Select End If paramField5.CurrentValues.Add(discreteValue5) paramfields.Add(paramField5) End Select paramField2.ParameterFieldName = "RUN_DATE" Dim discreteValue2 As ParameterDiscreteValue = New ParameterDiscreteValue() Dim strRUNDATE As String = CStr(Format(Now, "MMM d yyyy")) '"07/15/2003" discreteValue2.Value = strRUNDATE paramField2.CurrentValues.Add(discreteValue2) paramfields.Add(paramField2) paramField3.ParameterFieldName = "RUN_TIME" Dim discreteValue3 As ParameterDiscreteValue = New ParameterDiscreteValue() Dim strRUNTIME As String = CStr(Format(Now, "HH:mm:ss")) '"15:15:15" discreteValue3.Value = strRUNTIME paramField3.CurrentValues.Add(discreteValue3) paramfields.Add(paramField3) paramField4.ParameterFieldName = "REPORT_ID" Dim discreteValue4 As ParameterDiscreteValue = New ParameterDiscreteValue() Dim strREPORTID As String = "55555" discreteValue4.Value = strREPORTID paramField4.CurrentValues.Add(discreteValue4) paramfields.Add(paramField4) crvReports.ParameterFieldInfo = paramfields End Sub ... |
|||
:
Нравится:
Не нравится:
|
|||
25.07.2003, 02:26 |
|
|
start [/forum/topic.php?fid=18&fpage=1048&tid=1396350]: |
0ms |
get settings: |
8ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
31ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
36ms |
get tp. blocked users: |
1ms |
others: | 278ms |
total: | 393ms |
0 / 0 |