Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2012-04-02
4
Medium Priority
?
346 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 101

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 101

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

972 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