Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Change Oracle DataSource in CR2008 by C#3.5 Post Reply Post New Topic
Author Message
jackjack8899
Newbie
Newbie


Joined: 20 Aug 2009
Online Status: Offline
Posts: 3
Quote jackjack8899 Replybullet Topic: Change Oracle DataSource in CR2008 by C#3.5
    Posted: 20 Aug 2009 at 2:10am
hi, i have a question about changing the DataSource in rpt file point from Development to production.
i am now using VS2008 to write a dot net window program (in c#).The app is used to drive 7 Crystal Report 2008 (sp2) rpt file. this window application has a drop down menu to select either dev database or prod database to generate the report. and the part (code) for change the datasource has been shown below:

private void setDBLogonForReport(ConnectionInfo info, ReportDocument doc)
        {
            Tables myTables = doc.Database.Tables;
            foreach (Table myTable in myTables)
            {
               TableLogOnInfo logOnInfo = myTable.LogOnInfo;
               logOnInfo.ConnectionInfo = info;
               logOnInfo.TableName = myTable.Name;
               myTable.ApplyLogOnInfo(logOnInfo);
               //myTable.Location = info.UserID + "." + "pkg_CR." + myTable.Name;
            }
}

i found that it will show Vendor error(6550) and
it cannot change the ServerName after the function ApplyLogOnInfo(...). it still use the setting which i use for design the report. is it a bug for CR2008? i have already applied the service pack 2.
more info: this win app is connecting to oracle procedure and "pkg_CR" is a package name. this procedure will return ref_cursor so report can read ref_cursor data to generate report.
IP IP Logged
jackjack8899
Newbie
Newbie


Joined: 20 Aug 2009
Online Status: Offline
Posts: 3
Quote jackjack8899 Replybullet Posted: 20 Aug 2009 at 5:41pm
is it because cr2008 cannot connect to oracle procedure?
IP IP Logged
ThorBear
Newbie
Newbie
Avatar

Joined: 08 Sep 2009
Location: Sweden
Online Status: Offline
Posts: 2
Quote ThorBear Replybullet Posted: 08 Sep 2009 at 6:50am
I have the same problem. Do you have a solution? all help much appreciated.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 09 Sep 2009 at 12:27pm

Does the stored procedure have the same owner in each of the databases?  If not, that's probably where your problem is.  Also, changing the location of stored procs in Crystal itself can be tricky - it's not always straight-forward - so I'm not surprized that you're having problem changing it in code.  Is there any way that you can use tables instead of a stored proc?

-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.