Home > Crystal Reports > Crystal Reports Applylogoninfo Not Working

Crystal Reports Applylogoninfo Not Working

Reproducing the Issue Use Crystal Reports 2008 SP2 to create a report with dynamic parameter(s) Use the following code from the Crystal Reports SDK for VS .NET Dim crDatabase As Database I'll let everyone out there make their own minds upon where the problem lies.Thanks again! Code ladder, Robbers Can Newton's laws of motion be proved (mathematically or analytically) or they are just axioms? for (int i = 0; i < crTables.Count; i++) { crTable = crTables[i]; crTableLogOnInfo = his comment is here

Is there any way for a planet orbiting a red dwarf in the habitable zone to not be tidally locked? How can one read a file or change a file bits without reading the entire file. For that purpose, the CrystalHelper class also features a property IntegratedSecurity. For this purpose, the helper class implements two methods which require you to pass the HttpResponse object. why not find out more

It appeared that the report somehow remembered an old connection with integrated security, which I was using during the development. Following is what they suggested and it works like a charm. I'm sure that all of the parameters of this function are right. The code would then look like this: private void PrintReport() { using (LCrystalHelper helper = new LCrystalHelper(new TestReport())) { helper.DatabaseName = "DatabaseName"; helper.ServerName = "ServerName"; helper.UserId = "User"; helper.Password = "Password";

  1. License This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL) Share email twitter facebook linkedin reddit google+ About the Author Jan
  2. In my case the following solution worked for Crystal Reports 10.5.3700.
  3. Assign values to the parameter fields.
  4. I kept getting Logon Failed exceptions.
  5. When you develop a report, this is usually a connection to your development database.
  6. I've done this and have the report working while within VS 2005.

Once I execute the ApplyLogOnInfo, it seems to have restored the original connection, provided in the report itself.Any idea why ApplyLogOnInfo doesn't accept my changes?Thx. table.ApplyLogOnInfo(logOnInfo); } } } The demo solution, which you can download, demonstrates a lot of the features of this class. This will be very interesting for me.

Cancel Red Flag SubmittedThank you for helping keep Tek-Tips Forums free from inappropriate posts.The Tek-Tips staff will check this out and take appropriate action. I use VS2005 and Crystal2008. Join your peers on the Internet's largest technical computer professional community.It's easy to join and it's free. https://social.msdn.microsoft.com/Forums/en-US/ade66c3c-33ba-4b7c-bfba-660ca3e3846f/applylogoninfo-does-not-work?forum=vscrystalreports can somebody know how to do this in half half sheet within one paper..pls if anyone knows pls post answer as soon as possible..

I will add to my question the only solution that worked, thanks for sharing Lan. June 12, 2007 Implemented export to HttpResponse. I knew there was an error that I can't change from integrated security to non-integrated security, so I set my own database to use regular user and password credentials. I tried many different variationson that code, trying to identify the one thing I was doing wrong, butin the end the problem turned out to be something entirely different.It turns out

I tried to used the library in my C# window's application using VS 2008. http://forums.asp.net/t/893328.aspx?problem+using+ApplyLogOnInfo+in+Crystal+Report I found the following resources to be very useful when you need to do something with Crystal Reports: Crystal knowledge base at Business Objects Forums section on BusinessObjects.com Crystal Reports forum The installation files does not include the reports in rpt format. The_Collector10-Sep-09 22:11 The_Collector10-Sep-09 22:11 foreach (CrystalDecisions.CrystalReports.Engine.Section section in rpt.ReportDefinition.Sections) { // In each section we need to

Registration on or use of this site constitutes acceptance of our Privacy Policy. this content Use a datatable or dataset as the data source for the report. Having separate test and real (production) word is probably the best scenario. Function to find all occurrences of substring Mimsy were the Borogoves - why is "mimsy" an adjective?

