Solved

Crystal connection issues with a dataset provided by a dll

Posted on 2007-04-10
3
602 Views
Last Modified: 2011-09-20
Hello,
I'm consuming a web service with in a dll that has a public function that returns a dataset.
I'm trying to connect to it with Crystal Crystal reports. I'm pretty sure the "Double Hop" rule while passing my credentials is causing me grief even though I'm supplying a NetworkCredential. If I reference the dll in a test project it brings back the data, but when I try to connect to it with Crystal I get "logon failed  Details:mscorlib : Exception has been thrown by the target of an invocation.
Any ideas on how to get a around this would be appreciated.

Here is my class from within the dll:
public class cEntry
    {
        private EntryWrapper.entry.Service1  t = new EntryWrapper.entry.Service1();
        DataSet relational_data;

        public DataSet tickets()
        {
            string u = ConfigurationManager.AppSettings["user"];
            string p = ConfigurationManager.AppSettings["pass"];
            string d = ConfigurationManager.AppSettings["domain"];
            t.Credentials = new System.Net.NetworkCredential(u, p, d);//Send credentials
            string strWeb = t.ReportTest("F241A905-89B1-416d-8DC2-8C2EA1A6B434", ""); //Get xml string from Entry

            XmlDocument doc = new XmlDocument();
            string inputXml = strWeb;
            doc.LoadXml(inputXml);
           
            XslCompiledTransform xslTransform = new XslCompiledTransform(false);
            xslTransform.Load(XmlReader.Create(new StringReader(Resource.ticket))); //Load xlst string to the transform object
            StringBuilder result = new StringBuilder();
            XmlWriter output = XmlWriter.Create(result);
            xslTransform.Transform(doc, output); //Apply xlst to the xml file
            XmlTextReader xml_reader = new XmlTextReader(new StringReader(result.ToString())); //read the file and convet to xml

            relational_data = new DataSet();
         
            relational_data.ReadXml(xml_reader);
            return relational_data;
        }

0
Comment
Question by:ChadMarsh
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
MIKE earned 500 total points
ID: 18902983
I'm "shooting from the hip" here..but .....do you have Crystal Loaded onto this SERVER where the data is located? Where you are running this command?

MikeV
0
 
LVL 2

Author Comment

by:ChadMarsh
ID: 18904712
Hi There, Thanks for posting. I was beginning to think that nobody want to touch this one.
Crystal is on the same server. Actually that server has the Business View Manager, Crystal Report Server and Crystal Developer.  They run on a separate drive though.  I has Crystal on the phone yesterday and they seemed to be scratching their head over it.  The data that I'm pulling is from a proprietary database that Team Headquarters Entry uses. It's all XML based so the web service was the easiest way to get the data. I went one step further and bypassed the webservice and queried the data directly from the dll. Same error, unfortunately.  I re-opened my ticket with Crystal.  
The other strange thing that the Crystal support rep had be do was connect to my local copy of the dll and create a report. That worked. Then switch the datasource to the network copy of the dll. That worked. The only problem is when you save the report and exit, you get the error when you try to open it again.
Chad
0
 
LVL 2

Author Comment

by:ChadMarsh
ID: 18918729
Well, I ended up writing a script component in an SSIS. I'm just going to put the data into SQL and report off of that. Thanks for the reply though
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp.net mvc input file 2 32
c# string handling 1 27
SQL Exceptions 3 37
Where can I ask about my ASP.NET MVC project? 6 19
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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

910 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

21 Experts available now in Live!

Get 1:1 Help Now