Removing Connections from "My Connections"

I have recently installed Visual Studio 2010 Professional and am working on getting a Crystal Reports site deployed using several hundred of our existing reports. I have a system DSN set up on my development machine as well as on the IIS server called 'Ross_Data'. Somewhere, somehow, someone has created reports using the DSN on their machine in all caps 'ROSS_DATA'. In my VS website, under My Connections, I have Ross_Data and ROSS_DATA. How do I completely remove the incorrect one - ROSS_DATA? When I look at "My Connections" I see them both. I can right click and remove Ross_Data, but that's the one I want to keep. Right clicking the incorrect one doesn't give me the option to delete it and I can't find any way or anywhere to edit it. I have several reports that won't open in CrystalReportsViewer- I think because they keep trying to open using ROSS_DATA instead of Ross_Data.
Carla RomereDirector of Information TechnologyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
I don't know of a way to remove one.

Were the reports that don't open, developed on your machine or by someone else?
Can you open the reports in Crystal and change the data source?

mlmcc
0
Carla RomereDirector of Information TechnologyAuthor Commented:
I can open them in CR in VS2010 and change the datasource, but as soon as I try to run it again, it automatically is picking the incorrect one. Occasionally it's even adding another one, i.e. Ross_Data_1. This is very bizarre. I'm still digging...
0
mlmccCommented:
I haven't seen that problem.

mlmcc
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Carla RomereDirector of Information TechnologyAuthor Commented:
Leave it to me! I've got several reports that I'm using to get my coding correct before I start creating all the aspx pages for these reports. Every single report that we have on that server uses the same exact DSN - Ross_Data. I've gotten 2-3 different aspx pages created based on existing reports that have no subreports. Some work and some don't. I'm opening the reports themselves in CR2010/VS and saving them in the new format, but it's just not working on all of them. Literally I've copied the code from a working aspx page and pasted it on another and ONLY changed the name of the crystal report and it doesn't always work. I've got another one that actually has a filter set on the aspx page and it works perfectly fine and refreshes anytime the selection changes. I've been looking for a good book to get on VS2010 and/or Crystal Reports 2010 and/or C#. Do you have any suggestions?
0
Carla RomereDirector of Information TechnologyAuthor Commented:
For instance, this report takes the value selected in a DropDownList and pulls up the report only for that particular warehouse. This code works.

    private void ConfigureCrystalReports()
    {
        if (!IsPostBack)
        {
            crystalReportViewer.Visible = false;
        }

        string reportPath = ("~/customreports/CURRINV_GL_NOLOT_PROD.rpt");

        ConnectionInfo connectionInfo = new ConnectionInfo();
        connectionInfo.ServerName = "Ross_Data";
        connectionInfo.DatabaseName = "fin_prod";
        connectionInfo.UserID = "xxx";
        connectionInfo.Password = "xxx";
        crystalReportViewer.ReportSource = reportPath;

        SetDBLogonForReport(connectionInfo);

    }

    protected void ddlWarehouse_SelectedIndexChanged(object sender, EventArgs e)
    {
        string warehouse = ddlWarehouse.SelectedValue;
        string selectFormula = "{VW_CURRENT_INVENTORY_GL.WH}=" + "'" + warehouse + "'";
        crystalReportViewer.SelectionFormula = selectFormula;
        crystalReportViewer.Visible = true;
        crystalReportViewer.DataBind();
    }


        private void Page_Init(object sender, EventArgs e)
    {
        ConfigureCrystalReports();
    }

    private void SetDBLogonForReport(ConnectionInfo connectionInfo)
    {
        TableLogOnInfos tableLogOnInfos = crystalReportViewer.LogOnInfo;
        foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
        {
            tableLogOnInfo.ConnectionInfo = connectionInfo;
        }
    }

Open in new window


The report refreshes correctly anytime you change the value in the DropDownList. So, I copied the code into a new aspx page for another report that gets filtered by the value entered into a textbox. This code does not work - stops at the screen asking for the server/user/password.

    private void ConfigureCrystalReports()
    {
        if (!IsPostBack)
        {
            crystalReportViewer.Visible = false;
        }

        string reportPath = ("~/customreports/BillOfLading2.rpt");

        ConnectionInfo connectionInfo = new ConnectionInfo();
        connectionInfo.ServerName = "Ross_Data";
        connectionInfo.DatabaseName = "fin_prod";
        connectionInfo.UserID = "xxx";
        connectionInfo.Password = "xxx";
        crystalReportViewer.ReportSource = reportPath;

        SetDBLogonForReport(connectionInfo);
    }

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        string bol = txtbol.Text;
        string selectFormula = "{VW_BOL_DESPATCH_HEADER.DESPATCH_NOTE_TEXT}=" + "'" + bol + "'";
        crystalReportViewer.SelectionFormula = selectFormula;
        crystalReportViewer.DataBind();
        crystalReportViewer.Visible = true;
    }

    private void Page_Init(object sender, EventArgs e)
    {
        ConfigureCrystalReports();
    }

    private void SetDBLogonForReport(ConnectionInfo connectionInfo)
    {
        TableLogOnInfos tableLogOnInfos = crystalReportViewer.LogOnInfo;
        foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
        {
            tableLogOnInfo.ConnectionInfo = connectionInfo;
        }
    }

Open in new window


And the *really* weird thing is the first set of code, the one that works, actually has a subreport at the end of the report and it loads just fine and I don't even have the logon information set up for subreports yet (at least that works anyway).

I've opened both reports in CR2010 and saved them.
0
Carla RomereDirector of Information TechnologyAuthor Commented:
I got around this problem by connecting through ado.net instead of the odbc connections.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Carla RomereDirector of Information TechnologyAuthor Commented:
This was the only way I could resolve the connection problem.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.