Report on temp tables (edit data before printing)

r_schuelerr_schueler Member Posts: 28
edited 2001-03-10 in Navision Financials
Hi,

I want to print item labels. The problem is that I want
to edit the description field of some items before
printing, but the changes have to be temporary.

So I've created a report for selecting the items. This report
fills a temp table based on table 27 with the selected items.
In the OnPostReport trigger I run a form with my temp table
to edit the item descriptions (FORM.RUNMODAL(50049,ItemTmp) <img border="0" title="" alt="" src="images/smiles/icon_wink.gif" />
So far so good.

Now I want start an other report from within the form for
printing the edited labels.

I thought that I can use a "print button" with the following
code in the onPush trigger: REPORT.RUN(50022,TRUE,FALSE,Rec);
But this does not work for me and I don't know why !

The following error appears:
The Report ... does not have a data object which uses the table
27 specified in SetTableView (or something like that)

Does someone know how to solve this problem. Or is there a other
way to edit the labels before printing ?

Best regards
Rainer Schueler

Comments

  • SamsoniteSamsonite Member Posts: 10
    I had a similar problem recently.
    I tried to launch a form with data from my temoprary table and if I used FORM.RUNMODAL(50000...
    everything works fine, but when I try to declare the form as a variable and use MyForm.RUNMODAL it didn't work at all...strange but I guess it is just to accept it :-)
    If someone has succeeded with the MyForm.RUNMODAL approach I would be glad to know.
    Johan Emilsson
  • mfabianmfabian Member Posts: 187
    You simply cannot pass a temporary table to another Object. In your case, you want to fill a temporary Table ItemTmp in Report A, have it edited in a Form which calles Report B?

    Question: What exactly do you mean if you say "temporary" table: Do you a) define a variable within a report/form and set the property "Temporary"=Yes or b) are you using a real table (which is a copy of table 27 with some additional fields)?

    Marcus


    Marcus Fabian
    m.fabian@thenet.ch
    +41 79 439 78 72
    With best regards from Switzerland

    Marcus Fabian
  • trifftriff Member Posts: 23
    That is wrong you can pass a temporary table just the same as any other table. If you pass a table through a function make sure that it is var'ed or else you only pass a copy of a single record.

    With FORM.RUNMODAL(xx,rec) you can pass the temp table to the form while f.RUNMODAL always uses the standard table. You Can only change the view of the standard table with SETTABLEVIEW but not the table that is used.

    Paul Baxter
  • SamsoniteSamsonite Member Posts: 10
    Yes Paul but it's still strange...
    If you run the form its ok to pass the temporary record as a parameter and display it but if you want to set some additional parameters to the form by creating functions in it you need to declare the form as a object. Then all of a sudden it is impossible to pass the temporary record as a parameter even though you have the functions SETTABLEWIEV wich takes a record as a parameter...
    Johan Emilsson
Sign In or Register to comment.