Solved

By pass database logon information in crystal reports accessed using C#

Posted on 2012-04-02
4
331 Views
Last Modified: 2012-05-09
We have built a crystal report which has college id as a dynamic parameter  field. Based on the selection of the college_id the report gets populated. We are loading this report through C#.Net.

We have used the below code to set the log on info for the tables in the report
        for (int i = 0; i < crTables.Count; i++)
        {
            crTable = crTables[i];
            crTableLogOnInfo = crTable.LogOnInfo;
            crTableLogOnInfo.ConnectionInfo =
            crConnectionInfo;
            crTable.ApplyLogOnInfo(crTableLogOnInfo);
        }

Open in new window

The issue we have is the when we load the report it asks for the database user name and password as the dynamic parameter field has a different data source. So is there a way to set LogOnInfo for that dynamic parameter??
0
Comment
Question by:mauneeld
  • 2
  • 2
4 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 37798824
Does the report have a subreport?

Where are you setting the crConnectionInfo?

Does the user supplied have database permissions and permissions to all the tables?

mlmcc
0
 

Accepted Solution

by:
mauneeld earned 0 total points
ID: 37816296
No the report does not have a sub report.
I am passing the crConnectionInfo as a parameter to this method having the given code.The crConnectionInfo has the servername,userID and password configured to it.
The user used here is used in multiple applications and has the required permissions.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 37818172
I misunderstood what you need.

I don't know how to set the logon info for the separate prompt.  That is one of the drawbacks of using multiple datasources, the SDK only relly supports 1 datasource.

mlmcc
0
 

Author Closing Comment

by:mauneeld
ID: 37946011
No one replied.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Connecting database in Xamarin? 6 52
Icons and Colors for Terms 3 24
What is Thread.Sleep? 5 46
rest webservice call over https via c# 6 24
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 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

16 Experts available now in Live!

Get 1:1 Help Now