Solved

Integrated Security RunTime Customization Crystal10 .NET

Posted on 2004-08-11
11
1,348 Views
Last Modified: 2012-06-21
Hello friends,

I have  a problem that I have been trying to solve for couple days now.

I have reports that connect to SQL Server and use stored procedures
These reports are designed in Crystal 10 and using OLE DB datasource and stored procs
they all have integrated security embedded.

What I want to do is change the database and server name of the report and still use integrated security in runtime. I know how to chnage the servername and password for reports that have been designed with sql authentication but integrated security chnages things little bit

Thanx for your help

Regards
Emre
0
Comment
Question by:ebolek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
11 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 11777748
Integrated security uses the Windows groups.  You need to ensure the same groups are assigned to the databases or the users are included in a group and the groups have the same permissions in the database.

We changed to a new server and the reports and code needed no changes for users to use them.

mlmcc
0
 
LVL 10

Author Comment

by:ebolek
ID: 11777830
I think I didnt explain myself good.

I have to change the database name runtime for a report that uses integrated security.

My code is as follows
private void setlogoninfo_IntegratedSecurity(CrystalDecisions.CrystalReports.Engine.ReportDocument myreport)
 CrystalDecisions.Shared.TableLogOnInfo MyLogonInfo;
foreach(CrystalDecisions.CrystalReports.Engine.Table MyTable in myreport.Database.Tables)
{
                        
MyLogonInfo = MyTable.LogOnInfo;
if (MyTable.Name == "")
{
MyLogonInfo.ConnectionInfo.ServerName  = this._servername;  
MyLogonInfo.ConnectionInfo.DatabaseName = this._databasename ;
                  
}
else
{
MyLogonInfo.ConnectionInfo.ServerName  = this._servername; MyLogonInfo.ConnectionInfo.DatabaseName = this._databasename ;
MyLogonInfo.ConnectionInfo.UserID = "";
MyLogonInfo.ConnectionInfo.Password  = "";      
                              
                              
}
MyTable.ApplyLogOnInfo(MyLogonInfo);                        
MyTable.Location = MyTable.Location.Substring(MyTable.Location.LastIndexOf(".")+1);  
                        
}
}            

In the sql authentication when you chnage the database and server nmae with the code above, it works
In the integrated security what do i set the user id and password too. in other words, do they stay "". If I set userid and password to null, .net doesnt like it. Is there a way to set the type of security in .net during runtime.
If you need more explanation, let me know
Thansk
Emre
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 11780150
INtegrated security shouldn't need a userid and password since it uses the Win logon credentials for database access.  Have you tried using "" for the userid and password?

We only have the one database so there is never a need to change so I haven't worked on that code.

mlmcc
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 10

Author Comment

by:ebolek
ID: 11783094
I did try that. I get authorization error from the sql provider when I do that. I have to do it, because we have a test database thatw e can logon that is on different server and boss wants nt authentication for all the modules that we use. I checked everyplace but couldnt find any example of it.

Regards
Emre
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 11790484
How many users will run the reports?

Iask because I am thinking you may be able to do this with the ALIAS or SET LOCATION methods but they may require the royalty runtime license.

mlmcc
0
 
LVL 10

Author Comment

by:ebolek
ID: 11809477
Many users: 100 at least

We are goign to be using rystal 10 Developer edition. I have built most of the reports and i hope that is not the case. This is  very important that we do this. i know that if i declare my data sources as datasets I can do it but I dont want all my report datasources to be datasets. that is bad I think. I dont know mlmcc, what do you think. i am stuck
Regards
Emre
0
 
LVL 10

Author Comment

by:ebolek
ID: 11810788
I have looked at brian bischof book. And if I use RDC, I think i will have access to the property integrated security for SQL OLEDB. Is this right? I dont want to convert all of the code that I wrote for .net. Seems like runtime customization so far weas enough with .net. RDC is completely new animal and have not used it. What do you think. Do you think it is easy to convert the code to RDC or do i have to?
0
 
LVL 10

Author Comment

by:ebolek
ID: 11820514
Did you ever use RDC?
0
 
LVL 10

Author Comment

by:ebolek
ID: 11825470
ok after 5 days of looking for it, i found out the problem. The location property should have to be set before applying the changes to the connectioninfo object. It is very strange though. Never mind I am very much relieved for this because it was the biggest obstacle. Thanks again for replies.

Regards
Emre
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 11859679
Closed, 50 points refunded.
Netminder
Site Admin
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question