Sitemap

Amicuk Programming Answers

Crystal Reports DataBase Fields

-0001-11-30   Views:1

Advertisement

Hi, I'd like to know if is possible to set the query string and the DataBase when you want to open a Crystal Report from SBO. Thanks.You cannot set the database connection string from the SBO connection information because the password is encrypted.

Hi,
I'd like to know if is possible to set the query string and the DataBase when you want to open a Crystal Report from SBO.
Thanks.

The replay answer
Advertisement
You cannot set the database connection string from the SBO connection information because the password is encrypted.
But if can grab the password from somewhere else you can do it like this:
    private void SetConnectionInfo(CrystalDecisions.Shared.ConnectionInfo crConnectionInfo, ReportClass report)
      TableLogOnInfo crTableLogOnInfo;
      report.SetDatabaseLogon(conn.UserId, conn.Password, conn.Server, conn.Database);
      crConnectionInfo.ServerName = conn.Server;
      crConnectionInfo.DatabaseName = conn.Database;
      crConnectionInfo.UserID = conn.UserId;
      crConnectionInfo.Password = conn.Password;
      foreach(Table table in report.Database.Tables)
        crTableLogOnInfo = table.LogOnInfo;
        crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
        table.ApplyLogOnInfo(crTableLogOnInfo);
        string s = table.Location;
        s = crConnectionInfo.DatabaseName + "." /*dbo." */ + table.Location.Substring(table.Location.LastIndexOf(".") + 1) ;
        table.Location = crConnectionInfo.DatabaseName + "." /*dbo."*/ + table.Location.Substring(table.Location.LastIndexOf(".") + 1) ;
Hope this helps,
Jurgen

Go to See the other 4 answers

Hot
Hi, In my sales order pricing conditions, the Condition values are coming in change mode. so that the users can change the condition values. I want to make it as disply mode. how can i do? Regards, jyothi.Hi, U can control the manual entry of pricing [More]
Hello,  I have been having this problem for a few weeks now.  We have Japanese multilingual XP and normal XP sp2 at our company and installed currently on the systems is Adobe Acrobat Pro 6.01.  There are two errors I am getting when working with the [More]
Hi... I am quite new to oracle technologies and have to create a full fledged secure B2B web portal (web center application) using various web center technologies like Wiki, Discussions etc and also integrate and manage content through it. The portal [More]
Hi ,    what is BPM's.. what is the purpose of BPM's  with out BPM's also we can able to do the scenarios  then why  every one  are preffering BPM's..in what situation we need to go for BPM's.. can any one explain  this  briefly.. Thanks BabuSimple m [More]
well i need help in deploying my webforms on the AS THAT is on redhat linux 2 help me with some material or links that provide me how to deploye my application on it alos i need to know about complete help guide for the deploying of database on datab [More]
I created a movie in imovie. I went to share>iDVD thinking this is what I must do according to some things I have read. I want to make a dvd from my finished product in imovie. How do I do that? I do not wish to use iDVD to make my movie. Help please [More]
Hello to all, I am Vishnu from India. I have tried connecting MIDlet with jsp but not using servlet. Few asked me to use servlet to connect to MIDlet. I want to connect to database (sql server) from MIDlet. I do not know which should I go for , what [More]
Hi Friends , While I am Installing Oracle EBS ,it is done upto 20% and Throws an Error RW:50004 :Error Code Received when running external process. ...Please help how to resolve this issue??Hi, While I am Installing Oracle EBS ,it is done upto 20% an [More]
Hello, So, when i launch itunes, my mac pro can't shut down. I choose "shut down", then the gray screnn and the wheel turning, but... nothing else. I have to shut it down with the button... Mac pro nehalem 2010 with Lion or Mountain, after re-in [More]
Let's not beat around the bush ....... I am lazy! I have always admired the way, with a few simple clicks, you can transform a selection of your slides in iPhoto, into quite an impressive instant slideshow. One big advantage is the auto-Ken Burns eff [More]