Hello everyone...

I love the magic that programming does, that's why am here.

Right here, I am using

..........Visual Studio (VB.net) 2012
..........SQL Server 2012

I am actually creating a program to do two main functions....

1). To Search for records from multiple MSsql tables and display the result in a report viewer or crystal report. (I don't want to use datagrid display on forms)

I have a screenshot of the User Interface, but I wish I could attach it here.

Problem:

I want to search the student table when the user selects the first radioButton and to search the institution table, when the user selects the second radioButton and display the search results in any simple report (Crystal or ReportViewer). Kinda in a search engine pattern though.
I don't know how to even proceed.

2). To randomly assign data from one field or column in a table to another field or column from another table, in a report viewer or crystal report. This module will select an item from the list in the combo-box as its filter and collect information from Student table, school table (tables I am using for the application) and most importantly, randomly select a state from the state table, where the state ISNot students' state of origin.

ok... an algorithm of what I want should be like this.

start

   select (student name, course, school, state_of_origin) from student_table

   then randomly select (any_state) from state_table where any_state ISnot equal to student_table.state_of_origin

   display result in crystal report or report viewer

end

Problem:

I want to code the 'Generate' button to get random data from the state column in the state table, and assign or should I say append it to the expected result from the algorithm/query above.

I haven't written any code or either module, so please bear with me on the absence of codes in this problem, which I know will make greater sense to you. But with the explanation above, I feel you have an idea of what I intend to do.

Thanks so much in advance.

Regads
Rex

you can write like this way........

Dim st As String
If radiobutton1.Checked = True Then
            st = "level1"
        ElseIf radiobutton3.Checked = True Then
            st = "level2"
        ElseIf radiobutton3.Checked = True Then
            st = "level3"



select (student name, course, school, state_of_origin) from student_table where school='" & st "'

Thanks for your interest in my work Dili...

Please, can you butress more on what you wrote. Is it suppose to solve problem 1(search using textbox and radio buttons to display in crystal report), or problem 2 (Generate and auto-assign states to students).

More codes will be apprecieted, in details.

Thanks alot.
Rex

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.