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

Notification

Icon
Error

Options
Go to last post Go to first unread
gaurav11  
#1 Posted : Wednesday, April 19, 2017 2:16:23 PM(UTC)
gaurav11

Rank: Newbie

Groups: Registered
Joined: 3/17/2017(UTC)
Posts: 6
Man
India
Location: India

Thanks: 4 times
Was thanked: 1 time(s) in 1 post(s)
How to pass multiple restriction from parent report to sub report
I.e If we want to get sub report of a specific month based on the auto generated month column of date column than how to do it?
epf  
#2 Posted : Thursday, April 20, 2017 1:31:37 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 576
Switzerland

Thanks: 7 times
Was thanked: 84 time(s) in 81 post(s)
In a sub-report, you can defined several restrictions but set the property: 'Prompt as execution',
then it is better that all the restrictions should normally come from the same table definition...
Using Sub-Report may require particular context, you have really to test them in real condition.
Good luck.
thanks 2 users thanked epf for this useful post.
gaurav11 on 4/21/2017(UTC), netpacket on 12/3/2018(UTC)
netpacket  
#3 Posted : Monday, December 3, 2018 7:01:52 AM(UTC)
netpacket

Rank: Newbie

Groups: Registered
Joined: 12/3/2018(UTC)
Posts: 2
Man
Switzerland

Thanks: 2 times
Hi epf,
I have a Main report which uses tables 'WO' & 'WOLabor' and contains restriction on both tables(WO.Type & WOLabor.WorkDate).Then there is a subreport which has (WO.Type & WOLabor.WorkDate) as "Promp at Execution". The subreport is applied to WOLabor.WorkDate and in server manager it prompts that "1" restriction is added !!! It seems only restrictions that are on the same table as the subreport column are applied.So when I click the WOLabor.WorkDate column in my main report , the subreport is executed with only WOLabor.WorkDate restriction and WO.Type values are not sent to the subreport . Is there anyway to pass restrictions on other table than the subreport column to it?
Thanks

Edited by user Monday, December 3, 2018 7:17:07 AM(UTC)  | Reason: Not specified

epf  
#4 Posted : Monday, December 3, 2018 12:18:33 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 576
Switzerland

Thanks: 7 times
Was thanked: 84 time(s) in 81 post(s)
Yes,when you add a sub-reports from the Server Manager, it takes only the restrictions from the parent table.
However you might edit directly the XML (.scfx) file by adding the restrictions guid got from your sub-report (*.srex)
<Restrictions>
<string>d937c8fc-64a6-415f-a77f-d3d1914e406d</string>
<string>20ed0b7a-87dd-4aaa-8d48-feab848e396b</string>
</Restrictions>
As it is a list of string. It seems to work.
The guid is got from
<MetaColumnGUID>20ed0b7a-87dd-4aaa-8d48-feab848e396b</MetaColumnGUID>

This should be enhanced...

Otherwise, I would recommend to create a view above that makes the join and to create a key column with your date and type...if it fits your requirement.
thanks 1 user thanked epf for this useful post.
netpacket on 12/4/2018(UTC)
netpacket  
#5 Posted : Sunday, December 9, 2018 8:21:08 AM(UTC)
netpacket

Rank: Newbie

Groups: Registered
Joined: 12/3/2018(UTC)
Posts: 2
Man
Switzerland

Thanks: 2 times
Thanks epf, works fine now.
there is just a liitle problem, if I have a restriction in my main report that has multiple values e.g "WO.ShopID IN ('FSSC1','FSSC2')", Only the First value (FSSC1) is passed to the subreport.Any solution for that?
Thanks Again.
epf  
#6 Posted : Monday, December 10, 2018 8:15:20 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 576
Switzerland

Thanks: 7 times
Was thanked: 84 time(s) in 81 post(s)
Normally, you call a sub-report from a cell which has a single value, so for me it is not possible to pass multiple values for the same column in a sub-report context, can you explain more your problem ?
Users browsing this topic
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.