Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: Report Generator Problem

Subject: Report Generator Problem

From: Jaime Zamora

Date: 18 Jul, 2008 18:42:01

Message: 1 of 2

Hi All, I have to generate a report inside a function. When I run:

report cartera;

I got the following error:

Beginning report
Error using ==> getContent at 27 Variable "inicial" does not exist in
workspace
Error using ==> getContent at 27 Variable "final" does not exist in
workspace
Error using ==> getContent at 27 Variable "compras" does not exist in
workspace
Error using ==> getContent at 27 Variable "ventas" does not exist in
workspace
    Converting report

The four variables are inside the workspace, but report can't see
somehow. Any help will be great.

Thanks,
Jaime

Subject: Report Generator Problem

From: Jason Tung

Date: 29 Aug, 2008 19:20:04

Message: 2 of 2

Jaime Zamora <jaime.zamora@gmail.com> wrote in message
<8f4bdf7e-f05b-45e8-b70b-
9971c426b628@d77g2000hsb.googlegroups.com>...
> Hi All, I have to generate a report inside a function.
When I run:
>
> report cartera;
>
> I got the following error:
>
> Beginning report
> Error using ==> getContent at 27 Variable "inicial" does
not exist in
> workspace
> Error using ==> getContent at 27 Variable "final" does
not exist in
> workspace
> Error using ==> getContent at 27 Variable "compras" does
not exist in
> workspace
> Error using ==> getContent at 27 Variable "ventas" does
not exist in
> workspace
> Converting report
>
> The four variables are inside the workspace, but report
can't see
> somehow. Any help will be great.
>
> Thanks,
> Jaime


That's because report generator only sees variables in the
base workspace. You have to declare the variable to be
global first. However, global variables need to be
declared both inside and outside the function. So use the
following code:

evalin('base','global var_name');
global var_name
var_name = magic(4);

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics