Hi,
I've build a table and according to that table i got a form and a report.
When i opened the form watching a record, i want to run a report using the current record which is currently displayed in the form.
Function on the form:
Report.Runmodal(12345,False,False,Rec).
When running into the report the rec is lost.
What is wrong here?
Tried putting a SETRECFILTER in front of the Report.Runmodal, but that doesn't help either.
Thanks for any advice.
Greets
0
Comments
Are you using the Rec from the form?
If so, just before calling the report try to read your form record into a variable and call the report using the new variable.
Something like this:
NewRecVar type Record and should be the same as the source table of your form.
In Code:
IF NewRecVar.GET(rec.'First Key',rec.'Second key'....rec.'last key') THEN
Report.RunModal(12345,False,False,NewRecVar);
Maybe this will help
Willy
What ive tried so far:
SETRECFILTER;
REPORT.RUNMODAL(12345,False,False,Rec)
=== no success
Rec2 := Rec,
Rec2.SETRECFILTER;
Report.Runmodal(12345,False,False,Rec2);
=== no success
Rec2.Get("No.");
Rec2.Setrecfilter;
Report.Runmodal(12345,False,False,Rec2);
=== no success either
In all cases the record in the report is empty again...
Now it works #-o
I still dont see any difference when comparing the text-files in beyondcompare.
Using the usual Setrecfilter and running the report with current rec.
Absolutely no clue what changed, prolly it works only after 10p.m. or something similar, hehe.
Weird Navision :-)
Thanks for ur help .
PurchLine.RESET;
PurchLine.SETRANGE("Document Type",PurchHeader."Document Type");
PurchLine.SETRANGE("Document No.",PurchHeader."No.");
REPORT.RUNMODAL(50065,TRUE,FALSE,PurchLine);
try setting the range
**edit ** oops a bit slow clicking the post button
http://www.BiloBeauty.com
http://www.autismspeaks.org
@any1: Please write [solved] infront of your subject in your first post if your question is answered.