[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1355
  • Last Modified:

Integrated Security RunTime Customization Crystal10 .NET

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
ebolek
Asked:
ebolek
  • 6
  • 3
1 Solution
 
mlmccCommented:
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
 
ebolekAuthor Commented:
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
 
mlmccCommented:
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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
ebolekAuthor Commented:
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
 
mlmccCommented:
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
 
ebolekAuthor Commented:
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
 
ebolekAuthor Commented:
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
 
ebolekAuthor Commented:
Did you ever use RDC?
0
 
ebolekAuthor Commented:
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
 
NetminderCommented:
Closed, 50 points refunded.
Netminder
Site Admin
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now