How do I get up my connections to show up in the designer ?
In my logicapp.json file I am setting the connection names to be functions of parameters like so:
"variables": {
"servicebus_1_Connection_Name": "[concat('servicebus-',parameters('logicAppName'))]",
"azureblob_1_Connection_Name": "[concat('blob-',parameters('logicAppName'))]"
},
However the designer doesn't like this:
When deploying, the connections show up no problem:
Try using parameters instead of variables for this. Variables need to be instantiated while parameters only need to be declared, bear in mind that you will need to declare the parameter in both the logic app template and in the arm deployment template in the logicapp.json file and also in the logicapp.parameters.json file.
Click anywhere on the logic app, then press F4 to get the properties of the logic app:
Change the resource group to the appropriate one that has your connections!
After going through the above 2 requirements, your connections will be displaying correctly.
Related
I'm trying to access a SSPRS report that has the option to select the year and the month by adding the parameters in the URL as ¶m=value but I always get the default.
This are the parameters and I know I'm sending the correct values in the URL.
This is the report panel where I can select the Year and Month, I'm trying to get the specific report that I need by passing those parameters in the URL.
What could I be doing wrong?
Thank you everyone.
There are a couple of ways these go wrong, I'm guessing your problem is URL encoding of your date parameter, but I'll give you other stuff too. Here is a working URL with 3 parameters: a date, a string, and an integer.
https://db01.MyCompany.com/ReportServer_Prod?/Reports/R440_OutstandingRecp¶mDateEnd=12%2f31%2f2015¶mPropLiab=Property¶mRepPeriod=1
The key parts of this URL:
"https://db01.MyCompany.com/ReportServer_Prod?/" - db01.MyCompany.com is our database VM, and I'm using the "Prod" (production) instance of SQL on it.
NOTE: Check your Reporting Services Configuration application and look at the "Web Service URL" to get what "ReportServer_Prod" is on your installation.
"?/Reports/" is the path to the virtual directory, note that this is different from the path a browser would normally use. Normally my path would be "ReportServer_Prod/Pages/Report.aspx?ItemPath=%2fReports%2fR440_OutstandingRecp" if I was just viewing this from the Reporting Services interface.
Parameters are separated by "&" and it's "ParamName" "=" "ParamValue" so "¶mPropLiab=Property¶mRepPeriod=1" are the string and integer parameters respectively.
Lastly, parameter values are URL encoded if necessary. Mostly it doesn't show up, but for dates and some strings, it becomes necessary. We can't send something like "12/31/2015" because it looks like part of the path, we need a URL encoded string like "12%2f31%2f2015"
Hopefully one (or more) of these were what you needed, reply in the comments if it's still not working or if you need more explanation of why the parts are what they are.
EDIT: One more thing, if a parameter has a "Display" and a "Value" (i.e. in a drop down list) you must pass the value, not the display.
EDIT: I can't make the comment stop hiding my URL, so I'll put it here
WHAT WAS TRIED
https://slo2000/Reports_TECOVA?/Reports/TEXO%20CVA%20Reports%2fTEXO_London_B_CVA_Report&ReportMonth=January&ReportYear=2020
https://slo2000/Reports_TECOVA?/Reports/TEXO%20CVA%20Reports/TEXO_London_B_CVA_Report&ReportMonth=January&ReportYear=2020
https://slo2000/ReportServer_TECOVA?/Reports/TEXO+CVA+Reports/TEXO_London_B_CVA_Report&ReportMonth=January&ReportYear=2020
WHAT WORKS (From #Nacho in comments, brought here for visibility)
http://slo2000/ReportServer_TECOVA/Pages/ReportViewer.aspx?%2TEXO+CVA+Reports%2fTEXO_London_B_CVA_Report&rs:Command=Render&ReportMonth=January&ReportYear=2020
Created a package and deployed on SQL Server 2017. my package is having parameters (package level scope) and want to set values from environment file at the time of create a SQL-JOB-STEP.
I have created environment file and defined my variables perfectly "Integration Services Categolog => SSISDB => MyProject => Environments" and those variables can be assigned at the time of configure & execute to my package parameters which is working well.
but I cannot do the same while create SQL-JOB. I can see in "step properties window" there is a option to locate "Environment" file but when I locate the file then I cannot find the way to assign those variables to my package's parameters. can anyone help me in this please?
please refer picture:
Click the ellipses (...) besides the empty Value spot. There you will be presented with three options (if you didn't have an Environment established, there'd be only two).
The design time value is the default here. If your parameter, MyVar01_PackageLevel, had an actual value displayed, the UI would render it in the default font weight/style.
One row above is a manual override radio button and here you can just hard code the value. Doing this will result in the Value displayed to be in bold
One row below the design time value is where you can associate a parameter to a list of parameter values from your Environment. Scroll through the list of values, which are in no discernible order, and find the target property name. Let's call it V01_PL After selecting that, the above will indicate V01_PL in an italicized font. It won't show the value of V01_PL mind you, it'll just tell you it's driven the configured value.
I'm trying to modify one of the FireDAC sample projects in order to use an existing SQLite file as the database source. The sample works fine unmodified and connects to its database. However, I can't figure out where the database it connects to is specified, in order to change it.
According to the documentation, there should be a Database property on the TFDPhysSQLiteDriverLink component. There isn't: it doesn't exist. I even converted the form to text and looked through all components' customized properties, and there's no path defined anywhere. Nor is there in code - the sample is very small and there's no path defined at all.
The other option on the documentation is to include the FireDAC.Phys.SQLite unit, although that doesn't explain how to set the database, since as far as I can tell that unit just includes the component. And when I search for Database properties (see attached image) none of them in any class in that unit seem to be quite what I'm after. The closest is a string that's for a backup component - I doubt that's what I need. There is a SQLiteDatabase property in the TFDPhysSQLiteConnection class but that's read-only.
List of all Database properties defined in the FireDAC.Phys.SQLite unit
I also tried creating a temporary connection definition at runtime, by double-clicking the TFDConnection component. That only gives an exception:
Exception double-clicking the TFDConnection component
The only solution to this I found is in the XE5 documentation, where it says to set the $(PUBLICDOCUMENTSDIR) environment variable. I already had to do that to get the demo to run (previously, it threw the same exception on the line FDConnection1.Connected := True;; it doesn't now, the demo runs perfectly at runtime.) That change obviously hasn't affected the designer, and I don't even know if I'm looking in the right place, since after all the documentation talks about setting the Database property.
So I'm stumped. Where does it set the database? It's not in the DFM or any streamed properties; it's not in the property defined by the documentation (TFDPhysSQLiteDriverLink.Database doesn't exist, nor does anything that looks like it); it's not in the TFDConnection designtime editor (even though it throws an exception, a file specified as a property here would appear in the streamed DFM, I'd think); it's not in code; ...where else can it be?
(I have never used FireDAC before so am a complete noob, btw. I'm self-teaching via the documentation and samples.)
You don't actually need a TFDPhysSQLiteDriverLink for a minimalist FireDAC project, and using one rather confuses the issue if you're trying to make a connection to a database for the first time.
Try this:
Make a note of the name including path of a Sqlite db.
Start a new VCL project and drop a TFDconnection, TFDQuery, TDataSource & TDBGrid onto its form and connection them up. Set the TDFQuery's Sql to select * from some table you know exists in the db.
Right-click the TFDConnection and select Connection editor from the pop-up.
Set the DriverID to SQLite and insert your db name into the Database Value box.
Open the FDQuery.
If you compile and run the project, you'll get an exception telling you a class factory for a TFDGUIxWaitCursor is missing (this is the sort of thing I love about FireDAC), but that's easily fixed by dropping one onto your form. Notice that you don't have to connect it using the Object Inspector to any of the other FD components.
After that, you can add a TFDPhysSQLiteDriverLink and set its DriverID to the same as for the TFDConnection.
I ussualy roll my own class and handle the OnBeforeConnect event
Something like this
procedure TSQLiteConnection.SQLiteConnectionBeforeConnect(Sender: TObject);
begin
if not(TFile.Exists(DatabaseFilePath)) then
Params.Values['OpenMode'] := 'CreateUTF16'
else
Params.Values['OpenMode'] := 'ReadWrite';
Params.Values['Database'] := DatabaseFilePath;
DriverName := 'SQLite';
end;
The DatabaseFilePath is just a string field of the class, so basically you can put any file path there
TSQLiteConnection is, of course, a TFDConnection descendant
I would like to set different contacts for same service based on from which host the service is called.
I've tried to use macro, but it gets translated only when command is called.
Then I've tried to edit command itself, but I think that variable CONTACTEMAIL is managed internally by icinga. I don't feel comfortable with adding only pure emails to some custom macro defined in HOST.
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Icinga *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
Did anyone try/solve this?
You can define your contact on the host and delete it from services. This way every service in that host will inherit its contacts, if you define a contact again in the service it will ignore the previous one.
If the contacts depends on each service and not host, you will have to define same service for each host/contact.
$CONTACTEMAIL$ is a macro for the contact object, referencing to the attribute "email". Your command "notify-service-by-mail" will be assigned to such a contact as "service_notification_command" and that contact assigned to a service then (or via contactgroup). So once a notification happens, all required information is available and the core will translate the macro $CONTACTEMAIL$ to the real value and pass the converted string to the shell for execution then.
I would go for 2 options
use implied inheritance (http://docs.icinga.org/latest/en/objectinheritance.html), and only define contacts for the host, and not the service below. the configuration parser will recognise that contacts should be inherited and your services will get only the related host's assigned contacts then. Though, this may get ugly in terms of not wanting to notify the host alerts to the same contacts as for the service themselves.
making this more dynamic, i.e. setting service contacts based on their hostname, i would suggest using a config (generation) tool, allowing you e.g. manipulate the service->host relation with the defined contacts then. Though, there seems not really a generic solution out there... I would give LConf a try with the ldap tree itsself, but not sure if this would work out here, rather than writing a custom script, or use some puppet magic.
I want to build a context sensitive help for a winforms application, to do this I use a class with a reference to the HelperProvider component, HelpNamespace is set to the index html file and when a form is loaded I register each control in the form to the helperprovider with a topic that I get from a config file :
helpProvider.SetShowHelp(control, true);
helpProvider.SetHelpNavigator(control, helpNavigator);
helpProvider.SetHelpKeyword(control, helpKeyword);
when debugging I am sure that some controls are configured with some topics different from index file but when running and pressing F1 its always the index file (HelpNamespace) that is opened. When using a HelperProvider instance for each control and no single instance for all controls, that works fine!
Why I can't use a single instance of helperProvider for all controls?
You need SetHelpKeyword for each control. A HelpNavigator.TopicId may be useful for a CHM with topic ID's inside.
I'm missing ".Topic" in your code sample above. Try the code below or download a working example from:
http://www.help-info.de/files_download/CSharp2008_CHM.zip
// set F1 help topic for controls on this form
helpProvider1.SetHelpNavigator(this.btnStart, HelpNavigator.Topic);
helpProvider1.SetHelpKeyword(this.btnStart, #"/Garden/flowers.htm");
helpProvider1.SetHelpNavigator(this.btnExit, HelpNavigator.Topic);
helpProvider1.SetHelpKeyword(this.btnExit, #"/Garden/tree.htm");
helpProvider1.SetHelpNavigator(this.chkShowHelpWithNavigationPane, HelpNavigator.Topic);
helpProvider1.SetHelpKeyword(this.chkShowHelpWithNavigationPane, #"/HTMLHelp_Examples/jump_to_anchor.htm#AnchorSample");