Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 536.4K On-Premises Infrastructure
- 138.3K Analytics Software
- 38.6K Application Development Software
- 5.8K Cloud Platform
- 109.5K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.3K Integration
- 41.6K Security Software
Get Parameter value in FDM report event script

Hi All!
I'm using FDM 11.1.2.3 and I want to make the report behave differently depending on the parameter chosen.
The parameter's name is "publish", so I would like to write some code like
Sub OnFormat
if rpt.parameters("publish").value = 1 then
rpt.Sections("ReportGroup").Controls("Label").multiline = false
...
But can't find correct syntax for rpt.parameters("publish").value.
And the second, connected question:
Before starting the report users choose the report format - pdf, xls and so on.
Is the any way to get programmatically the users choise
a) in the report SQL
b) in the report event script, for example OnFormat?
Would be really appreciate for assistance in my questions.
Best regards
Sergey.
Answers
-
I haven't done anything with FDM reports for a while but from what I can remember I think you can just add the ~~ field to the SQL query statement e.g.
SELECT Account, Entity, ~myParam~ AS MYPARAM FROM TDATASEG1
-
Thank you. There is the way to get the parameter in SQL and it must be the way in vbscript. I still believe.
-
So you can now assign the SQL column that contains the parameter value to a field on the report and then reference that in the report script:
If rpt.Sections("PageHeader").Controls("txtMyParams").Text = "1" Then
.....
-
exactky, .text is the right one