The typecasting from an object to ReportDocument doesnt work properly and the application crashes. public static void CrystalReportLogOn(ReportDocument reportParameters, string serverName, string databaseName, string userName, string password) { TableLogOnInfo logOnInfo; ReportDocument subRd; Sections sects; ReportObjects ros; SubreportObject sro; if (reportParameters == null) { throw new Their is no error message while trying to execute the code, but the point where we iterate tables andassign new connection info gets very slow whenDatabase used for design time is weblink Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free!

And who are »they«? i made a DB using VS2010 (installed SQL server 2008 with the VS 2010 … Recommended Articles Refresh a Form after Delete query is successfully executed VB 2010 Last Post 17 Close Reply To This Thread Posting in the Tek-Tips forums is a member-only feature.

Crystal reports Viewer database logon parameter screen prompts for login.

Sockman Sign In·ViewThread·Permalink System.AccessViolationException hsalim15-Sep-08 9:42 hsalim15-Sep-08 9:42 I am using the AssignConnection method in my code and am getting this exception when i close the project. For example if the report is 'DemoReport.rpt' with the associated DemoReport.cs, i was doing something like this: DemoReport rpt = new DemoReport(); ConnectionInfo crConnectionInfo = new ConnectionInfo(); crConnectionInfo.ServerName = "Server_Name"; crConnectionInfo.DatabaseName However if I run the report from another PC or if I change the database name on my PC (in the configuration file) the report does not work. I can publish all the code to change connection information but I think it doesn't worth, it's well known.

The first of these methods will simply write the exported file to the response: helper.Export(Response, CrystalExportFormat.PortableDocFormat); This will result in the report being shown inside the client internet browser, provided the objReports.Subreports(0).SetParameterValue("no", 1)

Mathi Proposed as answer by Mathivanan K - Thomson Reuters Tuesday, August 19, 2008 5:56 AM Tuesday, August 19, 2008 5:56 AM Microsoft is conducting an online survey to understand We have 3 environments, development, deployment in production (shared) and local computers. check over here I believe i found the error but I don't know why is happening since I developed similar applicaitons using Crystal reports.

Are you aComputer / IT professional?Join Tek-Tips Forums! I made a huge research through all the forums and I tried every single solution. Any kind of help or assistance will be appreciated. Assign a database connection to a report.

This works. HOME | FREE EBOOK | PROGRAMMING GUIDE | PURCHASE | REVIEWS | CONTACT ME | FAQ | LINKS | JAVASCRIPT FORUM © 2004-2016 Brian Bischof. You will need to include using CrystalDecisions.CrystalReports.Engine public void ViewReport(FileInfo crFileInfo) // path\filename.rpt { ConnectionInfo crConnectionInfo = new ConnectionInfo(); crConnectionInfo.ServerName = "YOUR SERVER NAME"; crConnectionInfo.DatabaseName = "YOUR DATABASE NAME"; crConnectionInfo.UserID = This is often an indication that other memory is corrupt.

It works perfectly alright in VB.Netapplications; just make sure you have an ODBC data source setup in the system.Dim crParameterFields As ParameterFieldsDim crParameterField As ParameterFieldDim crParameterValues As ParameterValuesDim crParameterDiscreteValue As ParameterDiscreteValuePrivate try the below function....!!! That seems to suggest that CR no longer supports ApplyLogOnInfo, at least the way it used to. fast freddie "The larger the island of knowledge, the longer the shoreline of wonder" - Ralph W.

The code to do this will look like this: // Now assign the dataset to all tables in the main report // _reportDocument.SetDataSource(dsReportData); // Now loop through all the sections // Why are auto leases stubbornly strict about visa status and how to work around that? Thanks Sign In·ViewThread·Permalink Can this be used for an ODBC connection? hoping for your solution...

Otherwise i guess i will have to manually copy all the rpt files along with the installation. 0 DdoubleD 315 7 Years Ago In the last example I gave, I used Here is the code I am using to call the CrystalHelper class: string reportPath = Path.Combine(ConfigurationManager.AppSettings["ReportPath"], REPORT_NAME); CrystalHelper crystalHelper = new CrystalHelper(reportPath, string.Empty, string.Empty, ConfigurationManager.AppSettings["UserID"], ConfigurationManager.AppSettings["Password"]); crystalHelper.SetParameter(PARAM_QUERY, query); crystalHelper.SetParameter(PARAM_EMPLOYEE_NO, I would like to ask for tips on how to handle database concurrency in a client server application in c#. We design report with connection info provided atdesign time and override this connection info at runtime withConnection details fromWEB.config following code we used, sets connection info from WEB.config and is working

I'm sure that part works fine.