{"id":112,"date":"2007-06-07T00:26:35","date_gmt":"2007-06-06T23:26:35","guid":{"rendered":"http:\/\/blog.pczone.be\/?p=112"},"modified":"2007-06-07T00:26:35","modified_gmt":"2007-06-06T23:26:35","slug":"crystal-reports-in-vsnet-2005","status":"publish","type":"post","link":"https:\/\/blog.pczone.be\/?p=112","title":{"rendered":"Crystal Reports in VS.NET 2005"},"content":{"rendered":"<p>For a client I had created a couple of records. Problem was that they another company had developed stuff in Access and I had to integrate with that <strong>flat file<\/strong>. The Access file was located on a network share. When I developed it was on my local disk and when I deployed my Typed Dataset objects were updated automatically. The crystal reports however didn&#8217;t get updated. After a long time I finally found a solution for setting the database location @ runtime.<\/p>\n<p><code><br \/>\nCrystalReport1 rep = new CrystalReport1();<br \/>\nTableLogOnInfo logOnInfo = new TableLogOnInfo();<br \/>\nlogOnInfo =rep.Database.Tables[0].LogOnInfo;<br \/>\nConnectionInfo connectionInfo = new ConnectionInfo ();<br \/>\nconnectionInfo = logOnInfo.ConnectionInfo;<br \/>\nconnectionInfo.DatabaseName = \"Database\";<br \/>\nconnectionInfo.ServerName = \"Server\";<br \/>\nconnectionInfo.Password = \"pwd\";<br \/>\nconnectionInfo.UserID = \"uid\";<br \/>\nrep.Database.Tables [0].ApplyLogOnInfo(logOnInfo);<br \/>\n<\/code><\/p>\n<p>There&#8217;s one stupid thing here. I had made my application so that I gave my report as string param. The application that woud look in the application path for that report. This way I could update my reports without redeploying. Unfortunately if you do it like this I didn&#8217;t find a way to access the tables of my report. The reportview seems to not give you the actual CrystalReport object when you load it from a string???<\/p>\n<p>Well in in the end it works, that&#8217;s all that matters!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For a client I had created a couple of records. Problem was that they another company had developed stuff in Access and I had to integrate with that flat file. The Access file was located on a network share. When I developed it was on my local disk and when I deployed my Typed Dataset &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.pczone.be\/?p=112\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Crystal Reports in VS.NET 2005&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[6,4],"tags":[],"class_list":["post-112","post","type-post","status-publish","format-standard","hentry","category-c","category-informatics"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3U9nk-1O","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/blog.pczone.be\/index.php?rest_route=\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pczone.be\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pczone.be\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pczone.be\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pczone.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=112"}],"version-history":[{"count":0,"href":"https:\/\/blog.pczone.be\/index.php?rest_route=\/wp\/v2\/posts\/112\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pczone.be\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pczone.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pczone.be\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}