January 13, 2009 at 8:55 am
I am trying to get link to a PDF open thru a report. The link works when using thru a web browser but not thru the report viewer in vb 2005. I would like the link to open in a new explorer window but I can't seem to find the command to do so. Here is my code for the report. I am passing variables from a search form to generate the report. I've also attached a partial screen shot of the report.
Private Sub SetReportParameters()
'Set Processing Mode
ReportViewer1.ProcessingMode = ProcessingMode.Remote
ReportViewer1.ShowParameterPrompts = False
' Set report server and report path
ReportViewer1.ServerReport.ReportServerUrl = _
New Uri("http://EXPl0009/reportserver")
ReportViewer1.ServerReport.ReportPath = _
"/Contract_Number/MainAdmin"
Dim pInfo As ReportParameterInfoCollection
Dim paramList As New Generic.List(Of ReportParameter)
paramList.Add(New ReportParameter("ContractNumber", SearchForm.ddCN.Text, False))
paramList.Add(New ReportParameter("VenderName", SearchForm.ddVN.Text, False))
paramList.Add(New ReportParameter("Location", SearchForm.ddLoc.Text, False))
ReportViewer1.ServerReport.SetParameters(paramList)
pInfo = ReportViewer1.ServerReport.GetParameters()
' Process and render the report
ReportViewer1.RefreshReport()
End Sub
Any help or leads would be appreciated.
Thanks,
Steve
January 13, 2009 at 9:40 am
Can you post the format you rendering the link as?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
January 13, 2009 at 1:11 pm
I'm sorry but don't completly understand. I'm calling the SetReportParameters() method on load which generates the report. I'm not using a URL to run the report because it is running in the vb Report Viewer.
Imports System.Web.Services.Protocols
Imports System.Collections
Imports Microsoft.Reporting.WinForms
Public Class ViewReport
Private Sub ViewReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SetReportParameters()
End Sub
I tried to run the report thru a web browser it opens the link to the PDF but I am unsure on how to pass a parameter from a textbox into the URL
Example of URL being passed thru a web browser:
WebBrowser1.Navigate("http://expl0009/reportserver?%2fContract_Number%2fMainAdmin&rs:Command=Render&rc:Toolbar=True&rc:Parameters=false&rc:LinkTarget=_Blank")
**This opens the links to the PDFs in the report but the problem is that I cannot or don't know how to pass parameters from a textbox into the link. However they can be statically added to the URL as such(&ContractNumber=VITSL_BDG_NE_VB_2009_001)
So I have two different ways of viewing the report but they both have problems.
Report Viewer: Doesn't open link in the report
Web browser: Can't pass parameters from a textbox into the URL -- or don't know how.
Any suggestions would be great!
Steve
January 13, 2009 at 1:45 pm
Steve,
Sorry I was not clear, especially with my typos.
What I was wondering is what the link to the pdf is in the report?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
January 13, 2009 at 2:11 pm
I'm using the jump to url:
=Fields!LinkPDF.Value
The value is a Share on a server eg \\EXPL0009\Reports\PDFs\...
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply