Skip to Content
author's profile photo Former Member
Former Member

How to save table to file in Mobile 7.1

Hello,

We are using Mobile 7.1. We are trying to save the table context in the mobile client to the local file.

We use a FileDownload element in the screen. The FileDownload is bound to a Resource attribute which contains the table data (as well as name and type of the file).

When the user clicks on the FileDownload link, he gets an error message "Cannot open HTTP connection" with an http link that points to the file.

Do you know how can we save the table context to the client (i.e. export to excel)?

If it's impossible with FileDownload, is there a way to open a Save As dialog and write the file locally? (We don't know how to open the Save As dialog from web dynpro).

Thanks in advance,

Sergey

Edited by: Sergey Kozyrev on Dec 23, 2008 11:05 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Dec 23, 2008 at 10:48 AM

    Hi,

    The http link that is used in the FileDownload should be in the following format :

    https:
    localhost ......

    In 7.1 the file can only be downloaded the following way:

    get the deployable part :

    use a fileInputstream element to read contents of the file.

    Then :

    WDDeployableObjectPart dom = wdThis.wdGetAPI().getComponent().getDeployableObjectPart();

    IWDCachedWebResource res;

    res = WDWebResource.getPublicCachedWebResource(in, WDWebResourceType.TXT[whatever you need as the file extension], WDScopeType.APPLICATION_SCOPE, dom, "Attachment");

    Thanks and Regards,

    Narayani

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Sergey/Narayani,

      Right now I'm having problems with mobile reports. I need to create som printable reports in some format like PDF, Plain Text, etc. But my problem is how to create that in JDK 1.5 without external libraries. In a normal java project I can import some libraries with no problem, but in a WebDynpro Mobile for laptops I cant, because it's a DC's. Can anybody help me with this issue.

      Regards,

      David Faustini

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.