WebReport DWNLD Tag Syntax

I am creating a WebReport to download a document to my local file system. I use a LiveReport source to identify the ID and name of a document. I tried this syntax to download the document:

[LL_REPTAG=DATAID DWNLD:"C:\Users\abc\Downloads":"TestDownload" /]

When running the report I receive this error message:

* DWNLD: Missing Filename. *

What is the correct syntax for the DWNLD subtag?

Tagged:

Answers

  • Have you seen this sub-tag before? It is not in core OpenText software (as of 24.4) as far as I can tell. If it was, you would see it in the tag guide that is automatically generated to include every sub-tag and tag, and is available from the function menu.

    You may have seen it on a system that had custom/drop-in sub-tags applied. We (Ravenblack) have a suite of about 40 add-on sub-tags that is part of our commercial WebReports Productivity suite. We made this suite available for free (albeit not formally supported) each OT World, but we would be willing to extend this offer. This includes a FILEACTION sub-tag that can handle this, and we are likely to extend our version of NODEACTION to include DOWNLOAD as an option too. Our FILEACTION subtag also has some security built in to allow the administrator some control over what paths are available to developers.

    Thanks,

    Greg

    support@ravenblackts.com

  • carbuckle
    carbuckle Member
    edited January 16 #3

    This is a custom tag used in v23.2. This is the description from the tag guide:

    DWNLD

    This sub-tag provides capabilities to perform download operations for documents returned in a webreport.

  • Unless it is part of some OT package that we don't have, it is most likely a "dropin" sub-tag. Where it came from I don't know, but if you want to learn more about it you can go to ./appdata/webreports/sutags and look for two files: dwnld.txt (source code) and dwnld.txt.json (meta data)

    If you read through the source code it should probably be apparent what the syntax should be. As a quick guide, .fData has the DataId in it. you might see a function like .dataAsNode() or .dataAsNumber() or .dataAsNodeId(). These are accessing .fData checking the type (numeric DataId) and in the case of .dataAsNode() returning the Content Server node. Additionally the subtag will have a variable called "args" that has all of the parameters in the sub-tag. In your example it would have two items in it:

    {'C:\Users\abc\Downloads','TestDownload'}

    In the source code you can see things like args[1] or args[2] which should show you what the sub-tag is expecting as far as syntax.

    Enjoy :-)