Joined: 22 Dec 2011
Online Status: Offline
Posts: 1
Topic: Reference in SQL Expression to a group key Posted: 22 Dec 2011 at 4:34am
Hello to everybody, i am working with a report in Crystal Report 11 and i need some help.
In the design of my report i have two groups corresponding to a table which has two keys. The first one belongs to an Id and the second to a datetime.
The fact is that i have to filter second group with a specific date that i have to obtain with a sql query. So i was thinking in using SQL Expression but i cant make it the right way because i cant filter in the where condition with the id of the superior group. I dont know how to write the where condition.
If anyone can help me i will be grateful.
Thanks.
Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Posted: 22 Dec 2011 at 11:56am
all the filters for the whole report go in to select expert(crystal
only), if you only need to filter on one field you can create
formulas(crystal and SQL)
if you need help writing in crystal just write your where statement and me or someone else will help you.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 23 Dec 2011 at 10:29am
you could also apply a filter in Report/Selection Formulas/Record...something like
{table.field} = {table2.fieldx}
table2.fieldx is the output of the sql stored proc.
though, if you need to get the date with a stored proc, why not do all the work there...get the date and apply it, then return just the data that works.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum