I am working on PSAManageInvoice Report, (Projects->InvoiceProposal->PrintPreview), I have created a new Precision design under the report, PSAManageInvoice, for Example "ReportPeriod" how do i open the report with this design???
I checked in standard AX, i get numerous examples, but i am missing some steps here.
In PsaProjAndContractInvoiceController, class i am trying to add my new design, but for some reason, it gives me syntax errors :
this.reportName(ssrsReprtStr(PSAManageInvoice,reportPeriod); does not work???
any help in this regard, or steps to be followed??? is much appreciated.
i know, the process to set it up, using the FormSetup and then choose, the new design, and the process behind it, what if i have 5 designs and i wan to them to open, based on certain conditions.
You are taking the right approach, but in the code that you posted you are missing an end parenthesis. Was that a typo or is that the actual source of the syntax error?
hi Brandon thanks for the reply, ya it was a typo. however i have written my code in..
\Classes\PSAProjAndContractInvoiceController\initArgs. instead of standard line of code...
i have written below code:"
but this does not seem to work, it always takes design "report" instead of report1, i guess its taking report design from the form setup..
do you have any pointers to this???
Assuming that you are launching the report from an Output menu item, have you specified the report design on that menu item? If so, try clearing that. I'm not sure what happens if you specify by code and also on the menu item (which wins?). I think it depends on where you set it in your code.
the menuitem will be opened at runtime, i mean to say its not directly through menuitem, at the run time code decides which report to open, in this case its PSAManageInvoice. however menuitem points to controller class, not directly to the SSRS report.
I'm not sure why your approach is not working for you. I have myself changed the report design in code and never had trouble with it, but admittedly not with that report or any Print management document.
I suspect that the report name is being reset in another place, and that your change is not "sticking" all the way through to printing. For example, within that PSAProjAndContractInvoiceController class in the method runPrintMgmt() you can see the line of code
that changes the report name again right before printing, though this only applies apparently when BrazilParameters::isEnabled().
I think you should place a breakpoint in Classes\PrintMgmtReportRun\execute() or Classes\SrsReportRunController\runReport() or a similar piece of code later in the print process, to see if your change is being overwritten.
Hey pradeep, you done is right , All you need to do is clear the syslastvalues once and check. I feel that the formLetterReports currentsettingDetails member value is initialized using syslast values.
Please place your debbuger in the outputReports method and trace through the execute method. I tried to do this but i am now 6.1 fpk so there is nor printmanagement setting on the report in this version
Please look into PrintMgmtReportFormat table and it has the Report Name with its Design Name to be executed. The default design name for all the reports in the table is Report. The reports present in the table are based on the Print Management Settings. I guess the table has your report (PSAManageInvoice) also.
So if you add multiple designs and changing the design name in the Controller class will not solve your problem. Since, the code always picks up the design name from the above table and executes the design.
1. You can add your customized design name in the above table instead of default one.
2. Try to add your code to execute the customized design in the class PrintMgmtDocType\getDefaultReportFormat method.
I hope this will solve your problem.
In my case, I have two different report designs. Based on purchase type i need to locate the different report designs. For example, if my purchase type is "purchase order" i need to show the report design 1 and if my purchase type is "returned order", i need to show the report design 2 from the same copy/original product receipt button.
How to do that? any idea? Is that can be done through SSRS controller classes?
Instead of getting the report name from formLetterReport.getCurrentPrintSetting().parmReportFormatName();
over ride the report name when the confirmation journal is of type return with your new design name.
This is to be done in the controller class outputReport method is the controller can extend the class SrsPrintMgmtFormLetterController in some fashion.
Thanks for your reply !!
You mean to say that i need to write my logic at 'Output' method of controller class to execute my different designs at run time???
If the report's controller extends SrsPrintMgmtFormLetterController class . Then override the outputReport method,set the report design name and call super. If the report controller doesn't extend then you might need to write code (override) in outputreports or runPrintMgmt method to set the reportname using the PrintMgmtPrintSettingDetail class method parmReportFormatName after getting the default formats from print management setting
I am the facing the exact issue on PSAProjInvoice report. Can you please let me know the fix for the issue.
I did override outputReport method in controller class:
and changed the record in PrintMgmtReportFormat Table to "ReportName.MyDesign" and now its printing my design from everywhere.