Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Several questions related to Winformas
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Several questions related to Winformas
Divers
Thread ID:
00974701
Message ID:
00974701
Vues:
54
I am sorry the title isn't very descriptive but I have several questions and couldn't come up with a good title.

1. When I add a winform to my project there are two files created, a cs file and a resx. What is the purpose of the resx file? Do I need to check that file into VSS or is this file generated by VS.NET when I view the form in the designer?

2. I want to create a generic form with a crystal preview control on it. I will then call upon this form from several applications when I want to preview a report. So what I did was to add a winform to my project and add a crystal preview control. Below is the code generated:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace ALS.Crystal
{
	/// <summary>
	/// Summary description for ALS.
	/// </summary>
	public class frmPreview : System.Windows.Forms.Form
	{
		private CrystalDecisions.Windows.Forms.CrystalReportViewer crViewer;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public frmPreview()
		{
			InitializeComponent();

		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.crViewer = new CrystalDecisions.Windows.Forms.CrystalReportViewer();
			this.SuspendLayout();
			// 
			// crViewer
			// 
			this.crViewer.ActiveViewIndex = -1;
			this.crViewer.Dock = System.Windows.Forms.DockStyle.Fill;
			this.crViewer.Location = new System.Drawing.Point(0, 0);
			this.crViewer.Name = "crViewer";
			this.crViewer.ReportSource = null;
			this.crViewer.Size = new System.Drawing.Size(292, 266);
			this.crViewer.TabIndex = 0;
			// 
			// frmPreview
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(292, 266);
			this.Controls.Add(this.crViewer);
			this.Name = "frmPreview";
			this.Text = "Preview";
			this.ResumeLayout(false);

		}
		#endregion
	}
}
What code do I need for this form to display? Should I make the crystal preview control public (so I can change ReportSource and other settings) or should I add my own public method where I can set these things?

How do you deal with previewing crystal reports?

Any other comments related to crystal preview control and forms would be appreciated.

Thanks,
Einar
Semper ubi sub ubi.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform