Jump to content
  • 0

Displaying Virtual Field in Tabular Report


TMCGINN1

Question

Hi,

I am attempting to use Virtual Fields to allow a user to specify some input that must appear on each line of a tabular report. The report requires the person who exports it to provide some contact information, and I do not want to hard-code this information.

I have set up a Virtual Field as a search field, and set it to "pass as parameter" called [@Virtual1]. In my report body, I would like to display the value of the Virtual Field variable. I have attempted to use a calculated field and just put [@Virtual1] as the value, but I get an "Error in forumla." when I attempt to run the report.  Per this post, I also tried [@cbParameterVirtual1] in a calculated field, but that results in the same error. I have tried a few Javascript solutions, but can't seem to find the right reference to the Virtual Field variable.

I can't seem to find a clear answer on how to reference virtual fields within the datapage they are created (or if it's even possible). I've posted some screenshots of my setup below, any help is greatly appreciated!

 

2021310970_virtualfield.thumb.PNG.7172ece78fbdc0725bae3a2f7ad8470e.PNG

 

1326970127_calculatedfield.thumb.png.962cbfcdea675b53e064d65991efff7e.png

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
On 1/19/2020 at 5:35 AM, LittleMsGinger said:

Hi @TMCGINN1,

You need to wrap the parameter in a single quote. For example '[@Virtual1]'. This way you will be able to use parameter in  SQL query. You can also use HTML Block instead. 

-LittleMsGinger

I've been struggling with the exact same problem for some time and just managed to find this solution.

Thanks LittleMsGinger!

I didn't see this need for single quotes documented anywhere - it seems very important!

/David

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...