473,390 Members | 1,078 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,390 software developers and data experts.

C#VS 2.0 CrystalReport Question

Hi

Must you always use a Literal path for the CR?
// Example
DataSet theReportDataset = DataCalls.GetReportDate(parameter);
Report1 = new ReportDocument();
string reportPath = Application.StartupPath + "\\" + "Reports.rpt";
Report1.Load("Reports.rpt");
Report1.SetDataSource(theReportDataset);
crystalReportViewer1.ReportSource = Reports;
crystalReportViewer1.Visible = true;
\\
Is there not a way to reference the report thats within your project without
a path call?
//
Dim crReportDocuments As New ConfirmPrintAll
DealstoPrint = WS_DataService.getDealPrintList(parameter)
crReportDocuments.SetDataSource(DealstoPrint)
CrystalReportViewer1.ReportSource = crReportDocuments
CrystalReportViewer1.Visible = True

Thanks
Brian
Feb 2 '06 #1
2 1245
I'm not sure what your example is getting at, but there should be no
problem loading an .rpt file using a relative path (including just the
filename, if the .rpt is in the current directory).

Just be aware of where is the startup directory for your app. If you're
not able to load .rpt files by just mentioning their names, perhaps
your app isn't running in the startup directory you think it is.

Feb 3 '06 #2
Yes, the EXE is in either the Debug or Release Dir while the Rpt file wasjust
in the project dir.
Thanks

"Bruce Wood" wrote:
I'm not sure what your example is getting at, but there should be no
problem loading an .rpt file using a relative path (including just the
filename, if the .rpt is in the current directory).

Just be aware of where is the startup directory for your app. If you're
not able to load .rpt files by just mentioning their names, perhaps
your app isn't running in the startup directory you think it is.

Feb 3 '06 #3

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

Similar topics

0
by: s-galit | last post by:
i read on the msdn site that the crystalReport is dynamic does someone know if its possible to hide a column on the crystalReport dynamicly?? how? where i can get examples? thanks
0
by: s-galit | last post by:
hi, i have a formula parameter in my crystalReport how can i initalize the parameter so that in every line in the crystalReport the parameter will have a different string? how to get to line in...
0
by: s-galit | last post by:
hi, is it possible to give a different value to a formula field in the crystalReport (i mean a different value in every row in the crystalReport) ? if yes then how can i get to a row? thanks in...
0
by: Jason Huang | last post by:
Hi, I've installed CrystalReport XI on my Windows XP PC which has Visual Studio 2003 on it. However, when I add the reference in the project manager, I can't find the CrystalDecisions version...
1
by: Jason Huang | last post by:
Hi, I've installed CrystalReport XI on my Windows XP PC which has Visual Studio 2003 on it. However, when I add the reference in the project manager, I can't find the CrystalDecisions version...
0
by: agcabutotan | last post by:
Hi to everyone. I am new in this thread, please help me. I'm having difficulty with CrystalReport.Net. I have a completed project written and compiled in VB.Net (and I used CrystalReport.Net in...
1
by: mhsasono | last post by:
Hi all, Has anybody experienced with CrystalReport? My question is: Does CrystalReport have capability to print the Microsoft Word document? Reason: I want to know CrystalReport capability...
0
by: amri | last post by:
How to define CrystalReport object in ASP.NET ? I take a CrystalReportViewer & CrystalReportSource........& their name is in CrystalReport is respectively CrystalReportViewer1 & ...
0
by: amri | last post by:
How to define CrystalReport object in ASP.NET ? I take a CrystalReportViewer & CrystalReportSource........& their name is in CrystalReport is respectively CrystalReportViewer1 & ...
0
by: dragon52 | last post by:
Hi there, I have records in the form of scorecards. Each scorecard has fields "type" and "score". eg typeA 2.3 typeB 3.3 typeA 2.0 typeC 1.9 typeB 1.1
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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
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...

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.