473,398 Members | 2,335 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,398 software developers and data experts.

Crystal Reports, Viewing The Report

I have imbedded a report in my project (added a report to my project and set
some fields)

How the heck do I access the report in my program?

I have looked on MSDN and searched for a walkthrough...

I can't find anything that tells me how to use the report viewer or how to
bring it up on screen...

isn't there a way to bring up the report in a test view when you are
creating it? if not that is horrible and should be created.

btw, I am using Visual Studio.net 2003 Ent. Arch and my reports are imbedded
in my EXE, not saved as .rpt files when the applicaiton runs.

Thanks, this used to be so much different...

Nov 20 '05 #1
2 1624
Hi again
Add a the crystalreportviewer in a form.
You need to change 'CrystalReport1' to the name of your
embeded report.

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared

Dim crDatabase As Database
Dim crTables As Tables
Dim crTable As Table
Dim crTableLogOnInfo As TableLogOnInfo
Dim crConnectionInfo As ConnectionInfo

Dim crReportDocument As New CrystalReport1
crConnectionInfo = New ConnectionInfo
With crConnectionInfo
.ServerName = "Your Server"
.DatabaseName = "Your DB"
.UserID = "Your User"
.Password = "Your Pass"
End With
crDatabase = crReportDocument.Database
crTables = crDatabase.Tables
For Each crTable In crTables
crTableLogOnInfo = crTable.LogOnInfo
crTableLogOnInfo.ConnectionInfo = crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogOnInfo)
Next

''crReportDocument.RecordSelectionFormula = formula
crReportDocument.PrintOptions.PaperOrientation =
PaperOrientation.Landscape
CrystalReportViewer1.DisplayGroupTree = False
CrystalReportViewer1.Zoom(100)
CrystalReportViewer1.ReportSource = crReportDocument
-----Original Message-----
I have imbedded a report in my project (added a report to my project and setsome fields)

How the heck do I access the report in my program?

I have looked on MSDN and searched for a walkthrough...

I can't find anything that tells me how to use the report viewer or how tobring it up on screen...

isn't there a way to bring up the report in a test view when you arecreating it? if not that is horrible and should be created.
btw, I am using Visual Studio.net 2003 Ent. Arch and my reports are imbeddedin my EXE, not saved as .rpt files when the applicaiton runs.
Thanks, this used to be so much different...

.

Nov 20 '05 #2
Hi again Jorge...
You have been a lifesaver today...
I have one other problem...

I have a crystal report made, i have the viewer, i have the report coming up
in the viewer, but everytime it comes up, it asks me for the password to my
sql server... i do not want to have to give this to the user, is there
anyway to
make crystal reports remember the password?

Thanks again

"Jorge" <an*******@discussions.microsoft.com> wrote in message
news:73****************************@phx.gbl...
Hi again
Add a the crystalreportviewer in a form.
You need to change 'CrystalReport1' to the name of your
embeded report.

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared

Dim crDatabase As Database
Dim crTables As Tables
Dim crTable As Table
Dim crTableLogOnInfo As TableLogOnInfo
Dim crConnectionInfo As ConnectionInfo

Dim crReportDocument As New CrystalReport1
crConnectionInfo = New ConnectionInfo
With crConnectionInfo
.ServerName = "Your Server"
.DatabaseName = "Your DB"
.UserID = "Your User"
.Password = "Your Pass"
End With
crDatabase = crReportDocument.Database
crTables = crDatabase.Tables
For Each crTable In crTables
crTableLogOnInfo = crTable.LogOnInfo
crTableLogOnInfo.ConnectionInfo = crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogOnInfo)
Next

''crReportDocument.RecordSelectionFormula = formula
crReportDocument.PrintOptions.PaperOrientation =
PaperOrientation.Landscape
CrystalReportViewer1.DisplayGroupTree = False
CrystalReportViewer1.Zoom(100)
CrystalReportViewer1.ReportSource = crReportDocument
-----Original Message-----
I have imbedded a report in my project (added a report

to my project and set
some fields)

How the heck do I access the report in my program?

I have looked on MSDN and searched for a walkthrough...

I can't find anything that tells me how to use the

report viewer or how to
bring it up on screen...

isn't there a way to bring up the report in a test view

when you are
creating it? if not that is horrible and should be

created.

btw, I am using Visual Studio.net 2003 Ent. Arch and my

reports are imbedded
in my EXE, not saved as .rpt files when the applicaiton

runs.

Thanks, this used to be so much different...

.

Nov 20 '05 #3

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

Similar topics

2
by: http://www.visual-basic-data-mining.net/forum | last post by:
Hi, I wrote a program in VB.Net 2003. The program includes some reports made with Crystal Reports for Visual Studio.Net 2003. On my computer (with Win XP Pro) the program runs as it should do. ...
2
by: Mythran | last post by:
In .Net, how can I go about and set a Crystal Reports namespace? Right now they use the Root Namespace (VB) from the project. How can I extend the namespace for a single report (which will be set...
1
by: andy lim | last post by:
Hello all, I'm developing a web application using ASP.NET/VB. I have problem in viewing my CR reports. It returns following exception when I tried to view any CR report. ...
1
by: CBKowitz | last post by:
I have an intermittent problem, when viewing a crystal report. This problem only happens to some users and some report formats. When they try to view the report in Microsoft Word format the...
4
by: John R. Dougherty | last post by:
I have developed an application with VB.NET, which includes the Crystal Reports (Visual Studio .NET 2003 edition) controls. I can run the application on my PC and it does work fine, but on any...
1
by: John R. Dougherty | last post by:
I have a VB.NET 2003 application which is using the built-in Crystal Reports control for viewing an .RPT file. The .RPT files reside on the server, and the data pulled by these reports is in a SQL...
0
by: Chris | last post by:
I have the following situation in a VB.Net App I am working on: 1.)A report created in VS.Net 2003 using the CR.Net component of VS 2003. 2.)The datasource for the report is a Stored Proc in a...
3
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...
0
lotus18
by: lotus18 | last post by:
Hello World! I have reports (receipts, invoices, etc) created in crystal report and they are working fine, but my client has a pre-printed reports and he wants all the details of the report to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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
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.