Page 1 of 1

howto create report based on ASPNET selected combobox value?

Posted: Thu Oct 04, 2012 6:47 am
by transpusat
Hi...

I'm currently evaluating stimulsoft report and already impressed by its capability.
I'm currently developing a small test project "Employee Leave Management" to evaluate the report.
Anyway i have slight problem and hope you guys could help me out, i already search the forum and found none.

1. I have 2 table in database (sqlserver express 08)

tbEmployee
------------------------
ID (PK, Identity)
EmpID
EmpName
EmpBirthDate
EmpJoinDate
EmpAddress

tbEmployeeLeave
------------------------
ID (PK, Identity)
EmpID
StartDate
EndDate
LeaveType
Notes

2. I have one DevExpress ASP.NET combobox (populated at runtime) using following code

...........
Private Sub PopulateEmployee()
Dim strQuery As String = ("select ID, EmpID from tbEmployee")
using cmd As SqlCommand = New SqlCommand(strQuery)
ddlSelectEmp.DataSource = GetData(cmd)
ddlSelectEmp.ValueField = "ID"
ddlSelectEmp.TextField = "EmpID"
ddlSelectEmp.DataBind()
End Using
End Sub

Private Function GetData(ByVal cmd As SqlCommand) As DataTable
Dim dt As DataTable = New DataTable
Dim con As SqlConnection = New SqlConnection(strConnString)
Using sda As SqlDataAdapter = New SqlDataAdapter()
cmd.Connection = con
con.Open()
sda.SelectCommand = cmd
sda.Fill(dt)
End Using
Return dt
End Function
...........
And here is the combobox screenshot
Image

3. my question is, how to create employee leave detail report based on user selected combobox value (EmpID) ? is it possible?, i think the report must be generated at runtime, unfortunately i cannot found any manual nor tutorial regarding that scenario in the forum

thank you, your guide and help is much appreciated

H.E

Re: howto create report based on ASPNET selected combobox va

Posted: Mon Oct 08, 2012 2:09 pm
by HighAley
Hello.

You could create a report with variable where you set a request from user option and you don't need to use DevExpress ASP.NET combobox.
Please, look at the http://web.stimulsoft.com/?reportname=P ... ingCountry demo report.
Also you could watch our videos in the Work with Report Parameters section http://www.stimulsoft.com/en/videos

Thank you.