Click here to Skip to main content
15,909,324 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to generate a report by entering a specific persons any details...For eg:by providng an detail in an text box and diplaying the result
Posted
Comments
thatraja 14-Feb-14 5:50am    
which reporting tool?
Jinu Jacob 14-Feb-14 23:37pm    
I had been using SQL Server Bussiness Intelligence development studio for building report.

It is dependent on SQL Query like as follows:

DECLARE @SearchWord NVARCHAR(MAX)

SELECT DISTINCT
*
FROM Employee
WHERE
FirstName LIKE '%' + @SearchWord+ '%'
OR LastName LIKE '%' + @SearchWord+ '%'
OR Address LIKE '%' + @SearchWord+ '%'
OR AnyOtherColumn LIKE '%' + @SearchWord+ '%'
 
Share this answer
 
Comments
Jinu Jacob 15-Feb-14 0:00am    
Thank You so much....It works for me......
If you are using Crystal Report do these steps

Add Crystal Report references


In your form add these lines at top

VB
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine


VB
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
       Dim Rpt As New ReportDocument
       Dim frmView As New frmCRView  'Crystal Report viewer form
       Dim RptName As String = ""
       RptName = "Report Title"

       Rpt = New Report1 'Your Crystal Report Name

       frmView.CRViewer1.SelectionFormula = ("{Table1.pt_id}='" & Trim(Me.TextBox1.Text) & "'") 'Your selection formula if you need two fields just use this type ("{Table1.pt_id}='" & Trim(Me.TextBox1.Text) & "' and "{Table1.visit_id}='" & Trim(Me.TextBox2.Text) & "'")
       frmView.CRViewer1.ReportSource = Rpt
       frmView.CRViewer1.RefreshReport()
       frmView.Text = RptName & " for Patient: " & Me.TextBox1.Text
       frmView.Show()
   End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900