Use subreport multiple times in same report

Hi all,

 

I want to create a subreport studio that uses the same saved subreport multiple times but have one variable change. The query in the subreport is 

SELECT DISTINCT DATEADD(MONTH, -13, GETDATE()) AS monthYear
FROM "mytable"

For the first column, I want to display the month and year from 13 months ago. The next time, I want to display the month year from 12 months ago, and so on. Is there a way to do this?

white_falcon02's picture
Joined: Apr 1 2017 - 11:59am
Last seen: 4 years 1 month ago

1 Answer:

Create a Main Dataset based on a Levels (if you are using Oracle Levels create an ascending or descending order of numbers/dates)

Create a Subreport./table with Sub Dataset which will accept this Level number/date from Main Datset and iterate through the Main dataset.

reportdev's picture
11254
Joined: Oct 12 2015 - 12:05pm
Last seen: 11 months 3 weeks ago
Feedback
randomness