If you don't want to be prompted for database credentials when you open the crystal report you should change the database connection (in crystal, under Database > Database Expert) to use integrated security as opposed to typing in the username / password.
Im using .Net 2, creating a user entry form.
How do I prevent 1 or more characters from being entered into a textbox.
For example: one textbox, I dont want a user entering slashes or single quotes.
In another textbox, I dont want the user entering single quotes.
Have I got to write a whole validation thing, or is there some sort of formatting or regex I can use?
I work with many projects (Visual basic 2005) that i use in many different solutions, but i have a problem with compiling the projects. I need to set the result dir of all my proyects with base on solution's dir. Ex:
I suggest not changing the target folders for the build binaries. Instead, go into the Project Properties, Build Events button, and create a Post-Build event that launches a batch file to copy the resulting files to where you need them.
:(Actually I created a form, which is a MDI.
I then took a form(form 2),which is a child form.
Now when i run the application the child form (form 2)
comes within the MDI.
But now the problem is how i can fix the child form
inside the MDI.
I tried the following code
when i double click the status bar the form size changes
so it moves within the MDI.Now how can i fix it ?.
I hav problem when i opened crystal report through my application on my client's machine.
i m using vb.net 2005 & mysql.
.net framework & connector required are already installed on my client machine, So application is runng all right.
but problem is only while opening crystal reports.
So i searched on net for help....Merge module shuld be included in project setup.
1)I have downloaded merge module "CrystalReportsRedist2005_x86.msm" & kept in my
"C:\Program Files\Common Files\Merge Modules" & have included it while building setup project.
2)it is necessary to include managed.msm file
& i m not getting this file
Anyone please help me.
I have a datagridview to show data. My datagridview is using datasource to binding data. Now my question is , How can i add a new column as checkbox in front of each row? ( means if i have 3 row of record, each row will have one check box ) and store a value to it ? and how i check this checkbox is checked or unchecked ?
You should add the checkbox to the datagrid as a template column. Then you will basically step through the datagrid looking to see if the control exists based on the ID you gave it in the template column and then DirectCast(item, Checkbox) and see if it is .Checked = True or not.
I have a collection class called Customers that allows users to add Customer objects etc. The customer objects are held in a collection. The Customers class implements IEnumerable to enable users to enumerate through the collection via for each and has a public property called Datasource so a user can bind this collection to a datagrid for example. However, after binding the datasource I cannot hide the relevant columns that represent public properties of the class Customer which I assume is because the Collection Class does not implement IList. Apart from making these properties in Customer private or implementing IList, is there any other way I can hide these columns but still bind the datagrid to the collection?
Use TableStyles and GridColumnStyles from the DataGrid properties. They work like a mask, you map the TableStyle to the entire collection and each GridColumnStyle to a column in your collection. Then you have two ways to hide the columns from a user: 1. Just don't create a GridColumnStyle for the columns you want to hide. or 2. Create GridColumnStyles for all you columns, and set the width of the columns you want to hide to 0 or 1 or something.
My advice is free, and you may get what you paid for.
Thanks for your reply. I'm pretty new to VB.net so I apologise if I'm slow to catch on.
I am currently using the DataGridTableStyle and DataGridTextBoxColumm classes to modify the appearance of the datagrid but this doesn't seem to work. Is this the same as mapping to the TableStyle and GridStyleColumm classes you refer to?
My code is as follows:
Dim ts As DataGridTableStyle = New DataGridTableStyle
ts.MappingName = Clients.ActiveRecord.Branchs.MappingName
ts.AlternatingBackColor = System.Drawing.Color.LightBlue
Dim BranchIDColumn As New DataGridTextBoxColumn
BranchIDColumn.MappingName = "BranchID"
BranchIDColumn.HeaderText = "Branch ID"
BranchIDColumn.Width = 0
Dim BranchNameColumn As New DataGridTextBoxColumn
BranchNameColumn.MappingName = "Name"
BranchNameColumn.HeaderText = "Name"
BranchNameColumn.Width = 1000
Dim ClientIDColumn As New DataGridTextBoxColumn
ClientIDColumn.MappingName = "ClientID"
ClientIDColumn.HeaderText = "Client ID"
ClientIDColumn.Width = 0
Dim BranchDateColumn As New DataGridTextBoxColumn
BranchDateColumn.MappingName = "ModifiedDate"
BranchDateColumn.HeaderText = "Modified Date"
BranchDateColumn.Width = 0
' Adds the column styles to the grid table style.
' Add the table style to the collection, but clear the
' collection first.
' set datasource and hide columns
I have moved the SetDataBinding method to before I create the DataGridTableStyle and to the end where it currently is to see if that is the problem but all columns are visible even though I have set some to 0.
The mapping name is a string that is the class name of the objects stored in the collection ie. "clsBranch"
As far as I can tell, you have build the TableStyle and everything correctly. However, because you create the TableStyle at runtime, you also need to link the TableStyle to the datagrid. By the look of things, that's all that is missing from your code.
My advice is free, and you may get what you paid for.
No need to get another job, just do like me: lure a poor coder from India, Pakistan or Sri Lanka to where you live, with the empty promise of a greencard, have him do all the work, and claim it as your own.
You really did write it by the book, as far as I can tell, so I am not entirely sure why it still doesn't work. The only thing I can think of, for you to try is to use:
I don't think I would be able to do that here in New Zealand (down by Australia if you don't know where that is) with our pc brigade, I would be hung, strung and quartered. No jokes about sheep please!
Am using Vb.net as my frond end and sql server 2000 as my back end.
in one of my screen am using grid control to view the data's in the tables, my problem is i want to filter the grid data's ie sno wise filter and name wise Filter. How can i do it? is it possible ? Please Give me detail description.
Do you want a filter from user input or filter the data before it gets to the page?
If you are wanting to pre-filter it then I would do that with your stored procedure.
If you are looking to do this based on user input then you can set you dataset/datatable = to a dataview. Then use a Dataview.Filter = "Column = Validated user input" which is similar to SQL but only requires the WHERE (which is what the "=" means) so remember to use ' ' for characters and the exact value for numerics.
Last Visit: 31-Dec-99 18:00 Last Update: 30-Jun-22 18:07