Solved

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

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

820 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