|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Crystal reports sql command
Hello.
I've done a report with Crystal reports. The report is based on a command. My probelm is that i don't know how to use parameters for my query. I will like to send (to SQL Server) a query that will return a row form a table. I can show a row from a table by using parameter field, but this will filter the results from SQL Server, (the result is the entire table - this is what i don't want). Best regards NTony. |
|
#2
|
|||
|
|||
|
Crystal reports sql parameter
Hello,
you can go around this problem. Define view with where condition referred to PARAMS table PName field filled before report is running. Example: select books written by 'John'. Create table PARAMS(PName varchar, PValue varchar). Insert row: 'AUTHOR', null In your code : UPDATE PARAMS SET PValue='John' WHERE PName='AUTHOR' In the report data source define view: SELECT * FROM PUBS WHERE AUTHOR = (SELECT PValue FROM PARAMS WHERE PName='AUTHOR') Data are filtered on the server. PARAMS rowlock should be implemented for multi-user app. If you will find something easier, please let me know. Regards, Peter |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > Crystal reports sql command |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|