Solved

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

Posted on 2012-04-02
4
329 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
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.

747 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

9 Experts available now in Live!

Get 1:1 Help Now