Click here to Skip to main content
15,867,762 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Am working on a windows application where i have a datagridview, which has a PolicyId and a viewreport button. When they click on the ViewReport button, it has to pass the policy ID to the report and launch the report. The code i have been using to launch the report is working fine and is given below but i dont know how to pass that parameter to it, can someone please help?

VB
Private Sub gvManualRenewal_CellContentClick(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles gvManualRenewal.CellContentClick
    Try

        If (e.ColumnIndex = 14) Then
            Dim gvrow As DataGridViewRow
            gvrow = gvManualRenewal.SelectedRows(0)
            PolicyID = gvrow.Cells(15).Value
            Dim clsReportLink As New SearchPolicyMgr
            Dim dsReportLink As DataSet
            dsReportLink = clsReportLink.GetReportsLink("IMS Policy Loss Ratio")
            Dim ReportLink As String = ""
            ReportLink = dsReportLink.Tables(0).Rows(0)(1).ToString()
            Process.Start("IExplore.exe", ReportLink)

        End If
        Catch ex As Exception
        'MessageBox.Show("Unable to load the report." & vbCrLf & "Error Detail:" & ex.Message, "Expiring Policies", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End Try
End Sub
Posted
Updated 26-Sep-14 6:00am
v3

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900