Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi...
I have a list box with values A, B, C and D...
When the report opens I want values A nd C to default to be selected in the list box...
I appreciate that I could save my report with these values selected but this means that I will have to remember this everytime I modify / save the report...
Think that this will have to be done via a macro which loads when the report is open but am unsure how to do this....
Any help greatly appreciated...
Paul,
This is how I set a default value in a macro that is invoked by being passed as a named pair:
set doc=ActiveDocument
doc.Fields("Contract Status").Select "Live"
doc.Fields("Contract Status").Lock
see toggle select if you have multiple values.
the URL looks something like this:
qvp://myserver/QVContracts/Contracts%20Analysis.qvw?MACRO=SetEnv
Regards,
Gordon (also on 8.20)
Hi Paul,
I think you can use a trigger for that.
Settings > Document Properties... > Triggers (tab)
At the top of the tab, select "OnOpen" and click on "Add Action(s)". Then add the "Select in Field" action, write in "Field" your field (without quotes), and write in "Search String" something like "(A|B|C)" (with A, B and C the values you want by default).
I hope I answer your need.
Best regards,
Franck SEREGAZA
Business & Decision
Thanks Franck...
I do not have a document properties | trigger tab - think this may be applicable to earlier versions of the software - I am on version 8.2.
Think my solution lies in writing a macro...
Paul,
This is how I set a default value in a macro that is invoked by being passed as a named pair:
set doc=ActiveDocument
doc.Fields("Contract Status").Select "Live"
doc.Fields("Contract Status").Lock
see toggle select if you have multiple values.
the URL looks something like this:
qvp://myserver/QVContracts/Contracts%20Analysis.qvw?MACRO=SetEnv
Regards,
Gordon (also on 8.20)
Indeed, I'm using the last version (v9 SR2). Too bad for you, macros are not the best, but that's the only solution you have. Maybe you should think about moving to v9.
Best regards,
Franck SEREGAZA
Should hopefully be updating within the next 4 - 6 weeks....
Thanks for your suggestion - I will bear this in mind when we upgrade....
Regards
Paul
Thanks Gordon - this has done the trick...