Solved

Integrated Security RunTime Customization Crystal10 .NET

Posted on 2004-08-11
11
1,342 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
  • 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
 
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now