How to change registry value for (default) with install4j - install4j

I am trying to change the value of a registry key with install4j. Its a value that shows as (default) in the registry editor.
If I use an action to "Set a value in the windows registry" and specify the "value name" as "(default)", then I get two default values. Or at least two values that have that name displayed. Any only the first (original) one is used.
If I use an action to "Read a value from the Windows registry" and specify the "value name" as either "(default)" or blank, then I get an error.
[ERROR] com.install4j.runtime.beans.actions.registry.ReadRegistryValueAction
[ID xx]: Execute action not successful after 0 ms
Has anyone been able to do this? Clearly default values are special, but I cannot figure out to get at them.

The default value is accessed by passing a null pointer to the Windows registry functions. With the actions in the install4j, there is no way to specify a null string, but you should be able to do this by using the API:
https://www.ej-technologies.com/resources/install4j/help/api/com/install4j/api/windows/WinRegistry.html
and passing null as the valueName parameter to WinRegistry.setValue.

Related

How can I change parameter context from supeuser to user in Postgresql?

I added my parameter to postgresql.conf. I want to give to all users the option to change the setting of this parameter in their sessions, but the user failed to change it.
I saw in pg_settings that the value of context field for this parameter is 'superuser'. How can I change it to 'user'?
TIA
When you define the parameter in your C extension using DefineCustomStringVariable or friends, use PGC_USERSET rather than PGC_SUSET for the context parameter.

How do reset groupFirstKey QueueConfiguration field to default value (null) via ActiveMQServerControl.updateQueue(String queueConfiguration)

I created a queue via the method ActiveMQServerControl.createQueue(String queueConfiguration) with a value for the groupFirstKey.
How to reset groupFirstKey field of QueueConfiguration this queue to default value (null) via ActiveMQServerControl.updateQueue(String queueConfiguration)?
If I set "" for groupFirstKey in the String queueConfiguration (for example {"name":"MAXC","address":"MAXC","routing-type":"ANYCAST","group-first-key":""}), then for the groupFirstKey value I get not null, but "", respectively.
Currently there is no way to do this via the management interface (i.e. using the ActiveMQServerControl) because ActiveMQServerControl.updateQueue(String queueConfiguration) ultimately performs a check on the members of the JSON input that is passed in, and any members that are null (i.e. don't exist) are not updated.
However, if you're using an embedded server then you can use the updateQueue(QueueConfiguration, boolean) method directly on org.apache.activemq.artemis.core.server.ActiveMQServer and pass true for the boolean to force any null parameters to be used for the update.

how to disable 2nd parameter we select 1st parameter in crystal reports

Please guide how to do this requirement.
I Have a report having 2 command level parameters a and b.
If they select any of the one parameter then other one should be disabled/should not ask any value to enter /should not take any value .
Please suggest how to do
Command don't support optional parameters. Moreover, you can't disable or hide a parameter based on another parameter's value.
Your best option is to create a parameter that has a default value that will be 'ignored' by the query.
For example, given this Access command:
SELECT *
FROM customer
WHERE region='{?Region}'
with this parameter:
you will note that the parameter's Optional Prompt setting is false (and not editable):
Instead, you will need to a default, something like 'ALL' (or -1, in the case of a numeric value):
Modify the command accordingly:
SELECT *
FROM customer
WHERE ( '{?Region}'='ALL' OR region='{?Region}' )
This should be a feature of the user interface. You can implement it if you write your own software. The only viewer , which MIGHT be able to do this is R-Tag (www.r-tag.com). But even it will need to do some workaround ( if can do it at all). This behavior is very unique. Why would you need to have it ?

jasper server conditional mandatory on input controls

My question relates to jasper server 3.71
How can I conditionally make an input control mandatory. I wish to force the user to select from one query or another. In my case they must select from a list of Divisions OR from a list of Clients.
With thanks
Mark
This is not directly supported, however you could use a scenario where you define a third parameter which checks if either one or the other parameter is set. If the configuration is invalid you show an error message within the report instead of data.
Parameters:
parameter1, type: string, default value: none - deployed as input control
parameter2, type: string, default value: none - deployed as input control
verification, type: Boolean, default value: $P{parameter1} != null || $P{parameter2} != null - not deployed as input control
Band/Field Configurations:
As printWhen Expression of the detail band you add $P{verification} that means it will only be shown if the default expression for the verification parameter is true.
Define a text field in e.g. the title band giving an error message that either one of parameter1 and parameter2 need to be filled.

How does one pass null values to optional parameters in a Business Objects report using the Business Objects SDK?

I am building a web front end for accessing Business Objects reports using the Business Objects SDK for .NET. I have been able to hack my way through 95% of the business requirements with the sparse documentation and forum posts available online for the topic. My final roadblock centers on working with parameterized reports. Our business has situations in which a report has two parameters and the end user is only requried to populate one of them. It's easy enough to collect and cleanse this data, but no matter how I try to pass the null valued parameter to the reports, I get no data back. If both parameters are populated I DO get the expected data. When stepping through the code in Visual Studio I see that whenever BusinessObjects returns a null valued parameter it displays as an empty string (""). I have tried passing this as a parameter value and have also tried assigning the parameter a value of null. Neither of these options returns results once the report is scheduled and run. I have an example of my parameter assignment code below using each of the approaches that I've taken (We need to check for a string valued "null" as the user's have requested the ability to type "null" and have that passed to the report). None of these produce a report that contains data.
sVal.Value = param.ParameterValue != "null" ? param.ParameterValue : String.Empty;
sVal.Value = param.ParameterValue != "null" ? param.ParameterValue : "";
sVal.Value = param.ParameterValue != "null" ? param.ParameterValue : null;
Is there a specific value that the Enterprise Server uses to indicate null, such as dates are required to be wrapped in Date()?
Edit: The functionality I need to duplicate as seen in InfoView:
In Web Intelligence, by default all prompts are required and you must provide a value for it via the SDK. As of BusinessObjects XI R3 it is possible to actually configure the prompt in the report to be optional. This configuration is done by the report writer. When the prompt is optional then you can opt to not set the prompt value when working with the SDK.
An alternate way to have an optional prompt is to make the prompt "matches pattern" or if it is a date, figure out a default value. When the prompt is meant to be optional and is "in list" then you can set the value to be "%" which, while for a date, set the default value.