Creating file path in RTC

Dekito
Member Posts: 19
Hi,
SITUATION: I copy files from 'currentPath' to 'NewFilePath' (Text variables). The file paths are in a format like this example:
C:\My Folder\MyFile.txt.
PROBLEM: In Classic Client (v5.0) this works just fine, but in RTC the '\' char is recognized as a new line char.
Any suggestions which char to use for the RTC, or maybe some different approach?
10x in advance,
SITUATION: I copy files from 'currentPath' to 'NewFilePath' (Text variables). The file paths are in a format like this example:
C:\My Folder\MyFile.txt.
PROBLEM: In Classic Client (v5.0) this works just fine, but in RTC the '\' char is recognized as a new line char.
Any suggestions which char to use for the RTC, or maybe some different approach?
10x in advance,
Dekito
0
Answers
-
may be that is not the case..
Are you getting any error message?
Is it a 3-tier environment or single system?0 -
Well I put some test messages in the way as I create the 'NewFilePath' and every '\' char is represented as a new line in the RTC message (in CC it's OK).
It's a 3-tier environment.Dekito0 -
Where is your txt file located? in local system i.e., client system?
I think you know this..
RTC searches for file in service tier system where service is installed in 3-tier architecture..
We have to upload local txt file to temp path in service tier system and download to local system again in new path..0 -
Maybe this will have some meaning: I work with record links. I copy the attached file to a new location and set the new file path in the record link.
In RTC when I try to attach a link this way it signals an invalid path.
When I attach a file without this functionality it works fine.Dekito0 -
Have a look at base reports 9171 and 9172 how they are working..0
-
Well 10x Mohana, you were right I needed to UPLOAD and DOWNLOAD the files.
And it's recommended to use Codeunit 419 '3-Tier Automation Mgt.';
functions 'SilentUpload' and 'DownloadToFile' will do the job.Dekito0 -
I'm also facing similar very issue but can't use upload or download function.
I'm working in NAV2009 R2. I want to save report as PDF (using Bullzip PDF printer) and send it by email automatically.
Report doesn't have RTC layout so it runs Classic report only from RTC & wants to print it using Bullzip printer.
Problem is that It works perfectly in Classic Version but it considers '\' as new Line character in RTC.
I need to give some file path to Bullzip printer to save file.
Any solution please?
Thanks,
Mahesh Jain0 -
What makes you think the RTC is interpreting '\' as a new line character? Is it because you're showing a message or confirm prompt to see the path and the path has line breaks there? That is a function of the way you're producing the message/confirm prompt...so what you see there does not reflect what the RTC is seeing for the path.
If you're getting invalid path errors, look at where the logic is executing and code it accordingly. If it's executing on the server you can use the classic EXISTS and FILE.OPEN, etc. functions. If it's on the client, you need to upload and download, or use .net librairies instantiated client-side. In NAV 2013 there are functions for most things you will need to do client side in codeunit 419.Rob Hansen
http://www.epimatic.com0 -
Hi
I had the same problem. The biggest problem was not the filename... but to run a classic report from code in rtc.
I solved it by creating an RTC layout and then use the function REPORT.SAVEASPDF
/sbsmahesh wrote:I'm also facing similar very issue but can't use upload or download function.
I'm working in NAV2009 R2. I want to save report as PDF (using Bullzip PDF printer) and send it by email automatically.
Report doesn't have RTC layout so it runs Classic report only from RTC & wants to print it using Bullzip printer.
Problem is that It works perfectly in Classic Version but it considers '\' as new Line character in RTC.
I need to give some file path to Bullzip printer to save file.
Any solution please?
Thanks,
Mahesh Jain0 -
Thanks for reply.rdhansen wrote:What makes you think the RTC is interpreting '\' as a new line character?
Below is my code to save report in PDF.IF ISCLEAR(BullZipPDF) THEN
CREATE(BullZipPDF);
FileDirectory := 'C:\PDF Email\';
FileName := 'Invoice-' + "No." + '.pdf';
FileName := FileDirectory+FileName;
BullZipPDF.Init;
BullZipPDF.LoadSettings;
RunOnceFile := BullZipPDF.GetSettingsFileName(TRUE);
BullZipPDF.SetValue('Output',FileName);
BullZipPDF.SetValue('Showsettings', 'never');
BullZipPDF.SetValue('ShowPDF', 'no');
BullZipPDF.SetValue('ShowProgress', 'no');
BullZipPDF.SetValue('ShowProgressFinished', 'no');
BullZipPDF.SetValue('SuppressErrors', 'yes');
BullZipPDF.SetValue('ConfirmOverwrite', 'no');
BullZipPDF.WriteSettings(TRUE);
SerInvHeader2 := Rec;
SerInvHeader2.SETRECFILTER;
REPORT.RUNMODAL(50014,FALSE,FALSE,SerInvHeader2);
TimeOut := 0;
WHILE EXISTS(RunOnceFile) AND (TimeOut < 10) DO BEGIN
SLEEP(1000);
TimeOut := TimeOut + 1;
END;
and when i accesss printed file to send email after printing in RTC, it gives me below error. where it seems '\' has been considered as new character. Above code works perfectly in Classic"Microsoft Dynamics NAV
Attachment C:
PDF Email
Invoice-SEI-13-01018.pdf does not exist or can not be accessed from the program.
OK
My question is that
Can Bullzip printer be used to print PDF report in RTC where report doesn't have RTC layout??
If No then should i assume that SAVEASPDF is only solution to get PDF file of report in "RTC" ? Of course, i will have to create RTC layout to user SAVEASPDF.
Best Regards,
Mahesh Jain0 -
Hi
I understand that You can´t run a classic report in code from RTC - and therefore you cant use bullzip :-(
Its not fun to make the rtc-layout but you have to do it anyway sooner or later if they want to upgrade in the future :-)
/sbs0
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