on 01-04-2019 10:42 PM
but i cant success my filter data
Dim sql, b As String
sql = 8
b = "Ê"
CrystalReport1.ReportFileName = App.Path & "\report51.rpt"
CrystalReport1.SelectionFormula = ""
CrystalReport1.SelectionFormula = "{customer.code}= " & "" & sql & ""
CrystalReport1.SelectionFormula = "{customer.name}= " & "'" & b & "'"
CrystalReport1.Action = 1
i cant get answer
please help me
Hi Ahmed,
When you build the Selection Formula, you're overwriting the previous entry. So your formula is only going to be:
{customer.name} = 'Ê'
You need to append each line to the formula like:
Dim sql, b, c As String
sql = 8
b = "Ê"
CrystalReport1.ReportFileName = App.Path & "\report51.rpt"
c = ""
c = "{customer.code}= " & "" & sql & ""
c = c & " And {customer.name}= " & "'" & b & "'"
CrystalReport1.SelectionFormula = c
CrystalReport1.Action = 1
The formula you create should look the same as the formula you create in Crystal. Capture the string and paste it directly into Crystal to test it. If it doesn't work in Crystal it won't work from your code.
Good luck,
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thnaks ..
but i want at vb6 not vb.net
are you can help
??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wow, 4.6 was released in 1997.
Are you still using Windows 95 also?
DAO has been ended a long time ago, try using ODBC and it should work.
If you upgrade to Visual Studio 2008 you can get CR 10.5 or VS 2010 -> VS 2017 you can get the CR runtime here:
https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.