473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Can't create instance of Crystal Report

VMI
For my website, I created CrystalReportTest.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:

CrystalReportViewer.ReportSource = Server.MapPath("CrystalReportTest.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.
CrystalReportTest.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 5450
Hi,
Why are you loading a report?

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

ReportDocument report = new CrystalReportTest();
CrystalReportViewer.ReportSource = report;
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"VMI" <VM*@discussions.microsoft.com> wrote in message
news:05**********************************@microsof t.com...
For my website, I created CrystalReportTest.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:

CrystalReportViewer.ReportSource =
Server.MapPath("CrystalReportTest.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.
CrystalReportTest.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 CrystalReportTest();
CrystalReportViewer.ReportSource = report;
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"VMI" <VM*@discussions.microsoft.com> wrote in message
news:05**********************************@microsof t.com...
For my website, I created CrystalReportTest.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:

CrystalReportViewer.ReportSource =
Server.MapPath("CrystalReportTest.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.
CrystalReportTest.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*@discussions.microsoft.com> wrote in message
news:81**********************************@microsof t.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*@discussions.microsoft.com> wrote in message
news:81**********************************@microsof t.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
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...
5
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...
0
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...
2
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...
1
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...
10
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();...
8
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...
1
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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
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...
0
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
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...

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.