SSIS changing variable scope - ssis

How do I create a variable with a scope? It's just giving me a default which I do not want, and I'm unsure how to change. This should be simple, and a Google search leads me to believe this is quite a common problem but with no easy solutions.
imgur: http://imgur.com/uxlRf

click on new variable button, add variable name and then click on Move Variable Button right next to add variable. and from there select Executable , to which you want to set a scope to. Hope this helps.

Note: Scope of the variable is set based on the container you have focus before clicking the new variable button. Though BIDS Helper can help you change the scope of the variable very easily that’s the 6th button provided by BIDS Helper on top of the variable pane.
Found the above answer, not very helpful way of doing things.

As someone noted, this changes with 2012. I just got bit by that and note that the 2012 documentation did NOT get updated. It still says variables are scoped to what you have selected which is NOT true. But when you're on the variables window, note the 2nd from the left icon at the top - this is the "Move Variable" button that works quite nicely to allow you to move the scope of the selected variable. BiXpress also has similar function but it's buggy in that it won't pick up OnPostExecute scope making their version very limited.

We can change the scope of the variable in 2008 BIDS.PFB the steps I did for changing the scope of the variable from the package level to the task/container level.
1)Right click on the package.dtsx file from the Solution explorer and click on the "View code"
2)Search for the variable for which you wanted to change the scope. Copy the XML code related to that variable.
3)Search for the control for which you wanted to use this variable and copy the xml code after completion of any tag(Many tags are related to a task/container).
4)Remove the origial copied code.
5)Save this file
6)Open the package and the scope of the variable would have been changed
I am not sure If it impacts the package or not, but it worked for me.
Kindly let me know If it will impact the package or not if any one knows

How about:
View code of *.dtsx package
Change DTS:ObjectName for desired one.
Will this lead to any issues? At the moment it seems ok but i can't run package yet to check this.

Well thats the way BIDS has been designed. You create on the control flow element on which you want to create the variable. And if you want to create the variable on the package level, you click on an empty space on the control flow pane. Thats the only way to assign scopes for variables using BIDS. Havent looked at the BIDS Helper, but BIDS itself is capable enough of doing such things.

Related

How can I dynamically change name of component reference <dropdown-component> at the run time globally in angular?

In my current application, there is a component called "dropdown-component" which is used across the application, I have to use "custom-dropdown-component" instead of "dropdown-component". I will not be able to do the changes to every file where ever its called as there is some specific business requirement. These changes should be reflected at the time of render. Kindly help with this
Current code
<dropdown-component></dropdown-component>
Expected to change at the runtime
<custom-dropdown-component></custom-dropdown-component>
I don't think you can change the component at runtime without major changes to the whole code.
Probably the simplest solution would be to do a search/replace or you can create the custom-dropdown-component but call it dropdown-component instead, then you you have to import the Custom Module but this is also kind tricky and not a nice solution

in SSIS how to I make the package property CheckPointFileName a variable?

It appears this property needs to be hard coded. I'd like to make it a project level variable that I can set from the job.
From the Control Flow of the package, right-click anywhere in the design layout and select Parameterize.... From here choose the CheckpointfileName property and assign the parameter to use for this file.

Changing a value in a .config file based on a user's selection in an InstallShield 2013 install

