web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Run two designs of a report on controller based on conditions

(1) ShareShare
ReportReport
Posted on by 49
Hi, 
 
Is it possible to run two report designs on the same controller? 
My condition is that I want to trigger the second design only if a certain condition is met. 
Is it possible? 
  • Suggested answer
    Waed Ayyad Profile Picture
    9,228 Super User 2026 Season 2 on at
    Hi,
     
    On Your controller's main method, you can add your code:
    public static void main(Args _args)
    {
        YourReportController controller = YourReportController ::construct();
    
        if(YourCondition)
       {
          controller.parmReportName(ssrsReportStr(YourReportName, Design1));
       }
       else
       {
          controller.parmReportName(ssrsReportStr(YourReportName, Design2));
    
       } 
        controller.startOperation();
    }
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • Daniyal Kashif Profile Picture
    49 on at
    Hi Waeed, 
     
    This works however I may not have been clearer in the question. 
     
    I require that based on the data, I want to trigger the second design based on the number of records in the temporary table. 
    So for example I have 50 records, and I want to trigger the second design only when the record count is more than 25. 
     
     
     
  • Waed Ayyad Profile Picture
    9,228 Super User 2026 Season 2 on at
    Hi,
     
    I'm glad your original question is resolved; can you verify my answer in order to help others in the future? For you second question I'm not sure if you can achieve it.
     
    Thanks,
    Waed Ayyad
  • Waed Ayyad Profile Picture
    9,228 Super User 2026 Season 2 on at
    Hi,

    Is your issue resolved?  If yes, mark the answers that helped you as verified.

    Thanks
    Waed Ayyad

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 274 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 213

#3
Subra Profile Picture

Subra 202 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans