Hi,
i try to extend the SalesConfirmation and SalesInvoice report, and therefore created a new table, extended the data provider, all that worked well.
But when i wanted to add fields from the new dataset to the lines section in the report by a tablix, i was not allowed to change the datasource. In some posts i read to use a subreport instead, but when i added the subreport to the tablix, i have no dropdown in the "Use this report as a subreport:"-field, and whatever i enter there manually is not accepted.
Error message: "The report definition for report '{Reportname}' has not been specified"
I tried different notations: xyzReport, xyzReport.Designname, DynamicsAX.xyzReport.Designname etc
Can anyone tell me please, if it is possible to add a subreport to the formletters (e.g. SalesConfirmReport), and what i have to do to get a drop down in that field, or which notation i need to put a report name there.
Thanks,
harald
*This post is locked for comments
Esther,
You define the parameter via the Subreport properties in the main report. Since the main report doesn't know what properties your subreport might have. You have to define the name of the parameter (make sure that it matches what the parameter in your subreport design is called or you'll get an error. I think you should be able to put D0002 (with no quotes) as the value, but if you want to make completely sure that it is right, open the Expression editor (fx button) and enter either the value ="D0002."
Remember as mentioned above, you will need to save to the AOT and deploy both the report and subreport to test. Visual Studio does not know how to render the subreport in VS, so you have to do it AX.
Hope that helps.
Brandt
Hi Lucas,
How to set value of the parameters in the subreport?
I've added the subreport to my main report, it works well without parameters.
But I need to use parameter in my subreport.
I've added parameter from the subreport properties, but I confused how to add the value. Lets say that I want to use a hardcoded value. Should I fill the value with something like "D0002" in the value text box? or simply just the string D0002 without the quote?
Thank you in advance,
Esther
Hello everyone, I tried the Stefan Quinn solucion, but in Visual Studio it did not work. Running the report inside AX, it worked.
Sad but it's true.
Don't forget the AX_CompanyName parameter on SubReport.
Hi Stefan Quinn ,
Kindly, i face the same problem could you clarify your solution more ? , waiting for your reply ASAP ,thanks.
Ok
Round of applause for how badly SSRS is implemented in AX 2012. What is a robust and easy to use product is stupidly complex in AX!
My advice is to only use AX SSRS if you absolutely have to, otherwise just use regular SSRS.
Anyway, the only way I could get sub reports to work in AX SSRS is to do the following:
1. Your sub report must be in the same visual studio project as your main report.
2. Create your sub report control and link to the sub report. In REAL SSRS in the sub report properties box, the sub report is then in a drop down list. Not so in AX SSRS. You have to type in the report name with the .design, e.g. mySubReport.PrecisionDesign1
3. Manually add your parameters to pass them from the parent to the sub report. Again REAL SSRS used drop down boxes, but AX SSRS, you guessed it, you have to type them in.
I tried for hours to use a sub report that got its data from a query that had a range, in the hope that I could pass the parent report parameter to use this range. The parameter shows up as a dynamicParameter, but alas couldn’t get it to work.
The only way I could get this all to work was to use a report data provider for the sub report, and in AX have a data contract for the parameter for this data provider
See below for my contract code
[
DataContractAttribute
]
class SAB_ConsRptJobCardContract
{
ProjId projID;
}
[
DataMemberAttribute('ProjID')
]
public ProjId paramProjID(ProjId _projID = projID)
{
projID = _projID;
return projID;
}
Hi Harald
Any public information, statement from MS regarding this?
Thanks, Jan
Hi Dane,
sorry to say, in the meantime MS verified this case: sub reports do not work with data providers in precision design.
Kr, harald
Hi, I have the same question for the "Use this report as a subreport" field. Have you find some solution?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156