473,569 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal Reports and WebForms

hello:

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

CrystalReportVi ewer1.ReportSou rce =
MapPath("localh ost/quejasweb")+\\R pt\\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 1778
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 crTableLogonInf os = new TableLogOnInfos ();

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

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

// Now assign it to each of the report table
foreach (CrystalDecisio ns.CrystalRepor ts.Engine.Table table in
reportDocument1 .Database.Table s)
{
TableLogOnInfo crTableLogonInf o = new TableLogOnInfo( );
crTableLogonInf o.TableName = table.Name;
crTableLogonInf o.ConnectionInf o = crConnectionInf o;
crTableLogonInf os.Add( crTableLogonInf o);
table.ApplyLogO nInfo( crTableLogonInf o);

}

//Assign the report and the logon info collection to the viewer
CrystalReportVi ewer1.LogOnInfo = crTableLogonInf os;
CrystalReportVi ewer1.ReportSou rce = 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.c u> wrote in message
news:uH******** ******@TK2MSFTN GP10.phx.gbl...
hello:

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

CrystalReportVi ewer1.ReportSou rce =
MapPath("localh ost/quejasweb")+\\R pt\\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
19146
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 Report at runtime? Example: private void button1_Click(object sender,
5
3007
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 for reporting purposes and am wondering if anyone knows if this is easily accomplished using the .NET version of Crystal Reports? For example, the...
3
6898
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
984
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
4989
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. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version,...
0
770
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 and I don't have that in my toolbox. I ensured all the Crystal Reports .Net 2005 components were installed from the CD. Any suggestions? Jerry
0
2323
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 (ASP.NET) that shows a simple report. It work fine with on my local computer. Now I'm trying to deploy this sample application on our web server but I...
3
8911
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 from sql server) and I was wondering whish of these is the better tool .. We're still not sure if they'll be loaded from an existing VB6 application...
3
3803
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 dataset and link it to a reportviewer than any Crystal Report book will do. I use vb.net but im assuming most books would show you vb and c
1
8121
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 file and itself into the exe. You would probably want a tool for this bit which could be in the zip too. So the app isnt single exe when running but...
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5223
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2117
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 we have to send another system
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.