Solved

Removing Connections from "My Connections"

Posted on 2012-03-09
7
463 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:Hers2keep
  • 5
  • 2
7 Comments
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
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:Hers2keep
Comment Utility
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 100

Expert Comment

by:mlmcc
Comment Utility
I haven't seen that problem.

mlmcc
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:Hers2keep
Comment Utility
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:Hers2keep
Comment Utility
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:
Hers2keep earned 0 total points
Comment Utility
I got around this problem by connecting through ado.net instead of the odbc connections.
0
 

Author Closing Comment

by:Hers2keep
Comment Utility
This was the only way I could resolve the connection problem.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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 video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now