Solved

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

Posted on 2012-04-02
4
336 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

734 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