?
Solved

Removing Connections from "My Connections"

Posted on 2012-03-09
7
Medium Priority
?
680 Views
Last Modified: 2012-03-20
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.
0
Comment
Question by:Carla Romere
[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
  • 5
  • 2
7 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 37703345
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
 

Author Comment

by:Carla Romere
ID: 37703382
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 37703545
I haven't seen that problem.

mlmcc
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Carla Romere
ID: 37703564
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
 

Author Comment

by:Carla Romere
ID: 37703617
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
 

Accepted Solution

by:
Carla Romere earned 0 total points
ID: 37726384
I got around this problem by connecting through ado.net instead of the odbc connections.
0
 

Author Closing Comment

by:Carla Romere
ID: 37741250
This was the only way I could resolve the connection problem.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

771 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