Groups | Blog | Home
all groups > dotnet distributed apps > january 2004 >

dotnet distributed apps : Crystal Reports Problem: Please reply ASAP


Mithun Verma
1/23/2004 9:19:58 AM
Hello All,
I have a Windows application that uses Crystal Reports 9 (bundled Version)
developed using VS.NET 2003 on a windows server 2003 m/c.
The application has to be deployed on the client machine that has Windows
XP installed. Before deploying we make sure that .NET framework 1.1 is
installed on the XP machine. In the setup project, for support for Crystal
Reports, we have added the following merge modules:
1)Crystal_Managed2003.msm
2) Crystal_Database_Access2003.msm
3)Crystal_Database_Access2003_enu.msm
4)Crystal_RegWiz2003.msm
5)VC_User_CRT71_RTL_X86.msm
6)VC_User_STL71_RTL_X86.msm

The problem we are facing is like this: Whenever the user tries to pull up
the reports, a database logon screen pops up for the report. I am unable to
figure out as to why this is happening only for Crystal Reports. All the
other functionality in the application is working fine without having to
specify the database connection information interactively. The database
server is not in the same network as this Client WinXP machine. We specify
the IP address of the DB server in the DB connection string. Could this be a
problem?
If someone has faced this problem earlier or has any solution to this
problem, do let me know. I need to resolve this problem ASAP.

Thanks in advance
Mithun

Donzo
1/28/2004 6:36:08 PM
Try populating a dataset in the app first and setting the report's datasource to the dataset.
This works for me.
Of course you'll have to build a dataset that has all of the fields your report will be looking for.
One way I found to make this process easier is to:
-Go into the design of the report
-View the SQL query that crystal generates for the report
-copy it
-paste it to notepad or some other editor
-get rid of the quotes it puts around everything
-copy it from notepad
-Now drop a componet class into your project
-Drop a dataadapter into the component design screen
-configure the select command by pasting in what you copied and fixed up from the Crystal Report
-When this is complete, right click on the dataadapter you just created and choose generate dataset
-Now you have a dataset that contains a table that has all of the fields you need for your report
This is just an easy way (I think) to get a dataset that matches what your report fields are without creating the dataset by hand.
Now you can pull data into the dataset and use the report's SetDataSource method at runtime to set the source to the dataset in your app that has been populated with data.

You could just skip making the dataset and having it in your project and just have a dataadapter that has the same query that Crystal is generating for the report, populate a generic dataset in code and set the report's datasource to that dataset.

-It works for me :)


----- Mithun Verma wrote: -----

Hello All,
I have a Windows application that uses Crystal Reports 9 (bundled Version)
developed using VS.NET 2003 on a windows server 2003 m/c.
The application has to be deployed on the client machine that has Windows
XP installed. Before deploying we make sure that .NET framework 1.1 is
installed on the XP machine. In the setup project, for support for Crystal
Reports, we have added the following merge modules:
1)Crystal_Managed2003.msm
2) Crystal_Database_Access2003.msm
3)Crystal_Database_Access2003_enu.msm
4)Crystal_RegWiz2003.msm
5)VC_User_CRT71_RTL_X86.msm
6)VC_User_STL71_RTL_X86.msm

The problem we are facing is like this: Whenever the user tries to pull up
the reports, a database logon screen pops up for the report. I am unable to
figure out as to why this is happening only for Crystal Reports. All the
other functionality in the application is working fine without having to
specify the database connection information interactively. The database
server is not in the same network as this Client WinXP machine. We specify
the IP address of the DB server in the DB connection string. Could this be a
problem?
If someone has faced this problem earlier or has any solution to this
problem, do let me know. I need to resolve this problem ASAP.

Thanks in advance
Mithun


Rishit Raj
1/28/2004 7:55:21 PM
Hello Donzo,

I have followed precisely the same approach you mentioned to create a
datasource for my application. I do the following:
1) Have a stored procedure that returns the data for my report.
2) Create a dataset from the Stored Procedure through VS.NET editor.
3)Design the report based on the dataset.
4) At run time, the dataset is populated by executing the same stored
procedure. This dataset is the datasource for the report.
5) And finally, the Report is assigned to the viewer.

This is all I do. And everything worked fine everyhwhere. I set the
connection string in the app.config file and read it from there. No
where does it ask for any logon information to the user.

The problem is coming in this particular Windows XP machine.

Have I missed out anything. The only other thing that comes to my mind
is that while creating the dataset at design time through Server
Explorer, I had connected to the local database that I was using. But
once the dataset is created, I do not think it has anything to do with
the connection string.

Do u think I missed out anything there???

Thanks.



*** Sent via Developersdex http://www.developersdex.com ***
Donzo
1/29/2004 4:21:09 AM
If the reports is still connected to anything besides the dataset it will prompt the user for a logon, even if nothing from that connection is being used in the report. Check your current connections under the database portion of report. This is all I can think of that would cause the report to prompt the user for a logon

----- Rishit Raj wrote: ----

Hello Donzo

I have followed precisely the same approach you mentioned to create
datasource for my application. I do the following
1) Have a stored procedure that returns the data for my report
2) Create a dataset from the Stored Procedure through VS.NET editor
3)Design the report based on the dataset
4) At run time, the dataset is populated by executing the same store
procedure. This dataset is the datasource for the report
5) And finally, the Report is assigned to the viewer

This is all I do. And everything worked fine everyhwhere. I set th
connection string in the app.config file and read it from there. N
where does it ask for any logon information to the user

The problem is coming in this particular Windows XP machine

Have I missed out anything. The only other thing that comes to my min
is that while creating the dataset at design time through Serve
Explorer, I had connected to the local database that I was using. Bu
once the dataset is created, I do not think it has anything to do wit
the connection string

Do u think I missed out anything there??

Thanks



*** Sent via Developersdex http://www.developersdex.com **
Don't just participate in USENET...get rewarded for it
AddThis Social Bookmark Button