Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Crystal Reports

Crystal Reports

Scheduled Pinned Locked Moved C#
csharpdesignsysadmintutorialquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gavin_Mannion
    wrote on last edited by
    #1

    Hi All, I am trying to view some Reports online through my Internet site. I am using C# on a Windows 2000 server running IIS5. I have looked around the internet and found some examples but they are not working. I have the following at the moment.

    In design view I cn now see my report, but when I compile and view my page I get

    CS1009: Unrecognized escape sequence

    ???? Can someone let me know where I am going wrong and how to sort this out. Thanks, Gavin

    A 1 Reply Last reply
    0
    • G Gavin_Mannion

      Hi All, I am trying to view some Reports online through my Internet site. I am using C# on a Windows 2000 server running IIS5. I have looked around the internet and found some examples but they are not working. I have the following at the moment.

      In design view I cn now see my report, but when I compile and view my page I get

      CS1009: Unrecognized escape sequence

      ???? Can someone let me know where I am going wrong and how to sort this out. Thanks, Gavin

      A Offline
      A Offline
      Andy Smith
      wrote on last edited by
      #2

      it's the back slashes in your ReportSource string. why do you have it as a server side string??? change it to: ReportSource='C:\Inetpub\wwwroot\Outbreak\Reports\test.rpt'

      G 1 Reply Last reply
      0
      • A Andy Smith

        it's the back slashes in your ReportSource string. why do you have it as a server side string??? change it to: ReportSource='C:\Inetpub\wwwroot\Outbreak\Reports\test.rpt'

        G Offline
        G Offline
        Gavin_Mannion
        wrote on last edited by
        #3

        It was set as a server side string because that is how the Crystal Report Viewer set it itself. What I did was I dragged the CrystalReportViewer off the toolbox and dropped it onto my form. I then selected it and in the properties window click on the ... next to databindings. I then went into the ReportSource and put in the exact Source and clicked ok and it did the rest :)... I changed it as you suggested and am now getting the following error.

        Cannot create an object of type 'System.Object' from its string representation 'C:\Inetpub\wwwroot\Outbreak\Reports\test.rpt' for the 'ReportSource' property

        I'm sure this is meant to be a lot simpler than it has turned out to be? Thanks for the help

        A 1 Reply Last reply
        0
        • G Gavin_Mannion

          It was set as a server side string because that is how the Crystal Report Viewer set it itself. What I did was I dragged the CrystalReportViewer off the toolbox and dropped it onto my form. I then selected it and in the properties window click on the ... next to databindings. I then went into the ReportSource and put in the exact Source and clicked ok and it did the rest :)... I changed it as you suggested and am now getting the following error.

          Cannot create an object of type 'System.Object' from its string representation 'C:\Inetpub\wwwroot\Outbreak\Reports\test.rpt' for the 'ReportSource' property

          I'm sure this is meant to be a lot simpler than it has turned out to be? Thanks for the help

          A Offline
          A Offline
          Andy Smith
          wrote on last edited by
          #4

          ok, so try this: ReportSource='<%# "C:\\Inetpub\\wwwroot\\Outbreak\\Reports\\test.rpt" %>' or: ReportSource='<%# @"C:\Inetpub\wwwroot\Outbreak\Reports\test.rpt" %>'

          G 1 Reply Last reply
          0
          • A Andy Smith

            ok, so try this: ReportSource='<%# "C:\\Inetpub\\wwwroot\\Outbreak\\Reports\\test.rpt" %>' or: ReportSource='<%# @"C:\Inetpub\wwwroot\Outbreak\Reports\test.rpt" %>'

            G Offline
            G Offline
            Gavin_Mannion
            wrote on last edited by
            #5

            Okay well that has solved the invalid escape sequence thingie, BUT :) now I am getting the following error

            Source Error:

            An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

            Stack Trace:

            [NullReferenceException: Object reference not set to an instance of an object.]
            CrystalDecisions.Web..get_7() +189
            CrystalDecisions.Web.CrystalReportViewer.OnInit(EventArgs e) +352
            System.Web.UI.Control.InitRecursive(Control namingContainer) +235
            System.Web.UI.Control.InitRecursive(Control namingContainer) +179
            System.Web.UI.Control.InitRecursive(Control namingContainer) +179
            System.Web.UI.Page.ProcessRequestMain() +169

            Would this be a problem with the actual report (which seems to work fine of opened in Crystal) or is it still a coding error? Thanks

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups