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

Crystal viewer

Dear NG,

I have Crystal Reports working to a file and directly to the printer with
the following:

private void mnuInvRep1301_Click(object sender, System.EventArgs e)
{

ReportDocument report = new ReportDocument();

report.Load("C:\\database\\MCS-3-SQL\\MCS-3inC#\\INV\\Reports\\rpt1301.rpt")
;

//Send report to a file

//report.ExportToDisk(CrystalDecisions.Shared.Export FormatType.RichText,"C:\
\tmp\\CrystalOut.rtf");

//Send report directly to the default printer

report.PrintToPrinter(1, false, 0, 0);

MessageBox.Show("Crystal terminated normally");

}

I would like to use the Windows viewer. I have created Form1. I added the
ReportDocument to Form1. On a menu item click I would like to instantiate
the form to myForm and then use the form as follows:

myForm.ShowDialog();

How do I instantiate the form?

TIA - Bob (bo*@s-i-inc.com)
Nov 16 '05 #1
3 4484
Hi Robert,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to view crystal report on a
windows form. If there is any misunderstanding, please feel free to let me
know.

As far as I know, if you need to view it on a windows form, you need to
place a crystal report viewer on the form, and assign the report document
report source to the viewer. Then you just use the following to show dialog
box.

Form1 myForm = new Form1();
myForm.ShowDialog();

Crystal Report is not supported by Microsoft. For more information related
to this issue please check the following link:
https://support.crystaldecisions.com

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #2
Thank you Kevin,

That worked fine. I have a few formating issues, like landscape
orientation, but I am off and running. I have a lot of C# and Crystal
learning to do, but I am well on my way. Is Crystal Reports the best way to
integrate about 100 reports from a SQL database using C#?

Cheers,

Bob

Robert Schuldenfrei
bo*@s-i-inc.com
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:4H*************@cpmsftngxa06.phx.gbl...
Hi Robert,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to view crystal report on a
windows form. If there is any misunderstanding, please feel free to let me
know.

As far as I know, if you need to view it on a windows form, you need to
place a crystal report viewer on the form, and assign the report document
report source to the viewer. Then you just use the following to show dialog box.

Form1 myForm = new Form1();
myForm.ShowDialog();

Crystal Report is not supported by Microsoft. For more information related to this issue please check the following link:
https://support.crystaldecisions.com

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #3
Hi Again,

I thought I could adjust the viewer properties without any further aid from
the NG, but I was wrong. When I print my reports to a file or directly to
the printer, the orientation is landscape. This was set in the report
itself using Designer | Printer Setup and setting the printer to landscape.
When I send the report to the viewer, using the statements listed below, the
lines are truncated because the viewer is defaulting to portrait
orientation. How can I change this viewer property? The book I am using is
Neil FitzGerald et. al., Using Crystal Reports 10. It is very good at
explaining Crystal, but is very brief on explaining the .NET material. As
ever, thank you in advance for your help.

Sincerely,

Bob

Robert Schuldenfrei
bo*@s-i-inc.com
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:4H*************@cpmsftngxa06.phx.gbl...
Hi Robert,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to view crystal report on a
windows form. If there is any misunderstanding, please feel free to let me
know.

As far as I know, if you need to view it on a windows form, you need to
place a crystal report viewer on the form, and assign the report document
report source to the viewer. Then you just use the following to show dialog box.

Form1 myForm = new Form1();
myForm.ShowDialog();

Crystal Report is not supported by Microsoft. For more information related to this issue please check the following link:
https://support.crystaldecisions.com

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #4

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

Similar topics

0
by: Leon Jollans | last post by:
I'm looking at the possibility of distributing a crystal report viewer control within an application on our intranet using "no-touch deployment". It'll be internally only, and the crystal.net...
0
by: The Fantom | last post by:
I have two reports, which I need to display via the Crystal Viewer either by using the tabs or appending the two reports or any other method possible. How do I do this? I can display one report...
0
by: RCS | last post by:
I have a crystal report which works fine in the Crystal design. The crosstabs display the summarized fields as horizontal, but when I run the same report in dotnet the crosstabs display the...
4
by: JK | last post by:
In my Windows form, I have a discrepancy between what the CrystaReport viewer displays and what the dataset contains. The Report displays data from three fields from same table but the...
5
by: Robert Schuldenfrei | last post by:
Hi Again, Forgive me for posting this again, but old items seem to get little review. I thought I could adjust the viewer properties without any further aid from the NG, but I was wrong. When...
1
by: Karthic | last post by:
When i right click on the .rpt file in the VS 2003, i see a property printer setting. It says "No printer" on the top and there is option to select printer and paper settings etc.. I want to...
1
by: David | last post by:
I'm using VB.net 2003 and Crystal 9.2 thanks Dave
5
by: Atley | last post by:
There is a tab at the top of the Crystal Viewer that says 'Main Report'. How in the heck do I rename that tab to my report name or remove it altogether?
4
by: krgatez | last post by:
I have created a Windows Form app that uses the Crystalreportviewer. There is a main menu that links the viewer to different .rpts. Everything is working fine. When I deploy this application, it...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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...

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.