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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Something went wrong while generating the report. Please try again

(4) ShareShare
ReportReport
Posted on by 150
Error is showing on report running.

Solution performed:
1. Removed and added my data set.
2. Restart SSRS service.
3. Created new design.
4. Deploy report
5. Full build.
 
Controller class
class LetterheadController extends SRSReportRunController
{
    public static client  void main(Args _args)
    {
        LetterheadController controller = new LetterheadController();
        controller.parmArgs(_args);
        controller.parmShowDialog(false);
        controller.parmReportName(ssrsReportStr(LetterheadReport, Report));
        controller.startOperation();
    }

    public void preRunModifyContract()
    {
        DSACLetterhead letterhead = this.parmArgs().record();
        DSACLetterheadContract contract = this.parmReportContract().parmRdpContract() as DSACLetterheadContract;
        contract.parmLetterheadId(letterhead.LetterheadID);
    }

}

Contract class
[DataContractAttribute]
class LetterheadContract
{
    LetterheadId     LetterheadId;

    [DataMemberAttribute("LetterheadId")]
    public LetterheadId parmLetterheadId(LetterheadId _LetterheadId = LetterheadId)
    {
        LetterheadId = _LetterheadId;
        return LetterheadId;
    }

}
Report designer
 
Categories:
I have the same question (0)
  • Verified answer
    Ashraf Hussain Khan Profile Picture
    150 on at
    Something went wrong while generating the report. Please try again
    ,

    Thanks a lot, for your precious time. Issue is resolved by creating new AOT report.
  • Sohaib Cheema Profile Picture
    48,313 User Group Leader on at
    Something went wrong while generating the report. Please try again
    Oops, that is going hard man, 
    I do not know how to carry with it but  I would offer an extra mile for you.
    Could you please attach your AXPP project Rayiner file here. I do not want the full model. I would love to Debug it.
    Thank you!
  • Ashraf Hussain Khan Profile Picture
    150 on at
    Something went wrong while generating the report. Please try again
    Yes. it is equal to LetterHead_LetterheadId.
  • Sohaib Cheema Profile Picture
    48,313 User Group Leader on at
    Something went wrong while generating the report. Please try again
    Can you expand the DataSet on the SSRS report named as LetterHeadDS >> Parameters >> LetterHead_LetterheadId >> Properties >> Parameter (make sure it is equal to LetterHead_LetterheadId)
     
     
     
     
  • Ashraf Hussain Khan Profile Picture
    150 on at
    Something went wrong while generating the report. Please try again
    Report is running, based on selected record. That's why, I am using preRunModifyContract() method. But it is not hitting.
  • Sohaib Cheema Profile Picture
    48,313 User Group Leader on at
    Something went wrong while generating the report. Please try again
    Okay got it, 
    Inside the the processReport method of your RDP class, are you getting this/value of Contact class parameter(parmLetterheadId) and adding it as a range to the query's DataSource?
    If not, how the query would filter then? 
  • Ashraf Hussain Khan Profile Picture
    150 on at
    Something went wrong while generating the report. Please try again
    RDP.
    Action menu item.
    Yes, leads me to main method of the controller class using the debugger.
  • Sohaib Cheema Profile Picture
    48,313 User Group Leader on at
    Something went wrong while generating the report. Please try again
    Is your dataset(LetterHeadDS) backed by a Query or RDP ? How you are opening the report. By an action menu item? Does that leads you to main method of the controller class using the debugger?
     
  • Ashraf Hussain Khan Profile Picture
    150 on at
    Something went wrong while generating the report. Please try again
    Debugger is not hitting preRunModifyContract() method.

  • Sohaib Cheema Profile Picture
    48,313 User Group Leader on at
    Something went wrong while generating the report. Please try again
    So if you getting the error at runtime, I suggest you to run the report on your DEV system, and once it will fail with error message, open the event viewer and get the full error message that would also show you stack trace. 
    Having look at that stack trace may help to find the root cause. 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,120

#2
Sohaib Cheema Profile Picture

Sohaib Cheema 815 User Group Leader

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 811 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans