none
Crystalreports with the name of the server RRS feed

  • Question

  • I have just finished an application form by using c# but the problem is : 
    The application was created on my personal computer which contains crystalreports , you know that crystalreport are connected to the database with the name of the server and the connectionstring  by using the assistant   so if I install it on another computer surely there is another server name. so could I open them on another machine. if not ! How
    and thank you a lot   
    mercredi 28 décembre 2011 02:11

Réponses

  • Greetings Amene_Med,

    My prefered way to handle that kind of issue is to link the Crystal Reports on Datasets.

    You can create a Dataset using the designer and assign it's connection string to one setup in the app.config file, for instance.

    This offer more portability when you have to deploy the application in several different environments.

    Hope this helps !


    Steve Hémond
    • Marqué comme réponse Amine_Med mercredi 28 décembre 2011 03:38
    mercredi 28 décembre 2011 02:50
  • It's just a matter of allowing users of your separate / different environments to setup their own connection to their own database server.

    Either using the app.config file, an xml or text file, etc. is good to keep the connection string, as long as the users (or preferably the local administrator) can change it easily.

    You should have done a configuration section in your software to allow the users to select their own database server so your code (for instance, the datasets used by your Crystal Reports) will reflect these changes.

    Best regards.


    Steve Hémond
    mercredi 28 décembre 2011 04:09

Toutes les réponses

  • Greetings Amene_Med,

    My prefered way to handle that kind of issue is to link the Crystal Reports on Datasets.

    You can create a Dataset using the designer and assign it's connection string to one setup in the app.config file, for instance.

    This offer more portability when you have to deploy the application in several different environments.

    Hope this helps !


    Steve Hémond
    • Marqué comme réponse Amine_Med mercredi 28 décembre 2011 03:38
    mercredi 28 décembre 2011 02:50
  • Yes I see that it is a good idea but I had never worked on it. That's why I couldn't use this sort of solution.
    Now I have the idea thank you brother. I'm gonna search a tutorial to show me how
    Another things the file App.Config contains the connection string but what's the deffirence between 
    using a file App.Config and Using a simple class in which u already wrote the string of connection. 
    mercredi 28 décembre 2011 03:35
  • It's just a matter of allowing users of your separate / different environments to setup their own connection to their own database server.

    Either using the app.config file, an xml or text file, etc. is good to keep the connection string, as long as the users (or preferably the local administrator) can change it easily.

    You should have done a configuration section in your software to allow the users to select their own database server so your code (for instance, the datasets used by your Crystal Reports) will reflect these changes.

    Best regards.


    Steve Hémond
    mercredi 28 décembre 2011 04:09