Click here to Skip to main content
15,900,429 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCopy all files and folders Pin
dptalt2-Mar-06 6:16
dptalt2-Mar-06 6:16 
AnswerRe: Copy all files and folders Pin
RJGCarey2-Mar-06 7:36
RJGCarey2-Mar-06 7:36 
QuestionVB.net and Access MDW Pin
Goran Djuric2-Mar-06 6:06
Goran Djuric2-Mar-06 6:06 
AnswerRe: VB.net and Access MDW Pin
infothegdc2-Mar-06 13:24
infothegdc2-Mar-06 13:24 
GeneralRe: VB.net and Access MDW Pin
Goran Djuric2-Mar-06 17:30
Goran Djuric2-Mar-06 17:30 
QuestionOpening files (not EXEs) using appropriate programs Pin
RevathiRajaGopal2-Mar-06 5:29
RevathiRajaGopal2-Mar-06 5:29 
AnswerRe: how can i get summary properties of a video file on my desktop through c# code Pin
J4amieC2-Mar-06 4:38
J4amieC2-Mar-06 4:38 
QuestionPassing parameters to a Crystal Report via VB.Net Pin
directred2-Mar-06 4:21
directred2-Mar-06 4:21 
I have a crystal report with 3 parameters, XYZ, Version, Other and I am trying to pass values via VB.Net to this report. It is no problem passing one but any more than that, it does not seem to work. The problem is that it the last parameter holds the value and the others are blank. What am I doing wrong. This is driving me crazy. Here is my code.

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

Dim strReportPath As String = "C:\temp\report1.rpt"

Try
'Load Crystal Report's rpt file
Dim cr As New CrystalDecisions.CrystalReports.Engine.ReportDocument

cr.Load(strReportPath)

''Declare the parameter related objects
Dim param1Fields As New CrystalDecisions.Shared.ParameterFields
Dim param1Field As New CrystalDecisions.Shared.ParameterField
Dim param1Range As New CrystalDecisions.Shared.ParameterDiscreteValue

Dim param2Fields As New CrystalDecisions.Shared.ParameterFields
Dim param2Field As New CrystalDecisions.Shared.ParameterField
Dim param2Range As New CrystalDecisions.Shared.ParameterDiscreteValue

Dim param3Fields As New CrystalDecisions.Shared.ParameterFields
Dim param3Field As New CrystalDecisions.Shared.ParameterField
Dim param3Range As New CrystalDecisions.Shared.ParameterDiscreteValue

param1Field.ParameterFieldName = "XYZ"
param1Range.Value = 31000
param1Field.CurrentValues.Add(param1Range)
param1Fields.Add(param1Field)
CrystalReportViewer1.ParameterFieldInfo = param1Fields

param2Field.ParameterFieldName = "Version"
param2Range.Value = 10
param2Field.CurrentValues.Add(param2Range)
param2Fields.Add(param2Field)
CrystalReportViewer1.ParameterFieldInfo = param2Fields

param3Field.ParameterFieldName = "Other"
param3Range.Value = 44
param3Field.CurrentValues.Add(param3Range)
param3Fields.Add(param3Field)
CrystalReportViewer1.ParameterFieldInfo = param3Fields

Dim rpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
CrystalReportViewer1.ReportSource = strReportPath
CrystalReportViewer1.Refresh()

'Set the CrystalReportViewer's apperance and set the ReportSource
CrystalReportViewer1.ShowRefreshButton = False
CrystalReportViewer1.ShowCloseButton = False
CrystalReportViewer1.ShowGroupTreeButton = False

Catch ex As Exception
MsgBox(Err.Description)
End Try
End Sub
QuestionException Management in Enterprise Library Pin
dlarkin772-Mar-06 3:39
dlarkin772-Mar-06 3:39 
QuestionMaking a service cluster aware Pin
UniBond2-Mar-06 3:36
UniBond2-Mar-06 3:36 
AnswerRe: Making a service cluster aware Pin
Dave Kreskowiak2-Mar-06 8:39
mveDave Kreskowiak2-Mar-06 8:39 
QuestionHow can i use directsound to record voice in vb.net? Pin
devang_bison2-Mar-06 2:05
devang_bison2-Mar-06 2:05 
AnswerRe: How can i use directsound to record voice in vb.net? Pin
Alex Hoffenreich4-Apr-06 0:43
Alex Hoffenreich4-Apr-06 0:43 
Questionis it wrong? Pin
pandapatin2-Mar-06 0:52
pandapatin2-Mar-06 0:52 
AnswerRe: is it wrong? Pin
Ingo2-Mar-06 2:48
Ingo2-Mar-06 2:48 
AnswerRe: is it wrong? Pin
albCode2-Mar-06 3:05
albCode2-Mar-06 3:05 
GeneralRe: is it wrong? Pin
pandapatin2-Mar-06 3:14
pandapatin2-Mar-06 3:14 
GeneralRe: is it wrong? Pin
albCode2-Mar-06 3:30
albCode2-Mar-06 3:30 
GeneralRe: is it wrong? Pin
pandapatin2-Mar-06 4:04
pandapatin2-Mar-06 4:04 
GeneralRe: is it wrong? Pin
albCode2-Mar-06 4:58
albCode2-Mar-06 4:58 
AnswerRe: is it wrong? Pin
Steve Pullan2-Mar-06 12:58
Steve Pullan2-Mar-06 12:58 
QuestionDLL in VB Pin
QuickDeveloper2-Mar-06 0:44
QuickDeveloper2-Mar-06 0:44 
AnswerRe: DLL in VB Pin
Dave Kreskowiak2-Mar-06 8:25
mveDave Kreskowiak2-Mar-06 8:25 
QuestionSql Sever Pin
magnifique2-Mar-06 0:25
magnifique2-Mar-06 0:25 
AnswerRe: Sql Sever Pin
Vasudevan Deepak Kumar2-Mar-06 0:34
Vasudevan Deepak Kumar2-Mar-06 0:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.