Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: ISEXPORTTYPE function is not working in pentaho 3.8.3?

  1. #1
    Join Date
    Sep 2011
    Posts
    20

    Default ISEXPORTTYPE function is not working in pentaho 3.8.3?

    I was having one URL field in my report. Now I need condition where id user export this report in excel, field should not be displayed as URL but plain text. where as if report is HTML, then user can click on it to go to other report.

    for this I found ISEXPORTTYPE function. and I added following expression in "Url" property of field.

    =IF(ISEXPORTTYPE("table/excel");[confirmationCode];URLPARAMETERSEPARATOR(CONCATENATE(["env::serverBaseURL"];[confirmationLinkURI];[confirmationCode];"&brand_id=";[brandId];"&prop_id=";[propertyId])))

    but open formula editor is showing me warning message like => Formula :not enough data for computation.

    Am I doing some mistake here?

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    No, it just means that at design-time some of your fields are <null> and some parts of your formula do not like <null> values.
    This happens when you reference fields and expect to do calculations on it - at design time we have no data.

    Preview your report to see whether it works correctly. When you preview, you query the database, thus you have values for your fields, and thus none of them should be <null>.


    Btw: If you do NOT want a URL in Excel, return "NA()" instead of some text. If you return text, we will wrap that text into a HYPERLINK formula function for you. This is most likely not what you really want.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Sep 2011
    Posts
    20

    Default

    Thanks Taqua,

    so as you said, yes my formula is working while previewing but problem is that, I need to display plain text in excel. why it is wrapped in HYPERLINK function? is it any way I can just display [confirmationcode] as plain text if report type is Excel?

    Regards,
    Parimal

  4. #4
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    It is wrapped because you specified a value for the "URL". What do you expect?

    As said: If Excel, make sure you return "NA()"! The normal content for a cell comes from the "value" or "field" attributes, not from the URL.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  5. #5
    Join Date
    Sep 2011
    Posts
    20

    Default

    ah.. ok I got your point Taqua now. I understood that NA() will print #N/A in my column if export type is excel.

    this fully resolve my problem Thanks Taqua for quick help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2017 Pentaho Corporation. All Rights Reserved.