u can use sqldatasourceenumerator to get the available sql instances like Dim dt As New DataTable dt= Sql.SqlDataSourceEnumerator.Instance.GetDataSources DataGridView1.DataSource = dt.AsDataView
Dambod
Posts
-
Searching for installed SQL Server Instances -
Is that Possible? [modified]Hi there, I am currently trying to generate a report based on crystal report 10. In my report there are some parameters that should be displayed only once, some parameter for every record but some only a few times. Here is what i did, I put those parameters that will be 1. displayed once on the page headers 2. displayed for every record from the database in details section, and I used GROUPING for others. Name____Col1_____Col2____Col3____Time ______________________________Dias_Horas_Minutos SUBAREA_a X____test____AAAA____AAAA1____1____2____3 Y____test____BBBB_____BBBB1____3____2____1 _____________________Subtotal____4____4____4 SUBAREA_b X____test____AAAA____AAAA1____1____2____3 Y____test____BBBB____BBBB1____3____2____1 _____________________Subtotal____4____4____4 SUBAREA_c X____test____AAAA____AAAA1____1____2____3 Y____test____BBBB____BBBB1_____3____2____1 _____________________Subtotal____4____4____4 _____________________TOTAL____12____12____12 My question is that possible to have a sub-grouping with grouping in Crystal report? with regards,
modified on Wednesday, October 21, 2009 10:49 AM
-
CheckBox column in DataGridViewtest whether the checked property is true to do whatever you want
-
i want to print two crystal report pages on a single paper using codehello there, thank you guys over there who were giving me the idea to this question. I finally managed to solve my problem and might help also other to post here. 1.I just created two independent subreports on my main reports 2. I linked my main report parameters to subreports parameters so that when the parameter in main report receives values from the application it will pass those values to the sub reports parameters at runtime.
-
i want to print two crystal report pages on a single paper using codeThanks Samir, I am afraid there is such thing in CR. but I appreciate ur help. I m still waiting for someone to help on my idea
-
i want to print two crystal report pages on a single paper using codeNo, i am not looking for how to manually display my printer to print two pages on a single page. Rather I want to Send two crystal report pages say 1-2 to my default printer as a single paper document,ie, the two pages will be put on a single page output from my application before starting the print operation. is that possible?
-
i want to print two crystal report pages on a single paper using codeHello there, How can i print two crystal report pages on a single paper without user intervention? thanks,
-
Any one with helping hand?Hi David, Thanks for the reply. I am using stored procedures that require three parameters from the its caller. Based on the data supplied to the stored procedure data will be generated from various table. Can u give me some hint on how to do so using sub-reports. here is my sample code for calling stored procedure to generate report. dim rpt as new myreportname rpt.SetParameterValue("@studid", DataGridView1.CurrentCell.Value) If ComboBox3.SelectedItem IsNot Nothing And TextBox3.Text IsNot Nothing Then rpt.SetParameterValue("@term", CInt(ComboBox3.SelectedItem)) rpt.SetParameterValue("@academicyear", TextBox3.Text) GradeReportForm.CrystalReportViewer1.ReportSource = rpt GradeReportForm.StartPosition = FormStartPosition.CenterParent GradeReportForm.WindowState = FormWindowState.Maximized GradeReportForm.CrystalReportViewer1.PrintReport() Else MsgBox("Please Set Term and Academic year to Generate Report") End If I am grateful for any help you may give me. with regards,
-
Any one with helping hand?I have a data page header,details and and footer section of crystal report 10. I want to duplicate these sections on the same page so that the same data will be contained on each of these sections and finally printed on a single paper. so that user can finally cut the paper into two pieces. Is that possible to do so or any other solution to this problem any one with help? with regards,
-
Read Data from EXcel Based on Conditions to DatasetGood Time for U all, I am working on an application, I want to read data from excel based on conditions like for example "select somecolumns from [excelsheet$] where acolumnname="somevalue". Is that possible to do so. Can anyone help me in do so or give me other clues for my purpose. With regards,
-
Data from Scanner to Databaseis that possible to 1. read data scanned based on some criteria, 2. put those data that meets the criteria to database? 3. if so, please some hint thank u so much
-
Data from Scanner to DatabaseHi there, I am working on projects which requires scanning data from scanner, format data,store selected data from scanned one to database. Any one with idea? I am looking for idea on how to read data from scanned one
-
Data from Scanner to DatabaseHi there, I am working on projects which requires scanning data from scanner, format data,store selected data from scanned one to database. Any one with idea? thanks
-
Data from Scanner to DatabaseHi there, I am working on projects which requires scanning data from scanner, format data,store selected data from scanned one to database. Any one with idea? Thanks
-
Any Problem with this code?i used this code because the final data to be displayed on crystal report depends on user data input. everytime user input changes the report data changes.
-
Any Problem with this code?I am trying to insert multiple records on crystal report 10 using the following codes. I have multiple columns, too. But the following code displays only the first record in the dataset. when i put the last two lines before the word "next" it displays only the last record. Can any one fix it or give me some suggestions? I thank any efforts made to solve this problem NB: param3 is the parameter field that is found on crystal report For c.rowIndex = 0 To c.ds.Tables("studreport").Rows.Count - 1 discvalue = New ParameterDiscreteValue discvalue.Value = c.custView(c.rowIndex)("coursename") param3.CurrentValues.Add(discvalue) paramfields.Add(param3) Next
-
I need your help desperately on Crystal report [modified]I have a crystal report, report viewer and a database. the Crystal Report gets its data when datagridview1 item is selected(changed). But I couldn't find the problem why variable "disv3" can't get value at run time. "DS" is my crystal report dataset which acts as datasource. Dim rpt As New GradeReport Dim dd As New DS rpt.SetDataSource(dd) Dim paramfield1, param2, param3 As New ParameterField Dim paramfields As New ParameterFields Dim discreteval1, disv2, disv3 As ParameterDiscreteValue paramfield1.Name = "column1" param2.Name = "column2" param3.Name = "column3" TextBox5.Text = "introduction to management" ' For i As Integer = 0 To DataGridView1.Rows.Count - 1 discreteval1 = New ParameterDiscreteValue discreteval1.Value = DataGridView1.CurrentCell.Value.ToString paramfield1.CurrentValues.Add(discreteval1) disv2 = New ParameterDiscreteValue disv2.Value = DataGridView1.CurrentRow.Cells(1).Value.ToString param2.CurrentValues.Add(disv2) disv3 = New ParameterDiscreteValue ' TextBox5.DataBindings.Add(New Binding("text", bs, "coursename")) c.custView = New DataView(c.ds.Tables("student"), "", "studid", DataViewRowState.CurrentRows) For c.rowIndex = 0 To c.ds.Tables("student").Rows.Count - 1 disv3.Value = c.custView(c.rowIndex)("StudentFullName").ToString param3.CurrentValues.Add(disv3) Next paramfields.Add(paramfield1) paramfields.Add(param2) paramfields.Add(param3) GradeReportForm.CrystalReportViewer1.ParameterFieldInfo = paramfields GradeReportForm.CrystalReportViewer1.AutoSize = True 'Next GradeReportForm.CrystalReportViewer1.ReportSource = rpt GradeReportForm.Show() GradeReportForm.CrystalReportViewer1.Refresh()
modified on Tuesday, August 18, 2009 5:09 AM
-
How to Generate data on Crystal Report when Datagridview item is selectedsolved
-
How to Generate data on Crystal Report when Datagridview item is selectedFor i As Integer = 0 To DataGridView1.Rows.GetRowCount(DataGridViewElementStates.None) - 1 If DataGridView1(2, i).Value Is DBNull.Value Then MsgBox("you didn't Select Student ID", MsgBoxStyle.Exclamation, "Student ID Missing") Else 'displaying selected student data on crystal report If DataGridView1(3, i).Value.ToString = "A" Then rpt.setdatasource(ds) 'ds is my dataset where student table is found dim myparams as new new ParameterFields() dim myparam as ParameterField = new ParameterField() dim myDiscretevalue as new ParameterDiscreteValue() '// Set the ParameterFieldName to the name of the parameter '// created in the Field Explorer myParam.ParameterFieldName = "StudFullName '// Add first student myDiscreteValue.Value = "Peter" myParam.CurrentValues.Add(myDiscreteValue) '// Reuse myDiscreteValue, and assign second student myDiscreteValue = new ParameterDiscreteValue() myDiscreteValue.Value = "Smith" myParam.CurrentValues.Add(myDiscreteValue); '// Add param object to params collection myParams.Add(myParam) '// Assign the params collection to the report viewer myCrystalReportViewer.ParameterFieldInfo = myParams '// Assign the Report to the report viewer. '// This method uses a strongly typed report, '// but other methods are possible as well. myCrystalReportViewer.ReportSource = MyReportObject end if and the problem is it says no valid table. can u help me in correcting this code so that when datagridview row is selected, data for the selected student is displayed on the report thanks
-
How to Generate data on Crystal Report when Datagridview item is selectedhi there, i am using crystal report 10 to generate using VB 2008. I have a problem in generating data for crystal report when datagridview item is selected. my datagridview gets data from a dataset called ds. any help?