Report Generator Problem



Jaime Zamora <jaime.zamora@xxxxxxxxx> wrote in message
<8f4bdf7e-f05b-45e8-b70b-
9971c426b628@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>...
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);
.



Relevant Pages

  • Re: Sink Access report section events such as Format, Print, and R
    ... Open up your object Browser window. ... Private WithEvents mSection As Access. ... of putting code in each report to modify itself at run-time, ... you can declare new form events all you ...
    (microsoft.public.access.reports)
  • Re: SQL Server Management Studio - Report - Schema Changes History
    ... declare @enable int ... declare @d1 datetime; ... , database_name nvarcharcollate database_default ... When I click on the report it hangs on Report is being generated. ...
    (microsoft.public.sqlserver.tools)
  • RE: programming parameters for a report
    ... Don't I have to declare the table and the field to check. ... >> If you just want a report to run every three months, ... >> Dim dtTheDate As Date ... >> DoCmd.OpenReport blah blah ...
    (microsoft.public.access.modulesdaovba)
  • RE: Report will not access public variables from form
    ... where then declare them in a module and not in your form. ... I have declared public variables for current values in the ... > After a save record on the form, I send a report by email that tells the ... > If gstrPARTNoOld gstrPARTNoNew Then ...
    (microsoft.public.access.reports)
  • Re: Sink Access report section events such as Format, Print, and R
    ... Private WithEvents mSection As Access. ... of putting code in each report to modify itself at run-time, ... just make some class modules that knew how to respond to all report events ... you can declare new form events all you ...
    (microsoft.public.access.reports)