Report on temp tables (edit data before printing)

r_schueler
Member Posts: 28
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
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
0
Comments
-
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 Emilsson0 -
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 72With best regards from Switzerland
Marcus Fabian0 -
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 Baxter0 -
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 Emilsson0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions