data source

Stimulsoft Reports.NET discussion
Post Reply
majidsoft
Posts: 66
Joined: Fri May 07, 2010 6:54 am

data source

Post by majidsoft »

hi evvery body i use crystal report to design my report but now i want to create a report with stimul but i cant do that i use this code to filter my information to send to the report please see my code and say me the correct code
thanks

Code: Select all

 Dim cnn As SqlConnection = Fn_Get_SqlConnection()
        Dim ds As New DataSet
        Dim Cmd1 As SqlDataAdapter = New SqlDataAdapter("Select * from rest where (pri=" & 1 & ") and ((code=" & txtcode.Text & "))", cnn)
        Cmd1.Fill(ds, "rest") : Dim rpt As New cry2 : rpt.SetDataSource(ds)
        frmreport.CrystalReportViewer1.ReportSource = rpt : frmreport.Show()
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

data source

Post by Jan »

Hello,

Please check attached sample project.

Thank you.
Attachments
410.SqlParameters.zip
(39.68 KiB) Downloaded 170 times
majidsoft
Posts: 66
Joined: Fri May 07, 2010 6:54 am

data source

Post by majidsoft »

thenks for your attention
but this code in this code when im in a designer when i want to create a parameter i write this code
select * from information where code=@code
when i use this code in access database there is no any problem but when i use this code to sql server i found a error on it
but if i write this code
select * from information where code=12
i found no any problem
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

data source

Post by Jan »

Hello,

Can you provide more details about problem which you have with parameter? Any error messages or something also?

Thank you.
Post Reply