ReportPortal
ReportPortal
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 ReportPortal General Forum
 Report Portal General Issues
 SQL Expression in Subscription Filter

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Message:

* HTML is ON
* Forum Code is OFF
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
lfessler Posted - 05/17/2017 : 13:51:04
Is there a way to enter SQL Expressions into a subscription filter value? I have a number of Crystal Reports that use 'Start Date' and 'End Date' filter. When I set up the filters for the report I can set a default value using the 'Expression' checkbox and then using SQL, e.g. GetDate().

Is it possible to do this in the subscription window as well so that I can set a custom date range (such as 7 days ago through today) into the subscription parameters?

Thanks.
1   L A T E S T    R E P L I E S    (Newest First)
admin Posted - 05/18/2017 : 12:40:19
No, this feature does not currently exist. It can be implemented in a future release by adding "Expression" checkbox in the Subscriptions dialog under Filters tab.

Until then the workaround would be to update the JobFilter.FilterValue field manually or using an SQL Server job. Here is SQL that explains the table relationship in ReportPortal database:

select r.ReportName, j.JobName, f.FilterName, jf.FilterValue
from Report r
join QueryFilter f on f.QueryId = r.ReportId
join Job j on j.ReportId = r.ReportId
join JobFilter jf on jf.JobId = j.JobId and jf.OrderId = f.OrderId

ReportPortal © 2000-2002 Snitz Communications Go To Top Of Page