Sorry - I'm a total newbie with InstallShield. I've inherited an InstallShield 2013 project that presents the user with a dialog that let's the user select a SQL Server and based on their selection sets a value in a config file. That's not working, so I opened the project in IS and looked in the Text File Changes under System Configuration and there's nothing there that would do this. So how do I figure out where this is happening (or not happening in my case), and then how do I get it to work? I need to set both data source and initial catalog in a file called server.config.
So how do I determine what the user selected and then save that in this file? It looks like I can set up a Text File Change, but how do I access the values selected by the user? And how can I figure out where the "code" is that is supposed to be doing this?
Thanks,
Ben
I would try to track this from the dialog and controls in question, or by following the value through a verbose log. Since you say it doesn't work today, there will probably be an interruption in the flow I describe below, and since you don't know the full state of the installation project, it may be hard to identify. So search from what you know.
Top down: what gets configured
First, find the dialog that you fill out as a user making the selection. Then figure out the property that the particular control is associated with. Now you've got a thread; pull on it.
Search in the direct editor for references to the property. If the property is named MYCONFIG search for just that: MYCONFIG. You'll probably find some sort of use that looks like [MYCONFIG] instead, which is typically a format string specifying to use the value of MYCONFIG. You may also have to search all the files related to your project, as Custom Action implementations can be code stored outside of your InstallShield project.
The use may be in a ControlEvent, CustomAction, or some other table. If it's in a ControlEvent, it may be used to set another property. Ditto if it's in a CustomAction that sets properties (type 51) which may be easier to understand in the Custom Actions and Sequences view. In that case, also search for the property that gets set.
If you find it in a table like ISSearchReplace* or ISXml*, or IniFile, it's probably part of the Text Files Changes, XML File Changes, or INI File Changes, and that view should make it easier to understand.
Maybe that thread dead-ends somewhere. A property gets set, but never referenced. So try to search from the other end.
Bottom up: what gets written
If there are text file changes, xml file changes, ini file changes, or custom actions that reference the file you need updated, see where they get their information. Try to follow it back. If they're well written, you should be able to identify the property (noting that one called CustomActionData comes from a property matching the name of the custom action it's used in), and then trace that further back using the same ideas as above, but in the other direction.
Where's the problem?
If the threads don't connect, that's probably the problem. It's also possible that a custom action lacks permissions but doesn't reports a failure, or that the file name or path got misconfigured somewhere along the way. Look for small things like that if things look like they should work but don't.
It turns out that I misunderstood the problem and the project was never set up to change that value, so all I had to do was set up a Text File Change and it works perfectly. Thanks #Michael Urman for the thorough response - I really appreciate it!

Can we write a function in SSRS globally

Im currently using SSRS-2008R2. I've an scenario where i have to maintain the External image as a logo for each reports we have. Not, only that, we have our custom date formats that what we should change according to the Date Type users define in an asp.net application.
There are lot of things we have to do on every report. Thats my problem.
Following is the one of them Im currently sharing as example :
Currently i maintain the following function for each reports i've:
Public Function GetLogoImage() As String
Dim ImageLogoURL As String
if Globals!ReportServerUrl is nothing then
ImageLogoURL = "http://localhost/ReportServer" + "?%2fImages%2fLogo"
else
ImageLogoURL = Globals!ReportServerUrl + "?%2fImages%2fLogo"
Return ImageLogoURL
End Function
I hope, i asked question clearly. Im newbie in SO.
Thank you in advance.
If you have a list of functions that you wish to apply to multiple reports and you're not willing to copy them to every single one of them, you can create an external library and then add it as a reference to every report.
This is quite simple to do and there's lot of documentation around the web.You can start here. You will, however, have to maintain this external library but if you have a lot of code, I personally think this is a much better solution.
If you want to have a predefined layout, you may want to consider having a master report and then include other reports as sub-report objects, but you'll lose some flexibility design wise.
Since the accepted answer is more of a comment and the link provided is broken, i'll provide my answer for people who might need a quick guide on how to use custom code in ssrs:
In Design view, right-click the design surface outside the border of the report and click Report Properties.
Click Code.
In Custom code, type the code. Errors in the code produce warnings when the report runs.
Once you press ok, to call the function that you saved you just need to right click on a cell, select "Expression" and paste in the following string: Code.GetLogoImage
More detailed source here.

Access 2000 Class Module Terminates Immediately After Initialization

Any idea why this would be happening? I don't get any error inside the Class_Initialize sub, it just jumps straight to the Class_Terminate sub and the object I assign the class to ends up being Nothing.
I don't have Access 2000. See whether it has an error trapping option "Break in Class Module". For Access 2003, that option can be found from the VB editor's main menu: choose Tools->Options, then select the "General" tab on the Options dialog. The radio buttons for the Error Trapping choices are located on the middle right of the dialog.
It's not clear to me whether your class module is throwing an error silently. That option should (I hope) help you expose the error ... if there is one.
If that effort is not useful, think I would next set a break point on the first executable line in Class_Initialize, and then step through the code one line at a time with the F8 key. You can see which lines are executed, and at any time while you're in break mode you can inspect the values of variables by printing them to the Immediate Window ... with Debug.Print YourVariable or the shorter ? YourVariable
A slicker way to monitor your variables is to open the Watches window (from the menu, View->Watch Window), then add variable to it (Debug->Add Watch).
Finally, if those efforts don't lead you to a solution, create a stripped down version of your class module with only the bare minimum code needed to reproduce the problem. Add that code to your question, and also include enough of the calling code to show us how you're attempting to create and use the object instance.