logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
scott9677  
#1 Posted : Tuesday, October 2, 2018 12:58:12 PM(UTC)
scott9677

Rank: Advanced Member

Groups: Registered
Joined: 5/18/2018(UTC)
Posts: 40

Thanks: 2 times
I'm trying to make a chart and table for percent returns by account number between two dates.

I'm thinking that it would be most efficient to
1) Create a temp table and query the count and sum of returns for all accounts in that time period
2) Create a temp table to query the count and sum of total sales for the time period of the accounts in the #1 temp table
3) Generate a report on an inner join of the two queries along with a percent calculation for counts and sums.

If I create a model restriction of start date and end date with the operator of 'value only', is it possible to get that value back to the temp table queries in a 'Pre SQL Statement'?

If not, what's the best way to do this?
epf  
#2 Posted : Wednesday, October 3, 2018 3:39:39 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
Difficult to answer without achieving your case,
as you mentioned you may use restriction with the operator 'Value Only' and 'Use as Parameter' (cf samples 52-User Input').
Then I am not sure you can use these values in the Data Source for table definition, however you can have a Task that does what you need.
In a task you can get the restrictions values, modify your Data Source, create table in your database, etc... it is either C# or SQL.
Check also the task defined in sample 34-Task Generate several Report Results

Good luck.
Users browsing this topic
Guest
Forum Jump  
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.