Solved

Problem using XML datasource in Crystal Reports 9 and C#

Posted on 2004-04-28
7
639 Views
Last Modified: 2012-08-13
I am trying to get my C# program to open a Crystal 9 report up in a crystal report viewer.  The report is not part of my C# project, it was designed in Crystal Reports 9.  The program simply creates a new crystal report class and then loads the crystal report into the class and then opens the report in the view.  The program generate an XML file before loading the report, and it is this XML file that the report uses as the datasource.  

However, every time I try to preview a report the "Database Login" screen comes up, and asks for the server name, user id, and password.  Since the report should be connecting to an XML file in the same directory it should not require this information.  Does anyone have any suggestions on how I can get the report to use the XML file without asking for anything?
0
Comment
Question by:cerlendson
  • 2
  • 2
7 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10943631
The times when this message comes up for me are up are when the report is not finding data that it needs ...

Also this is going through an extra step than required.

You can just push a dataset to the report.

I have had huge numbers of probems dealing with crystal reports "pull" methodology(etting it try to go out and get the data). I have completely given up on them and now only support the push methodology (where you set a datasource to the report)

I am sure the crystal forum people would know more about this as it sounds like a crystal pulling issue.
0
 

Author Comment

by:cerlendson
ID: 10944382
Basically why I'm doing it the way I am is:

I want to have a crystal report viewer in my C# viewer and I want to be able to determine what report the viewer will open at runtime.  The only problem I am having with all of this is that the report viewer keeps asking me for login information for the database no matter what datasource I use in the report.

So if anyone knows a way to do this please let me know.  Even if it doesn't include using a local file.

NOTE:  This program will be placed on many machines, so I don't want to have to set up a DSN on each individual machine.
0
 

Author Comment

by:cerlendson
ID: 10982138
To accomplish my disired task I created a new report class in C# and then passed the class a "Data Table" as the data source (All in code).

Sorry for wasting your time.  I'll ask to have this question removed.
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10983933
I suggested the methodology that he used but no I dont care, the question was too vague to come up with an answer to the original question.
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 11017858
PAQd, 255 points refunded.

GhostMod
Community Support Moderator
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

790 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