473,473 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to add selected values into crystal report thorugh checkboxes in vb.net2005

10 New Member
hi ,
here im using vb.net 2005how can i add radiobuttons as column to windows datagridview control
plz help me....
Nov 20 '07 #1
7 5832
Shashi Sadasivan
1,435 Recognized Expert Top Contributor
hi ,
here im using vb.net 2005how can i add radiobuttons as column to windows datagridview control
plz help me....
Hi,
Guess radio buttons are not supported within datagridviews.
You could use a checkbox.
Nov 20 '07 #2
dip_developer
648 Recognized Expert Contributor
hi ,
here im using vb.net 2005how can i add radiobuttons as column to windows datagridview control
plz help me....
see here....

Radiobutton in Gridview
Nov 20 '07 #3
harikap
10 New Member
I have added checkboxes to datagridview dynamicaly in vb.net 2005
Like…….
Private Sub main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim rb As New RadioButton
con.ConnectionString = "Server= harika;uid=sa; initial catalog=superlynx"
con.Open()
cmd.CommandText = "select * from reports"
cmd.Connection = con
cmd.CommandType = CommandType.Text
Call populategrid()
Catch ex As Exception
MsgBox("Load" & ex.Message)
Finally
con.Close()
End Try
End Sub
Private Sub populategrid()
Dim dtcCheck As New DataColumn("Select")
dtcCheck.DataType = System.Type.GetType("System.Boolean")
dtcCheck.DefaultValue = False
adpt = New SqlDataAdapter("SELECT * FROM reports", con)
ds = New DataSet
adpt.Fill(ds, "reports")
'dvEmp = New DataView
'dvEmp.Table = dsEmp.Tables(0)
dt = New DataTable
dt = ds.Tables("reports")
dt.Columns.Add(dtcCheck)
DataGridView1.DataSource = dt


End Sub
O/p is:


Like wise how can I add radiobuttons to this windows datagridview dynamically
Nov 20 '07 #4
harikap
10 New Member
I have added checkboxes to datagridview dynamicaly in vb.net 2005
Like…….
Expand|Select|Wrap|Line Numbers
  1. Private Sub main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2.         Try
  3.             Dim rb As New RadioButton
  4.             con.ConnectionString = "Server= harika;uid=sa; initial catalog=superlynx"
  5.             con.Open()
  6.             cmd.CommandText = "select * from reports"
  7.             cmd.Connection = con
  8.             cmd.CommandType = CommandType.Text
  9.             Call populategrid()
  10.         Catch ex As Exception
  11.             MsgBox("Load" & ex.Message)
  12.         Finally
  13.             con.Close()
  14.         End Try
  15.     End Sub
  16. Private Sub populategrid()
  17.         Dim dtcCheck As New DataColumn("Select")
  18.         dtcCheck.DataType = System.Type.GetType("System.Boolean")
  19.         dtcCheck.DefaultValue = False
  20.         adpt = New SqlDataAdapter("SELECT * FROM reports", con)
  21.         ds = New DataSet
  22.         adpt.Fill(ds, "reports")
  23.         'dvEmp = New DataView
  24.         'dvEmp.Table = dsEmp.Tables(0)
  25.         dt = New DataTable
  26.         dt = ds.Tables("reports")
  27.         dt.Columns.Add(dtcCheck)
  28.         DataGridView1.DataSource = dt
  29.  
  30.  
  31.     End Sub
O/p is:


If I check those checkboxes how can I get the (rep_no,rep_name) values for each row into crystal report

i.e., how the selected values can be appeared in the crystal report header as columns……..
Nov 20 '07 #5
harikap
10 New Member
I have added checkboxes to datagridview dynamicaly in vb.net 2005
Like…….
Expand|Select|Wrap|Line Numbers
  1. Private Sub main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2.         Try
  3.             Dim rb As New RadioButton
  4.             con.ConnectionString = "Server= harika;uid=sa; initial catalog=superlynx"
  5.             con.Open()
  6.             cmd.CommandText = "select * from reports"
  7.             cmd.Connection = con
  8.             cmd.CommandType = CommandType.Text
  9.             Call populategrid()
  10.         Catch ex As Exception
  11.             MsgBox("Load" & ex.Message)
  12.         Finally
  13.             con.Close()
  14.         End Try
  15.     End Sub
  16. Private Sub populategrid()
  17.         Dim dtcCheck As New DataColumn("Select")
  18.         dtcCheck.DataType = System.Type.GetType("System.Boolean")
  19.         dtcCheck.DefaultValue = False
  20.         adpt = New SqlDataAdapter("SELECT * FROM reports", con)
  21.         ds = New DataSet
  22.         adpt.Fill(ds, "reports")
  23.         'dvEmp = New DataView
  24.         'dvEmp.Table = dsEmp.Tables(0)
  25.         dt = New DataTable
  26.         dt = ds.Tables("reports")
  27.         dt.Columns.Add(dtcCheck)
  28.         DataGridView1.DataSource = dt
  29.  
  30.  
  31.     End Sub
O/p is:


Like wise how can I add radiobuttons to this windows datagridview dynamically
Nov 21 '07 #6
Shashi Sadasivan
1,435 Recognized Expert Top Contributor
Hi harikap
Please read the FAQ about double Posting
Please do not double Post Your Questions

If you feel that your Post has gone down the ladder without anyone replying, post / bump in the same thread to bring it up.

Please use your previous thread to continue with the same question.
Nov 21 '07 #7
harikap
10 New Member
hi
im using vb.net2005
&
i want to generate a crystal report dynamically as the data shown from the data gridview i.e.,
i have added checkboxes to 1st datagridview & if i check those checkboxes
the respective data values can be shown in 2nd datagridview
now i need to print those values in crystal report dynamically
can i use the same dataset to generate report which i have used to show the selected values in 2nd datagridview
plz help me out its urgent
Nov 23 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Richard Golebiowski | last post by:
I have been trying to figure this out for quite some time and cannot find any examples in VB.Net or in VB that work correctly. I am working on an application where I want the user to be able to...
3
by: juststarter | last post by:
Hello, I have an aspx file where i've put a placeholder element. On load i create dynamically a table which contains a checkbox and a radiobuttonlist in each tablerow . The radiobuttonlist...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
4
by: juststarter | last post by:
Hello, I have an aspx file where i've put a placeholder element. On load (page_load) i create dynamically an html table which contains a checkbox and a radiobuttonlist in each tablerow . The...
0
by: bonita | last post by:
In my ASP.NET page, I have 2 checkboxes for users to choose which crystal report they want to display. These two reports use different tables. If report1 has been choosen and displayed in the...
0
by: lrobo01 | last post by:
I'm having a problem with Crystal report.net with ASP.NET. The problem occurs when exporting the report. The report uses a discrete parameter with multiple values. When the report is loaded into...
0
by: manishkumar | last post by:
I am new to vb.net2005. In vb.net 2003 code to connect to crystal report 9 is running very perfectly. But in vb.net same code is not runnig.Please help is it is urgent
1
by: Eva | last post by:
I need to pass listbox selected values to crystal report from .net 2005.when I am doing it the error display "The types of the parameter field and parameter field current values are not compatible."...
0
by: Rob | last post by:
Hi, i'am developing an applicion in Visual basic 2005 usign ADO. On my winform i've a groupbox with several checkboxes. The saved value is stored in an accessDB in a specific field . Now i want...
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
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
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...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.