473,508 Members | 2,040 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal Reports and WebForms

hello:

I made a webform with a CrystalReportViewer. In the event page_load, i try
to fill it with a Report, some like this...

CrystalReportViewer1.ReportSource =
MapPath("localhost/quejasweb")+\\Rpt\\My.rpt;

and i receive Load report failed.

If the database is SQL server...what am i doing wrong?

I tried using dataset, direct sql tables, etc...and nothing works just Load
report failed.

How can i do?

Thanks in advanced.

Leo
Nov 15 '05 #1
1 1774
Hi Leandro,

IMHO CR has a LOT to improve regarding the exception it throw, everything
is "Logon Failed" error :(.
I have done what you want and basically this is the steps/code I use.
1- I never load the report from a file, I always compile it as an embedded
resource ( the default by the way ). this avoid the need to load the report
at runtime.

2- I use this code for initialize the report, the most important thing I
believe is give it the correct info to each of the tables:

// Collection of the logon info for each of the tables of the report
TableLogOnInfos crTableLogonInfos = new TableLogOnInfos();

//Create the report object
reportDocument1 = new OpenRecords();

//This is used to contain the connection info for the tables
ConnectionInfo crConnectionInfo = new ConnectionInfo();
crConnectionInfo.ServerName = "127.0.0.1";
crConnectionInfo.DatabaseName = "CTP";
crConnectionInfo.UserID = "CTPWeb";
crConnectionInfo.Password = "CTPApp";

// Now assign it to each of the report table
foreach (CrystalDecisions.CrystalReports.Engine.Table table in
reportDocument1.Database.Tables)
{
TableLogOnInfo crTableLogonInfo = new TableLogOnInfo();
crTableLogonInfo.TableName = table.Name;
crTableLogonInfo.ConnectionInfo = crConnectionInfo;
crTableLogonInfos.Add( crTableLogonInfo);
table.ApplyLogOnInfo( crTableLogonInfo);

}

//Assign the report and the logon info collection to the viewer
CrystalReportViewer1.LogOnInfo = crTableLogonInfos;
CrystalReportViewer1.ReportSource = reportDocument1;

Merry X-Mas,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


"Ing. Leandro Pérez Guió" <lp****@holguin.copextel.com.cu> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl...
hello:

I made a webform with a CrystalReportViewer. In the event page_load, i try
to fill it with a Report, some like this...

CrystalReportViewer1.ReportSource =
MapPath("localhost/quejasweb")+\\Rpt\\My.rpt;

and i receive Load report failed.

If the database is SQL server...what am i doing wrong?

I tried using dataset, direct sql tables, etc...and nothing works just Load report failed.

How can i do?

Thanks in advanced.

Leo

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
19130
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
5
2996
by: BStorm | last post by:
I have a transaction log file where the DataSet table's Description column is actually delimited into "subcolumns" based upon the transaction id. I would like to parse these into separate fields...
3
6885
by: Gheaci Maschl | last post by:
Hi all! I would like to have your opinion about my problem and my proposal how to solve it: Ingredients: - BTriev database - Crystal Reports - maybe MS Access - Liinos6 (small ERP software)
1
983
by: Frederico Barbosa | last post by:
Can I export my report to Adobe Acrobat PDF (Portable Document Format) or RTF (Rich Text Format) from the Crystal Reports report designer in WEbForms? If so, how? Richard
7
4979
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
0
768
by: Jerry Haynes | last post by:
I have downloaded sample code and documentation for adding crystal reports to a webform, but all the documentation talks about dragging the crystal reports control from the toolbox onto my webform...
0
2320
by: Robert Warnestam | last post by:
Hello, I have some problems deploying Crystal Reports. I'm using Visual Studio 2005 Beta 1. In this version Crystal Reports (9.7.3500.0) is included. I created a small test application...
3
8909
by: VMI | last post by:
I know this may not be the best NG for this, but I feel you guys know more about this than any of the other NGs. I need to build several simple reports (over 50 of them and they get their data...
3
3798
by: Miro | last post by:
Hi, Just wondering what a good book is on visual studios 2008 ( or 2005 if no 2008 ) that teaches you how to properly use crystal reports with it. Or im assuming that as long as I can create a...
1
8119
by: =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post by:
On reflection, you could possibly make the app a self extracting zip file which extracts the EXE and a settings file and then starts the app, then when you app closes, it can repack the settings...
0
7226
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7328
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7499
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5631
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4709
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3186
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1561
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
767
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.