473,718 Members | 2,153 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal viewer

Dear NG,

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

private void mnuInvRep1301_C lick(object sender, System.EventArg s e)
{

ReportDocument report = new ReportDocument( );

report.Load("C: \\database\\MCS-3-SQL\\MCS-3inC#\\INV\\Rep orts\\rpt1301.r pt")
;

//Send report to a file

//report.ExportTo Disk(CrystalDec isions.Shared.E xportFormatType .RichText,"C:\
\tmp\\CrystalOu t.rtf");

//Send report directly to the default printer

report.PrintToP rinter(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.ShowDial og();

How do I instantiate the form?

TIA - Bob (bo*@s-i-inc.com)
Nov 16 '05 #1
3 4511
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 misunderstandin g, 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.ShowDial og();

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.mic rosoft.com> wrote in message
news:4H******** *****@cpmsftngx a06.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 misunderstandin g, 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.ShowDial og();

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.mic rosoft.com> wrote in message
news:4H******** *****@cpmsftngx a06.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 misunderstandin g, 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.ShowDial og();

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
1524
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 license documents appear to suggest I can do this, as it's "free runtime" I'm running into problems though since the dlls aren't part of the standard ..NET runtime install and even with FullTrust for the web launched forms app I'm still getting...
0
1007
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 without much problem. Some code would be useful.
0
1285
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 summarizd fields as vertical (default). Is this a Crystal viewer bug? Any suggestions are welcome. Thank you.
4
1492
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 reportviewer displays all the data in the table regardless of the select I run (in this case, the select returns only one record): test MyRpt = new test(); DataSet DS_MyReportsDS = new DataSet(); SqlConnection SQLConn = new SqlConnection("Data...
5
9439
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 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...
1
12173
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 know how will this affect a report rendered by a crystal viewer. I have a web page with a crystal viewer rendering the report on the page. I build my application in one of my development machines and deploy it
1
1337
by: David | last post by:
I'm using VB.net 2003 and Crystal 9.2 thanks Dave
5
3493
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
1161
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 never launches. An error is generated saying something about cordbg.exe. I installed the cordbg.exe and was able to view some of the errors, but I haven't figured out exactly what the problem is. The error is "Unhandled exception generated...
0
8723
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
9354
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...
1
9120
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,...
0
9053
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7987
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6652
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
4481
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...
0
4741
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3182
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

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.