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. C# with Ms Access , Crystal Reports and Windows Application.

C# with Ms Access , Crystal Reports and Windows Application.

Scheduled Pinned Locked Moved C#
tutorialquestioncsharpdatabasesysadmin
3 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.
  • J Offline
    J Offline
    jimish1
    wrote on last edited by
    #1

    Hi, I am not pretty sure whether this is the exact forum for my question, so if I am in the wrong one..I am sorry..! My problem : I am developing a Windows Application in C# and I have to play around with Crystal Reports. This would be my first DesktopApplication and I am really messing around. I am though fond of Web Applications. My application requires a MsAccess Database file and A crystal Report.This database file is to be kept in a shared location, from where it has to be accessed. For calling reports, I don't know how to set path. As of now I am setting the actual local path of the report on my machine where I am developing the code.. [@"C:\blah\blah\report1.rpt"] and setting this file in the reportDocument.Load(path) event. How should I go about it for setting this path as dynamic. I tried using server.mappath but there is no such method supported.How should I load report from a dynamic path into reportDocument..? Is there any other way out?? Also can I store both the crystal report files and Ms Access file, in one location and access it from my application..? Is this possible..? How should be the database file / connection string set for accessing the .mdb file on the shared folder..?? I am new to this publishing method.. so if someone can throw some light on the same ,so that I can run .exe file on any machine and can access the .mdb file from the shared server. Do post example path setting..!! Cheers..

    Jimish

    G 1 Reply Last reply
    0
    • J jimish1

      Hi, I am not pretty sure whether this is the exact forum for my question, so if I am in the wrong one..I am sorry..! My problem : I am developing a Windows Application in C# and I have to play around with Crystal Reports. This would be my first DesktopApplication and I am really messing around. I am though fond of Web Applications. My application requires a MsAccess Database file and A crystal Report.This database file is to be kept in a shared location, from where it has to be accessed. For calling reports, I don't know how to set path. As of now I am setting the actual local path of the report on my machine where I am developing the code.. [@"C:\blah\blah\report1.rpt"] and setting this file in the reportDocument.Load(path) event. How should I go about it for setting this path as dynamic. I tried using server.mappath but there is no such method supported.How should I load report from a dynamic path into reportDocument..? Is there any other way out?? Also can I store both the crystal report files and Ms Access file, in one location and access it from my application..? Is this possible..? How should be the database file / connection string set for accessing the .mdb file on the shared folder..?? I am new to this publishing method.. so if someone can throw some light on the same ,so that I can run .exe file on any machine and can access the .mdb file from the shared server. Do post example path setting..!! Cheers..

      Jimish

      G Offline
      G Offline
      Greg Chelstowski
      wrote on last edited by
      #2

      Since you are an ASP.NET developer, I'm sure you keep all your connectionString information and other valuable configuration settings in web.config. You can do a similar thing with the app.config file in C# winforms. The rules of accessing the app.config are very similar, you call the ConfigurationManager class to extract values from the file. So if your .mdb file path is //192.168.0.1/something.mdb just add a key into the app.config, I guess. And yes it is possible to access both the .mdb and the .rpt files from a shared location. :)

      var question = (_2b || !(_2b));

      J 1 Reply Last reply
      0
      • G Greg Chelstowski

        Since you are an ASP.NET developer, I'm sure you keep all your connectionString information and other valuable configuration settings in web.config. You can do a similar thing with the app.config file in C# winforms. The rules of accessing the app.config are very similar, you call the ConfigurationManager class to extract values from the file. So if your .mdb file path is //192.168.0.1/something.mdb just add a key into the app.config, I guess. And yes it is possible to access both the .mdb and the .rpt files from a shared location. :)

        var question = (_2b || !(_2b));

        J Offline
        J Offline
        jimish1
        wrote on last edited by
        #3

        Ohh great..that sounds good..if this works...as in reports and mdb both on shared folder..will solve much of my probs..thnks..!

        Jimish

        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