tag:blogger.com,1999:blog-4580967133432571992.comments2023-09-10T09:59:44.257+01:00$>. Alex Lea's BlogUnknownnoreply@blogger.comBlogger14125tag:blogger.com,1999:blog-4580967133432571992.post-34272736466655974252012-10-30T02:37:51.797+00:002012-10-30T02:37:51.797+00:00If you want to change build number via nextBuildNu...If you want to change build number via nextBuildNumber file you should "Reload Configuration from Disk" from "Manage Jenkins" page.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-63651336708833690062012-01-19T09:10:26.879+00:002012-01-19T09:10:26.879+00:00Great post, exactly what I needed!
The following c...Great post, exactly what I needed!<br />The following can save a few minutes to anyone wanting to use a shell command to bump the build # of another jenkins job:<br /><br />bn=`expr $BUILD_NUMBER + 1`<br />curl --user "user:pass" --data "nextBuildNumber=$bn" --header "Content-Type: application/x-www-form-urlencoded" http://myhudsonserver:8080/job/myhudsonjobname/nextbuildnumber/submitGilleshttps://www.blogger.com/profile/15798939670831395742noreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-17454499696381252352010-12-05T00:32:33.538+00:002010-12-05T00:32:33.538+00:00I know this is an old post... but I was having all...I know this is an old post... but I was having all sorts of difficulties trying to determine how to change the hard coded database location for a report using an Access database.<br /><br />The following code sets the location of an Access database at run time:<br /><br />// Load up the report<br />_report = new ReportDocument();<br />_report.Load(_report_file);<br /><br />// Set the actual database location<br />_report.DataSourceConnections[0].SetConnection(Properties.Settings.Default.DatabaseLocation + "\\" + Properties.Settings.Default.DatabaseFilename, "", "Admin", "");<br /><br />// Set report to the viewer<br />reportViewer.ReportSource = _report;<br /><br />This code assumes that you are using only one database in the report. You may have to use more than one of the DataSourceConnections[] for your report.<br /><br />Good luck!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-73112868177031506122010-07-15T12:33:10.870+01:002010-07-15T12:33:10.870+01:00I don't get the password in LogonProperties ob...I don't get the password in LogonProperties object and hence the login fails. I have't used any kind of encryption. I do get the User name, etc but not the password!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-20229890916598228602009-04-06T18:19:00.000+01:002009-04-06T18:19:00.000+01:00Tristan,The code that you have didnt work for me w...Tristan,<BR/><BR/>The code that you have didnt work for me when the report is already assigned (during design time) to the crystalviewer.<BR/><BR/>What worked is this:<BR/><BR/>string _connectionString = ConfigurationManager.ConnectionStrings["connection"].ConnectionString;<BR/> SqlConnectionStringBuilder SConn = new SqlConnectionStringBuilder(_connectionString);<BR/> <BR/> this.CrystalReportSource1.ReportDocument.DataSourceConnections[0].SetConnection(SConn.DataSource, SConn.InitialCatalog, SConn.UserID, SConn.Password);BNayaknoreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-69683356382403256452009-04-04T23:26:00.000+01:002009-04-04T23:26:00.000+01:00The following seems to work fine for me: protec...The following seems to work fine for me:<BR/><BR/> protected void Page_Init(object sender, EventArgs e)<BR/> {<BR/> System.Data.SqlClient.SqlConnectionStringBuilder SConn = new System.Data.SqlClient.SqlConnectionStringBuilder(ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString);<BR/> <BR/> ReportDocument doc = new ReportDocument();<BR/> doc.Load(Server.MapPath("Crystalreport.rpt"));<BR/> <BR/> doc.SetDatabaseLogon(SConn.UserID, SConn.Password, SConn.DataSource, SConn.InitialCatalog);<BR/><BR/> CrystalReportViewer1.ReportSource = doc;<BR/> <BR/> }Tristan Colliernoreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-22060024102585862262009-02-18T17:33:00.000+00:002009-02-18T17:33:00.000+00:00I developed something like Krishna said. It's in V...I developed something like Krishna said. It's in Vb.net:<BR/><BR/> Dim myConnectionInfo As New ConnectionInfo<BR/> Dim myConnectionString As String = ConfigurationManager.ConnectionStrings("dbConnection").ConnectionString()<BR/><BR/> myConnectionInfo.ServerName = getPartConnectionString("Data Source", myConnectionString)<BR/> myConnectionInfo.DatabaseName = getPartConnectionString("Initial Catalog", myConnectionString)<BR/> myConnectionInfo.UserID = getPartConnectionString("User ID", myConnectionString)<BR/> myConnectionInfo.Password = getPartConnectionString("PWD", myConnectionString)<BR/><BR/> Private Function getPartConnectionString(ByVal part As String, ByVal _connectionString As String) As String<BR/><BR/> Dim inicio As Integer<BR/> Dim partTemp As String<BR/> Dim partResult As String<BR/><BR/> inicio = InStr(_connectionString, part) + Len(part) + 1<BR/><BR/> For contPartConn As Integer = inicio To Len(_connectionString)<BR/> partTemp = Mid(_connectionString, contPartConn, 1)<BR/> If partTemp = ";" Then Exit For<BR/> partResult += partTemp<BR/> Next<BR/><BR/> Return partResult<BR/><BR/> End FunctionUnknownhttps://www.blogger.com/profile/18368917593547953867noreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-35287468664683423642008-10-10T12:23:00.000+01:002008-10-10T12:23:00.000+01:00Thanks it sure help me.In a shity away as you said...Thanks it sure help me.<BR/>In a shity away as you said :). Unfortunly i didn't found another way either.<BR/><BR/>See youAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-3142583677490399202008-06-17T10:23:00.000+01:002008-06-17T10:23:00.000+01:00Interesting. Do you have more than one connection ...Interesting. Do you have more than one connection in your report? The posted code does assume there is a single data connection hence the hard coded [0] index - this would need changing if you had several. <BR/><BR/>Good to see another solution to this irritating and unnecessary problem.Alex Leahttps://www.blogger.com/profile/07491382584939864847noreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-69475304522851335552008-06-17T07:57:00.000+01:002008-06-17T07:57:00.000+01:00Mate,I don't think your solution actually works.I'...Mate,<BR/><BR/>I don't think your solution actually works.<BR/><BR/>I've wasted 3 hrs in my life trying / hoping it would ... but nah.<BR/><BR/>It compiles and all (since I'm using CR XI rel 2, VS 2005, ASP.NET .NET Fx 2.0 with a SQL Server 2005 database.<BR/><BR/>Sorry. But in the end I just had to go and do some shitty code like this: <BR/><BR/>----------------<BR/><BR/>string connectionString = ConfigurationManager.ConnectionStrings["MyConnectionStringName"].ConnectionString;<BR/><BR/> //Trace.Warn("cnn = " + connectionString);<BR/> NameValueCollection nvcol = Util.GetConnectionParts(connectionString);<BR/><BR/> //shitty code warning: due to shitty library from Crystal reports:<BR/> string user = nvcol.Get("User ID");<BR/> string pwd = nvcol.Get("Password");<BR/> string server = nvcol.Get("Data Source");<BR/> string db = nvcol.Get("Initial Catalog");<BR/> doc.SetDatabaseLogon(user, pwd, server, db);<BR/> //shitty code end<BR/><BR/>----------Krishnahttps://www.blogger.com/profile/00251708282236795124noreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-28465969898845135132008-02-27T22:04:00.000+00:002008-02-27T22:04:00.000+00:00hemant:NameValuePairs2 is a type of the CrystalDec...hemant:<BR/><BR/>NameValuePairs2 is a type of the CrystalDecisions.Shared namespace<BR/><BR/>You can either add a "using" statement to include CrystalDecisions.Shared namespace or declare CrystalDecisions.Shared.NameValuePairs2.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-65407249210108063472008-01-16T14:49:00.000+00:002008-01-16T14:49:00.000+00:00Apart from getting the error 'CrystalDecisions.Sha...Apart from getting the error 'CrystalDecisions.Shared.IConnectionInfo' does not contain a definition for 'LogonProperties' <BR/><BR/>I failed to undersatnd what is this type declaration NameValuePairs2() ?<BR/>Couldn't find any reference to itUnknownhttps://www.blogger.com/profile/18423229088236278358noreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-39122741926800660192007-09-07T09:09:00.000+01:002007-09-07T09:09:00.000+01:00I too encountered this error using an older versio...I too encountered this error using an older version of Crystal Reports where the documented methods were not available. I downloaded the latest version of the runtime through the rather confusing BusinessObjects site and that seemed to fix the problems. <BR/><BR/>I'm using Crystal Reports XI Release 2.<BR/><BR/>It does work, honest :)Alex Leahttps://www.blogger.com/profile/07491382584939864847noreply@blogger.comtag:blogger.com,1999:blog-4580967133432571992.post-52061169517048198762007-08-15T09:31:00.000+01:002007-08-15T09:31:00.000+01:00Hi, I have been searching for some documentation o...Hi, I have been searching for some documentation on how to do this for some time now. Quite frustrating. <BR/>Anyhow, I am having trouble trying to get your code snippet to work for me. The problem is the 'LogonProperties' & 'SetLogonProperties' methods. I am getting compiler error CS0117:'CrystalDecisions.Shared.IConnectionInfo' does not contain a definition for 'LogonProperties' etc.<BR/>Do you have any further advice on what I need to do to define these methods?Unknownhttps://www.blogger.com/profile/01261688810006038605noreply@blogger.com