Hi,
I have a problem during running a report from another object(page). You can see the my codes below. Those codes are on an action (menu item) on a page (form). I get an error when i call the report,the error related to yellow line.You can see the error at the attachement.
SalesHeader := Rec;
SalesHeader.SETRECFILTER;
CLEAR(PDDocument2);
PDDocument2.SETTABLEVIEW(SalesHeader);
PDDocument2.SetBoxQty(Rec);
PDDocument2.RUNMODAL;
Thank you
0
Answers
the report PDDocument2 is not transformed into RTC
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
dynamicsnav:////runreport?report=61033, the report runs.
the problem is related to yellow line because before running report, i call a function from the report.
thank you
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
It runs as windows form classic client because ProcessingOnly of report is NO. If it is YES,it will run as RDLC. Can you see the error message? It says that you call a function from report,before running report.
Thank you
is this a customization thet if ProcessingOnly of report is NO then run Classic and if yes run RDLC? :-k
if not,
its not like that if ProcessingOnly of report is NO then run classic .
the report is not transformed.
export the report in text format and check whether rdl data is there or not
its not related to function called before the report
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
But when I delete yellow line ,it runs. Is not it strange? Because you said that it is not related to calling a function before running report.
SalesHeader := Rec;
SalesHeader.SETRECFILTER;
CLEAR(PDDocument2);
PDDocument2.SETTABLEVIEW(SalesHeader);
PDDocument2.SetBoxQty(Rec);
PDDocument2.RUNMODAL;
It has this line.
}
RDLDATA
{
}
Thank you
and can you post the code in SetBoxQty funtion
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
What should I do? I dont understand what you want to say.
Than kyou
the mechanism, which allows you to run report as classic client report, is working only in situations, when the report is called through REPORT.RUN/RUNMODAL or directly through button properties. You cannot run classic report through report variable, because it is not allowed/possible by design of the system. This is what the error tells you. You need to run the report as RTC report (RDLC) to be able to call it through report variable.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
1)i want to see the code written in SetBoxQty funtion
can you paste the code here.
but i strongly feel, its not the problem.
2)open the report in design mode and click tools-->Create layout suggestion
and save the rdlc
test after doing 2
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
The function is below
SetBoxQty(SalesHeader : Record "Sales Header")
WITH SalesLine DO BEGIN
SETCURRENTKEY("Document Type","Document No.","Item Type");
SETRANGE("Document Type",SalesHeader."Document Type");
SETRANGE("Document No.",SalesHeader."No.");
SETRANGE("Item Type","Item Type"::Container);
CALCSUMS(Quantity);
TotalBoxQty := Quantity;
END;
I tried 2. step , i got an error. it say "An error occured when opening Report designer. A supported version of Visual Studio could not be found"
Thank you for your help
you need to instal the visual studio(>=2005) in your system.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
welcome :thumbsup:
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav