473,770 Members | 4,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't create instance of Crystal Report

VMI
For my website, I created CrystalReportTe st.rpt (through the designer in VS
2005) and I'd like to be able to display it in viewer.aspx (all in the same
project). Viewer.aspx has a Crystal Report viewer but for some reason, I
can't create an instance of this report. Therefore, I can't set any of its
properties. The only way I was able to run it was through:

CrystalReportVi ewer.ReportSour ce = Server.MapPath( "CrystalReportT est.rpt");

Since I'm getting a Logon page everytime I open the page with the viewer
(which I don't want), I wanted to try the solution in
http://aspalliance.com/490, but that requires me to instantiate my report.
CrystalReportTe st.rpt also doesn't have any code-behind (there are no other
files related to the rpt).
Any help is appreciated. Everything's done in VS 2005 framework 2.0

Thanks,
VMI
Apr 27 '06 #1
4 5480
Hi,
Why are you loading a report?

CR by default create a class with the same name than the report:

ReportDocument report = new CrystalReportTe st();
CrystalReportVi ewer.ReportSour ce = report;
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"VMI" <VM*@discussion s.microsoft.com > wrote in message
news:05******** *************** ***********@mic rosoft.com...
For my website, I created CrystalReportTe st.rpt (through the designer in
VS
2005) and I'd like to be able to display it in viewer.aspx (all in the
same
project). Viewer.aspx has a Crystal Report viewer but for some reason, I
can't create an instance of this report. Therefore, I can't set any of its
properties. The only way I was able to run it was through:

CrystalReportVi ewer.ReportSour ce =
Server.MapPath( "CrystalReportT est.rpt");

Since I'm getting a Logon page everytime I open the page with the viewer
(which I don't want), I wanted to try the solution in
http://aspalliance.com/490, but that requires me to instantiate my report.
CrystalReportTe st.rpt also doesn't have any code-behind (there are no
other
files related to the rpt).
Any help is appreciated. Everything's done in VS 2005 framework 2.0

Thanks,
VMI

Apr 27 '06 #2
VMI
The report doesn't take any parameters, so I just figured it would be easier
to load the report once Viewer.aspx opens up.
Crystal Reports didn't create a class. Does it have to do with some type of
configuration when creating the report?
The problem is that it asks for login information when the report opens up.

Thanks.

"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,
Why are you loading a report?

CR by default create a class with the same name than the report:

ReportDocument report = new CrystalReportTe st();
CrystalReportVi ewer.ReportSour ce = report;
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"VMI" <VM*@discussion s.microsoft.com > wrote in message
news:05******** *************** ***********@mic rosoft.com...
For my website, I created CrystalReportTe st.rpt (through the designer in
VS
2005) and I'd like to be able to display it in viewer.aspx (all in the
same
project). Viewer.aspx has a Crystal Report viewer but for some reason, I
can't create an instance of this report. Therefore, I can't set any of its
properties. The only way I was able to run it was through:

CrystalReportVi ewer.ReportSour ce =
Server.MapPath( "CrystalReportT est.rpt");

Since I'm getting a Logon page everytime I open the page with the viewer
(which I don't want), I wanted to try the solution in
http://aspalliance.com/490, but that requires me to instantiate my report.
CrystalReportTe st.rpt also doesn't have any code-behind (there are no
other
files related to the rpt).
Any help is appreciated. Everything's done in VS 2005 framework 2.0

Thanks,
VMI


Apr 27 '06 #3
Hi,
"VMI" <VM*@discussion s.microsoft.com > wrote in message
news:81******** *************** ***********@mic rosoft.com...
The report doesn't take any parameters, so I just figured it would be
easier
to load the report once Viewer.aspx opens up.
Crystal Reports didn't create a class. Does it have to do with some type
of
configuration when creating the report?
I find weird that CR did not create the class, did you try the code I posted
and see if it works?
The problem is that it asks for login information when the report opens
up.


This is a completely different matter, what is your data source? a dataset ?
a sql server?
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Apr 27 '06 #4
VMI
I already found a possible solution to the login problem. But the solution
requires that I create an instance of the report, and I can't do that since
CR didn't generate a class for it.
The report doesn't have a datasource. Everything needed to run the report is
in the report. I just need to call it (I don't pass anything to it).

Thanks.

"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,
"VMI" <VM*@discussion s.microsoft.com > wrote in message
news:81******** *************** ***********@mic rosoft.com...
The report doesn't take any parameters, so I just figured it would be
easier
to load the report once Viewer.aspx opens up.
Crystal Reports didn't create a class. Does it have to do with some type
of
configuration when creating the report?


I find weird that CR did not create the class, did you try the code I posted
and see if it works?
The problem is that it asks for login information when the report opens
up.


This is a completely different matter, what is your data source? a dataset ?
a sql server?
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Apr 27 '06 #5

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

Similar topics

2
13454
by: Sam | last post by:
Hello everyone, I have a table, which contains a picture column, I put URL info into it. "www.myweb.com/1.jpg..." I want to show this picture in my crystal report, I find some samples show the "static" picture in Crystal report, No "Dynamic" one. Can Crystal Report do that? Thanks in advance. Sam
5
3026
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 description column may be reporting on a dataentry error as follows: TXNCODE: 1010001
0
3639
by: Dean Sabella | last post by:
Hi, I was trying to run a crystal report in the .net sample application given at: http://support.crystaldecisions.com/communityCS/FilesAndUpdates/ cppnet_win_subreport_basic.exe.asp (I've reproduced the relevant file below.)
2
2426
by: Serge Fournier | last post by:
Hello everyone. How to give the connexion information to a crystal report at run time ? same question concerning the SQL string for data extraction ? Is it "a must" to disconnect the report at the end of its conception under VStudio ? Thanks for any advice.
1
1404
by: Learner | last post by:
Hi there, I am a first time crystal user. We have a need to create a crystal report from my web form. Is there a blog or an article that explains step by step how do i create a report? Please help. Thanks -L
10
4955
by: Thirsty Traveler | last post by:
The following code will instantiate a specific Crystal report (TestRpt.rpt): public static void CreatePDF() { DataSet ds = TestDAL.GetCrystalDS(); TestRpt rpt = new TestRpt(); rpt.SetDataSource(ds); rpt.ExportToDisk(ExportFormatType.PortableDocFormat, "TestRpt.pdf"); }
8
14595
dnb
by: dnb | last post by:
Hi.... How to create crystal report in vb6.0? What is the first step of creating a crystal report? How to add crystal report in vb6.0? Please tell from which step to start creating crystal report?... Thanx In Adance....
1
2341
by: bhappy | last post by:
Hai All, I want to create crystal reports dynamically, I don't know the columns i will take it from database at runtime, im getting all data into one dataset and im convrting dataset into xml schama, then im using that xml schama in crystal reports,there i drag n drop all fields in xml schama to crystal report, up to here its working fine, but when ever i changed fields in database i have to change in crystal report also Is there any...
0
1219
by: Anavaradha Sankar | last post by:
Hi., I had first created a dataset and using the wizard i had specified the connection (i used windows authentication to create a connection),tables,queries n finished creating the dataset. And now created a crystalreport specifeid that datatable thru the wizard that comes. Placed the Crystal Report Viewer and specified irs source as the crystal report which i created. And using smart tag i had disabled the Enable Database Logon Prompting...
0
9432
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10232
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10059
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7420
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6682
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3974
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
3
2822
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.