File Export in RTC with “Common Dialog Management”

I hope you have observed that a new window will be opened with options Open, Save and Cancel while exporting a file in RTC.

* I have taken Report 9171 - Export Profiles as example.

If you Run the report in classic, you will have an option to select the path and file name in Options tab

cc1.jpg

But if you run the same report in RTC, you will not have an option to select the path and file name in options tab

rtc1.jpg

After clicking OK, you will get the options to Open, save and cancel

rtc2.jpg

If you want to export the file as in Classic Client like with common Dialogue Management, follow the below steps..

Create a local function “DownloadFile” in Codeunit 419 - 3-Tier Automation Mgt.

TempFileName := DownloadTempFile(TempFileName);

IF ISCLEAR(FileObject) THEN

  CREATE(FileObject,TRUE,TRUE);

IF FileObject.FileExists(FileName) THEN

  FileObject.DeleteFile(FileName,TRUE);

FileObject.MoveFile(TempFileName,FileName);

rtc3.jpg

Name   DataType        Subtype           Length

*FileObject     Automation     ‘Windows Script Host Object Model’.FileSystemObject      

Modify the code in Report - OnPreReport()  and Report - OnPostReport() Triggers as

rtc4.jpg

Comment the code in RequestOptions Form -  OnOpenForm()

RequestOptionsForm.FileName.VISIBLE := NOT ISSERVICETIER;

Recreate the requestpage by using the transformation tool

Now, run the report in RTC

It will have an option to select file path and name

 rtc5.jpg

Click Ok and it will save the file in the given path as in Classic Client.

5 Responses to “File Export in RTC with “Common Dialog Management””

  1. http://www.victims-blog.com/some-blog-post Says:

    Title…

    Este es un fantastico blog…

  2. financial investment advice Says:

    Financial & Investment Management Advisors…

    Out of the ordinary information. Credit on behalf of the info!…

  3. H-C-G Says:

    HCG …

    Such wonderfull post on here today….

  4. สินเชื่อ Says:

    I am new to your blog and love it. Thanks for including us in your adventures.

  5. Ravi Prakash Goyal Says:

    Thanks for posting this information.

Leave a Reply

*
To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
Click to hear an audio file of the anti-spam word