Uploading SS Reports

Discussion in 'Visual Studio' started by mambo, Jul 14, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi

    I have been trying to upload my reports to remote server for several days now without success. I am able to read and update the Ms SQL database, so I believe the database is good. See www.conflictracker.org/viewdata.aspx.
    </o:p>
    I have also managed to upload a report using the Control Panel to the folder /conflictrac/reports.
    </o:p>
    This report should be displayed from this page http://conflictracker.org/reportforms/global.aspx using ReportViewer tool. I suspect that it is not displaying because my datasource settings are not correct. My local datasource is
    Data Source=LAPTOP;AttachDbFilename="D:\VWD Sites\PeaceNet\App_Data\Tracker.mdf". I cant figure out what to change it to in the remote server.
    </o:p>
    The settings on the reportviewer in my aspx page are as follows:

    Choose Report: <ServerReport>
    Report Server URL: https://rs2k501.discountasp.net
    ReportPath: /Conflictrac/Reports/GlobalReport
    </o:p>
    Can somebody figure out how i can display my reports?
    </o:p>
    thanks.
    Mambo
     
  2. You need the path to your SQL Server DB, it's shown inthe SQL Server section of your Control Panel.


    Also...Do youhave the TargetServerURL correct.
    If you hit that link can you login?
    Or does this work? https://rs2k501.discountasp.net/ReportServer
     
  3. Hi
    Thank you very much! i discovered I had an earlier instruction that confused me on the set up. I now have the proper settings and I have managed to upload a report using Visual Studio. However, when I try to view the report here www.conflictracker.org/reportforms/global.aspx, I get this error:

    The request failed with HTTP status 401: Unauthorized.

    My settings are as follows:

    Datasource (which I copied from the Ms SQL control panel, the same one I use to view the data)

    "Data Source=tcp:sql2k514.discountasp.net;Initial Catalog=SQL2005_512959_tracker;User ID=SQL2005_512959_tracker_user;Password=******;" I have changed the password to plain text.

    The setting on my SSRS environment are:
    Share Datasources folder: tracker.rds
    Reports folder: GlobalReport.rdl

    TargetDatasourceFolder: /conflictrac/reports
    TargetReportsFolder: /conflictrac/reports
    TargetServerURL: https://rs2k501.discountasp.net/ReportServer


    The settings or ReportViewer in the global.aspx page are:
    Choose Report: <ServerReports>
    Report Server URL: https://rs2k501.discountasp.net/ReportServer
    Report Path: /Conflictrac/reports/GlobalReport

    Could you help me find what is missing?

    thanks.
    Mambo (I had travelled thus delay in getting back on this)

    Mambo
     
  4. Thanks Aristotle, Wisemx


    I think I am on the right track, just cant seem to place some of the code properly


    I want to assume that all the code starting with Implements ... are supposed to be comments because they are all picked as errors. Help adviced that I move them up or delete them. So I have commented all of them out.


    Then this code enbolded below just generates error wherever I try to place it in the web.config:


    </mailSettings>


    </system.net>


    <appSettings>


    ' <add key="MyReportViewerUser" value="rs_512959"/>


    ' <add key="MyReportViewerPassword" value="*****"/>


    ' <add key="MyReportViewerDomain" value="conflictracker.org" />


    </appSettings>


    </configuration>
    Could you advice a better place for me; see above I try to place it just before closing </configuration> but its still caught with this error message:
    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: The configuration section cannot contain a CDATA or text element.

    Finally, if this code will give me the solution, I would like to paste it here so you can all see how I have edited it for my case, in case someone else finds it confusing like i did at the begining:




    Imports System.Net


    Imports System.Security.Principal


    Imports Microsoft.Reporting.WebForms


    Partial Class ReportForms_Global 'this line refers to the location of your reportviewer page


    Inherits System.Web.UI.Page


    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init


    ReportViewer1.ServerReport.ReportServerCredentials = New MyReportServerCredentials()


    End Sub


    End Class


    <Serializable()> Public NotInheritable Class MyReportServerCredentials


    'Implements IReportServerCredentials


    Public ReadOnly Property ImpersonationUser() As WindowsIdentity


    'Implements IReportServerCredentials.ImpersonationUser


    Get


    'Use the default windows user. Credentials will be


    'provided by the NetworkCredentials property.


    Return Nothing


    End Get


    End Property


    Public ReadOnly Property NetworkCredentials() As ICredentials


    'Implements IReportServerCredentials.NetworkCredentials


    Get


    Dim userName As String = ConfigurationManager.AppSettings("MyReportViewerUser")


    If (String.IsNullOrEmpty(userName)) Then


    Throw New Exception("Missing user name from web.config file")


    End If


    'Password


    Dim password As String = ConfigurationManager.AppSettings("MyReportViewerPassword")


    If (String.IsNullOrEmpty(password)) Then


    Throw New Exception("Missing password from web.config file")


    End If


    'Domain


    Dim domain As String = ConfigurationManager.AppSettings("MyReportViewerDomain")


    If (String.IsNullOrEmpty(domain)) Then


    Throw New Exception("Missing domain from web.config file")


    End If


    Return New NetworkCredential(userName, password, domain)


    End Get


    End Property


    Public Function GetFormsCredentials(ByRef authCookie As Cookie, ByRef userName As String, ByRef password As String, ByRef authority As String) As Boolean


    'Implements IReportServerCredentials.GetFormsCredentials


    authCookie = Nothing


    userName = Nothing


    password = Nothing


    authority = Nothing


    'Not using form credentials


    Return False


    End Function


    End Class


    If nothing is amiss, I hope I should be able to view my reports once I sort out the web.config code.


    Thanks.




    Mambo

    Post Edited (mambo) : 7/24/2008 6:37:48 AM GMT
     
  5. Hi,
    Remove those ticsand move your key section within </system.net>, not below it.
    Your custom appsettings can even be the first thing in your configuration area if you want.

     
  6. Thanks, Mark. the web.config worked.


    However, I am bowing out of this: it has taken too much time and now that the web.config is working, there is a completely new set of errors in the .vb codes starting from the very first line.


    Thanks a lot for your help, though. I will try it another day when there is a simpler way. it is amazing how everything works so well on my local computer and just gets so complex when I go tohostedserver!


    Mambo
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page