Everything is working for me as it should. My question is can I export the result from the crystal reports to pdf format only. below is the code for my click event.
(code)
Protected Sub btnSelect_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSelect.Click
System.Threading.Thread.Sleep(1000)
ClientScript.RegisterClientScriptBlock(Me.GetType, _
"reset", "document.getElementById('" & btnSelect.ClientID & "').disabled=false;", True)
Dim NamStr As String = ""
Dim LocStr As String = ""
Dim ValStr As String = ""
Dim reportId As Integer = 5721347
NamStr = "Contractid"
Dim NumP As Integer = 1
For Each gvRows As GridViewRow In gvItemDetail.Rows
Dim chkSelect As CheckBox = CType(gvRows.FindControl("chkSelect"), CheckBox)
If chkSelect.Checked Then
ValStr = ValStr & (gvItemDetail.DataKeys(gvRows.RowIndex)("contid")).ToString.Trim & ","
End If
Next
If ValStr.Length = 0 Then
lblError.Visible = True
Else
lblError.Visible = False
ValStr = Left(ValStr, Len(ValStr) - 1) & ";"
Dim Urlval As New UrlType
LocStr = Urlval.GetUrl & reportId & "&Pnames=" & NamStr & "&Pvals=" & ValStr & "&NumParens=" & NumP
Response.Redirect(LocStr)
End If
End Sub
(code)
(code)
Protected Sub btnSelect_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSelect.Click
System.Threading.Thread.Sleep(1000)
ClientScript.RegisterClientScriptBlock(Me.GetType, _
"reset", "document.getElementById('" & btnSelect.ClientID & "').disabled=false;", True)
Dim NamStr As String = ""
Dim LocStr As String = ""
Dim ValStr As String = ""
Dim reportId As Integer = 5721347
NamStr = "Contractid"
Dim NumP As Integer = 1
For Each gvRows As GridViewRow In gvItemDetail.Rows
Dim chkSelect As CheckBox = CType(gvRows.FindControl("chkSelect"), CheckBox)
If chkSelect.Checked Then
ValStr = ValStr & (gvItemDetail.DataKeys(gvRows.RowIndex)("contid")).ToString.Trim & ","
End If
Next
If ValStr.Length = 0 Then
lblError.Visible = True
Else
lblError.Visible = False
ValStr = Left(ValStr, Len(ValStr) - 1) & ";"
Dim Urlval As New UrlType
LocStr = Urlval.GetUrl & reportId & "&Pnames=" & NamStr & "&Pvals=" & ValStr & "&NumParens=" & NumP
Response.Redirect(LocStr)
End If
End Sub
(code)