Report Generator and standalone GUI - no workspace

3 ビュー (過去 30 日間)
Esben
Esben 2012 年 6 月 21 日
回答済み: Abhishake 2014 年 3 月 14 日
Hi
I am built a GUI, from which a pdf-report of the results should be created. I have (a trail - but will order if this works...) the Report Generator and everything works fine as long as the setup file has access to the workspace. But after compiling the GUI to a standalone there exist of course no workspace. For example I want to present a variable stored in the GUI, normally I will say:
Variable = getappdata(name,’Variable’)
But placing this in the “Evaluate MATLAB expression”, nothing happens in the generated report. Hence what I really want is to present an array as a table, (Array-Based Table), will also not work since that it seems that I have no access to appdata.
Any suggestions to overcome this problem and give me access to my GUI appdata in the Report Generator after compiling to Standalone? (And I will prefer not to save mat-files along the way)

回答 (2 件)

owr
owr 2012 年 6 月 21 日
Its been some years (and several releases) since I tried this, but I do recall being able to succesfully compile a GUI that included report generation (vai the "report" function).
The one issue I ran into was needing to explicitly include the rpt file and any functions that it was calling through the "Evaluate MATLAB expression" blocks as additional files in the deployment project. The dependency search that normally occurs with deployment was unable to parse the rpt file. Is this possibly the issue?
Again, this was at least 3 years ago (6 MATLAB releases) and I no longer have access to the Report Generator.
Alternatively - if your overall goal is to present an array as a table and html is acceptable output format, you may want to consider skipping Report Generator and generating html tables directly using some of the utilities like this: http://www.mathworks.com/matlabcentral/fileexchange/14453-printing-variables-to-html-tables-in-published-code
Ive been using these lately with cell mode publishing for my own customized reporting, and plan on eventually just generating all html directly without publishing so that I can compile it in the future. You'll probably end up getting deeper into html and css than you originally wanted, but with greater control comes more flexibility and the ability to get things to look exactly as you like.
  2 件のコメント
Esben
Esben 2012 年 6 月 22 日
Thanks...
It seems that if I include the rpt file in the deployment project I have access to the GUI appdata.
Thank you for the fast answer.
Diego Alvarez Estevez
Diego Alvarez Estevez 2012 年 7 月 4 日
Hi Esben,
My problem with Matlab Report Generator is not (still) related with generation of an standalone application but it is that i'm not even able to let the report to have access to my matlab work space variables. That is, if I call:
testVariable = 3;
setupRoot = rptgen.loadRpt('myReport');
setupRoot.Format = 'pdf-fop';
setupRoot.execute;
Then if I try to execute something like this within a "Evaluate Matlab Expression" block:
disp(testVariable);
Then it tells me that I do not have access to "testVariable". The curious thing is that if I open the report using the "Report Explorer GUI" and press the button "Eval Now" then I do have access to the variables I have in the workspace.
I ask you since you seem to have succeeded with this also. How can access to variables in my workspace from the report? How do you proceed? It seems they "dissapear" when I execute it.
Looking forward for a response, I'm running crazy with this and I'm unable to find the solution
Kind regards, Diego

サインインしてコメントする。


Abhishake
Abhishake 2014 年 3 月 14 日
hi I have a similar issue...is there any solution to this where we can convert a report (from report generator) in gui/stand alone application?

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by