Click here to Skip to main content
15,887,596 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Create Dynamic Label with Drag and Drop Function Pin
Dave Kreskowiak24-Jul-13 17:07
mveDave Kreskowiak24-Jul-13 17:07 
QuestionThree column autocomplete Combobox in form and datagridview Pin
Biplob Singha Shee23-Jul-13 19:44
Biplob Singha Shee23-Jul-13 19:44 
AnswerRe: Three column autocomplete Combobox in form and datagridview Pin
Eddy Vluggen31-Jul-13 8:59
professionalEddy Vluggen31-Jul-13 8:59 
GeneralRe: Three column autocomplete Combobox in form and datagridview Pin
Biplob Singha Shee1-Aug-13 21:34
Biplob Singha Shee1-Aug-13 21:34 
QuestionHow to pass parameter in reportviewer which is calling .RDLC report Pin
Member 381516522-Jul-13 18:43
Member 381516522-Jul-13 18:43 
AnswerRe: How to pass parameter in reportviewer which is calling .RDLC report Pin
Mycroft Holmes22-Jul-13 19:12
professionalMycroft Holmes22-Jul-13 19:12 
GeneralRe: How to pass parameter in reportviewer which is calling .RDLC report Pin
Member 381516523-Jul-13 7:01
Member 381516523-Jul-13 7:01 
AnswerRe: How to pass parameter in reportviewer which is calling .RDLC report Pin
TnTinMn23-Jul-13 7:34
TnTinMn23-Jul-13 7:34 
Here is one way your could do it.

VB
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

' create a list to hold the report parameters
Dim params As New List(Of Global.Microsoft.Reporting.WinForms.ReportParameter)

' process existing report parameters and modify needed values
For Each pi As Microsoft.Reporting.WinForms.ReportParameterInfo In ReportViewer1.LocalReport.GetParameters()

   ' get any existing values
   ' values are stored as readonly IList(Of String)
   Dim values() As String = pi.Values.ToArray()

   Select Case pi.Name
      Case "FromDate"
         SetParameterValue_0(values, Today.ToString()) ' set your parameter value here as a string
      Case "ToDate"
         SetParameterValue_0(values, Today.AddDays(1.0#).ToString()) ' set your parameter value here as a string
   End Select

   ' parameter value(s) can only be set in the ReportParameter constructor
   params.Add(New Microsoft.Reporting.WinForms.ReportParameter(pi.Name, values))
Next

' set the report paramters to the modified list
ReportViewer1.LocalReport.SetParameters(params)

Me.ReportViewer1.RefreshReport()
End Sub

Private Sub SetParameterValue_0(ByRef values() As String, ByVal value As String)
      If values.Length = 0 Then
         values = New String() {value}
      Else
         values(0) = value
      End If
End Sub

QuestionVB6 output Access 2000 report to pdf Pin
Member 981947022-Jul-13 9:53
Member 981947022-Jul-13 9:53 
AnswerRe: VB6 output Access 2000 report to pdf Pin
Mycroft Holmes22-Jul-13 12:48
professionalMycroft Holmes22-Jul-13 12:48 
AnswerRe: VB6 output Access 2000 report to pdf Pin
Dave Kreskowiak22-Jul-13 13:55
mveDave Kreskowiak22-Jul-13 13:55 
Questionvbaproject.bin read Pin
JR21220-Jul-13 3:35
JR21220-Jul-13 3:35 
AnswerRe: vbaproject.bin read Pin
Dave Kreskowiak20-Jul-13 7:08
mveDave Kreskowiak20-Jul-13 7:08 
AnswerRe: vbaproject.bin read Pin
TnTinMn20-Jul-13 11:52
TnTinMn20-Jul-13 11:52 
QuestionHow to find mysql table field is empty ? Pin
Biplob Singha Shee19-Jul-13 22:42
Biplob Singha Shee19-Jul-13 22:42 
AnswerRe: How to find mysql table field is empty ? Pin
Biplob Singha Shee20-Jul-13 0:32
Biplob Singha Shee20-Jul-13 0:32 
QuestionERROR When I Show Openfiledialog.ShowDialog() Pin
Sang Nguyen Minh19-Jul-13 8:44
Sang Nguyen Minh19-Jul-13 8:44 
SuggestionRe: ERROR When I Show Openfiledialog.ShowDialog() Pin
Richard Deeming19-Jul-13 8:59
mveRichard Deeming19-Jul-13 8:59 
AnswerRe: ERROR When I Show Openfiledialog.ShowDialog() Pin
Richard MacCutchan19-Jul-13 22:19
mveRichard MacCutchan19-Jul-13 22:19 
AnswerRe: ERROR When I Show Openfiledialog.ShowDialog() Pin
Dave Kreskowiak20-Jul-13 2:57
mveDave Kreskowiak20-Jul-13 2:57 
GeneralRe: ERROR When I Show Openfiledialog.ShowDialog() Pin
Sang Nguyen Minh20-Jul-13 6:21
Sang Nguyen Minh20-Jul-13 6:21 
QuestionEncryption AES256 Trouble.. Pin
markapk18-Jul-13 7:56
markapk18-Jul-13 7:56 
AnswerRe: Encryption AES256 Trouble.. Pin
Kenneth Haugland18-Jul-13 20:09
mvaKenneth Haugland18-Jul-13 20:09 
GeneralRe: Encryption AES256 Trouble.. Pin
markapk18-Jul-13 22:04
markapk18-Jul-13 22:04 
GeneralRe: Encryption AES256 Trouble.. Pin
Matty2229-Jul-13 19:16
Matty2229-Jul-13 19:16 

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.