Monday, March 26, 2012
How to show a linked report in a report container?
the reports using the reporting services. Some of the reportds are linked
report and I am not sure how to display it in the report container.
Currently it opens on a new page. Thanks.I have the same problem...
Any luck with that?
--
http://dotnet.org.za/stanley
"Paul" wrote:
> I have a report container (reportviewer.dll) in a .net web page to display
> the reports using the reporting services. Some of the reportds are linked
> report and I am not sure how to display it in the report container.
> Currently it opens on a new page. Thanks.
>
>
Monday, March 19, 2012
How to set this up?
view the reports ONLY through a ReportViewer control on a asp.net web page
ie not allow to navigate all other folders or areas in the Report Manager.
Reporting services is installed on a stand alone server (not belong to any
domain, no AD set up) running on Windows 2003 server. Currently I configured
the "Report Manager" and "ReportServer" web site to allow annonyous access.
However some users know how to bypass the web application and directly enter
the IP address/reports of the stand alone server to view all the reports.
The asp.net page has built-in security to filter out the reports listed on
the page based on the user login and password. This web application is also
hosted at the stand alone server and is connected to a remote Sql server.
The web application is using the sql security.I have a similar problem and cannot find a solution provided by Microsoft.
However, I decidee to solve it by a trick. I develop an ASP.net web
application and the application have some report printing function. Whenever
a report is printed, a random key will be inserted into a database table
like this:
Key User
KE#n-asdfjk-ad33klj-kasjd WBush
The key and user are also passed in the query string. When the report is
run, the key and user will be checked again in the stored procedure to
verify that this user can print this report.
I am not sure whether this is a good solution, but I think that's what we
can do before Microsoft can provide a better solution.
"Paul" <paul_mak@.hotmail.com> wrote in message
news:eWZLuvhdGHA.2456@.TK2MSFTNGP04.phx.gbl...
> I need to set up the security on the Reporting Services such that user can
> view the reports ONLY through a ReportViewer control on a asp.net web page
> ie not allow to navigate all other folders or areas in the Report Manager.
> Reporting services is installed on a stand alone server (not belong to any
> domain, no AD set up) running on Windows 2003 server. Currently I
configured
> the "Report Manager" and "ReportServer" web site to allow annonyous
access.
> However some users know how to bypass the web application and directly
enter
> the IP address/reports of the stand alone server to view all the reports.
> The asp.net page has built-in security to filter out the reports listed on
> the page based on the user login and password. This web application is
also
> hosted at the stand alone server and is connected to a remote Sql server.
> The web application is using the sql security.
>|||Hi Paul.
The only way I know of is to have your web site's app pool use an identity
that is the only identity that is allowed to hit the reports.
For example, you might set up a service account called "WebApp1SvcAcct".
give that account and administrators group privileges in reporting services,
but not the rest of your users. This might be only half the solution. It's
been a while since we've had to deal with this.
-Tim
"Paul" <paul_mak@.hotmail.com> wrote in message
news:eWZLuvhdGHA.2456@.TK2MSFTNGP04.phx.gbl...
>I need to set up the security on the Reporting Services such that user can
>view the reports ONLY through a ReportViewer control on a asp.net web page
>ie not allow to navigate all other folders or areas in the Report Manager.
>Reporting services is installed on a stand alone server (not belong to any
>domain, no AD set up) running on Windows 2003 server. Currently I
>configured the "Report Manager" and "ReportServer" web site to allow
>annonyous access. However some users know how to bypass the web application
>and directly enter the IP address/reports of the stand alone server to view
>all the reports. The asp.net page has built-in security to filter out the
>reports listed on the page based on the user login and password. This web
>application is also hosted at the stand alone server and is connected to a
>remote Sql server. The web application is using the sql security.
>
How to set the ReportPath for the reportviewer control
In my solution I've got 2 projects. ABCWeb is my website and ABCReports is a Report Server project.
In ABCWeb I have an aspx page that has a single reportviewer control on it which is intended to display the various reports that are in ABCReports . I am not using the Reports Server. I just simply want to set the property of the reportviewer control under LocalReport.ReportPath to the location of the report in ABCReports .
I keep getting this error no matter how I try to reference it.
what am I doing wrong
try something like this
RVcl.LocalReport.ReportPath ="ABCReports/Reports/rptNoticeOfDecision.rdl";
-remove the first /
I assume ABCreports is a sub folder of the application root
Friday, March 9, 2012
How to set ReportViewer DataSource to a Custom Collection in Another Project
I found what I think is a simpler and better solution, especially because the reportviewer control seems be a long way from WYSIWYG. My solution doesn't use a report viewer control at all. Here's what I did.
My web page has a formview control with a "Report" button. The formview control itemcommand event checks for which button has been clicked and executes the following code behind for the Report button:
' get the data
Dim bll As New CovAdm.BLL.InitialInspectionMgr
Dim col As CovAdm.BLL.InitialInspectionCollection
Dim lngParcelID As Long = MySession.ParcelSearchResultDetailParcelID(Session)
col = bll.LoadForParcelID(lngParcelID, "ParcelID", "ASC")
' use the default file name for cases that have no file name
' use a physical path because local reports don't work with virtual paths
For Each ii As CovAdm.BLL.InitialInspection In col
If String.IsNullOrEmpty(ii.FQPhotoFileName) Then
Dim str As String = AppConfigurationMgr.PhotoNotAvailableRelativeFile()
str = Server.MapPath(str)
ii.FQPhotoFileName = str
End If
Next
' set up the report
Dim lr As New Microsoft.Reporting.WebForms.LocalReport
lr.ReportPath = Server.MapPath("~/Home/Report/rptInitialInspection.rdlc")
lr.EnableExternalImages = True
lr.DataSources.Clear()
' make sure we use the correct data source name
Dim rds As New Microsoft.Reporting.WebForms.ReportDataSource("dsrptInitialInspection_dtrptInitialInspection", col)
lr.DataSources.Add(rds)
' show the file dialog for opening or saving the pdf verion of the report
Utility.ShowLocalReport(Response, lr)
The code from my Utility class is shown below:
Public Shared Sub ShowLocalReport _
( _
ByVal vResponse As System.Web.HttpResponse, _
ByVal vlr As Microsoft.Reporting.WebForms.LocalReport _
)
'
' Aruments
' ========
' vResponse - HttpResponse object from calling page
' vlr - LocalReport object from calling page
'
' the procedure is currently limited to PDF format
Dim strFormat As String = "PDF"
Dim strMimeType As String = Nothing
Dim strEncoding As String = Nothing
Dim strFileExt As String = Nothing
' the default filename for saving will be the name if the rdlc file
Dim strFileName As String = System.IO.Path.GetFileNameWithoutExtension(vlr.ReportPath)
Dim astrStream() As String
Dim aWarning() As Microsoft.Reporting.WebForms.Warning
Dim aBytes As Byte()
' render the report
aBytes = vlr.Render(strFormat, Nothing, strMimeType, strEncoding, strFileExt, astrStream, aWarning)
' show the open / save dialog
vResponse.Clear()
vResponse.ContentType = "application/" & strFormat
vResponse.AddHeader("content-disposition", "attachment; filename=" & strFileName & "." & strFileExt)
vResponse.BinaryWrite(aBytes)
vResponse.End()
End Sub