SSIS adding new columns to the Source - ssis

I am new to SSIS. I have a problem. i get data from two different data sources. I am able to merge them using Merge Component and feed the output to a Script component where i validate data and move it to the destination. Every thing is working fine. I want it to work when we add some extra columns in any sources.
The problem is when i add extra columns in source, i should add the input columns in the script component(check the ckeck boxes in Input Columns). Is there any way to do this?
Plz help

Try adding the new column to the source, open the package and then follow the flow through. You will have to go into subsequent controls including the merge control to refresh the data with this new field.
SSIS will prompt you with the exclamation mark at each stage where a refresh is mandatory(such as source control), although you will have to manually step through the flow components (such as merge) where a column output is optional.
For example, I added cost as a new column to the basic ole db source below
and after updating the source control, I have the opportunity to add it to the script component as you mention - but it is not mandatory for me to do so
the new field should be available in the sort component, even if its not used within the script control. You will however need to tick the field as a pass through on the sort control to get it into the merge component

Related

Combining two reports to one in Access 2013

I've two reports in my DB that I want to combine. Both these reports have various fields populated from preceding steps and a hyperlink that opens a form for further processing. The form auto-populates some of the fields using the data from the report with
=[Reports].[MyReport].[LineItemID]
I'm using a 3rd unbound form to put the 2 reports on a single screen (using simple drag and drop). The hyperlinks on both the reports don't read data from respective reports anymore. I tried using
=[Reports].[MyReport1].[LineItemID] to read from individual reports and also
=[Reports].[CombinedReport].[LineItemID] to read from the combined report but doesn't seem to be working.
Any pointers on this would be very helpful.
Thanks,
When you placed the two reports into the unbound report, you also created a control of type subform/subreport for each in the unbound report.
This you have to respect in your reference. You will have to check and use the names of these controls.
So if the control for the first report would have been named MySubControl1 this is your full reference:
=[Reports].[MyReport1].[MySubControl1].[Report].[LineItemID]
The extra .[Report] is included because you now also need to explicitly reference the content of the control (which in this case is a report) to actually have a reference to your embedded report object, and be able to reference the required LineItemID control within it.

Unmapped column in a dependence restriction in SSIS

I have an issue in SSIS in the dependence restriction. I am trying to import data from an excel file. I have used the EXCEL FILE, that it is connected to a derived column. After we have the UNION ALL component. Everytime I try to assign one column to the Account column it throws an error telling the metadata...
if I click in the restriction dependence between the UNION ALL component and the DERIVED COLUMN component IT shows that account is not mapped... but in the source (excel source component) it is mapped!!! it is driving me mad.
why i cannot add the account in this table?! to the source column? i HAVE TRIED to remove and recreating everything again... same problem again. I even opened a new package to test.. driving me mad.
does it make sense that the solution was to COPY one good excel source and then just change the new sheet? If I created from root with a new excel source it would throw always the previous errors. So it was just to copy the excel source that was working and then just changing to the desired (new) sheet. and it worked this way. Reset the metadata seems to be flick in SSIS. I would like if someone could share a secure way to do it!

VBA to create a form and load an attached image to it

Client has asked me to create a self contained tool in MS Access, versions 2007 and 2016. It needs to be self contained because it will be copied to and from various laptops at various times. The tool may not create, delete, or modify any file except the accdb database itself. When the tool is in use, the user is unlikely to have network or internet access.
One of the criteria is the creation of new forms each time it is run. I realize that Access is meant to have all the forms and their controls already built before deployment, but client doesn't want that. I have solved that problem, creating x number of forms upon certain conditions, and creating 30-40 controls on each form based upon certain conditions, each with their own events, etc.
Now, how do I load his logo into a control on each form? Remember, the accdb must be self contained, so I can't count on the logo being in a certain directory or even on the machine in use, and I can't write it to the file system myself.
I can and have loaded the logo (jpeg) into one of my tables in an attachment field. It will be the only attachment in that field. It would be just as easy for it to be its own table, if that helps.
I can create attachment controls with VBA, but I don't know how to set the ControlSource to the FileData inside the attachment with VBA.
I also have had poor success attempting to embed the picture in an image control in a hidden form and setting the .picture property to the image name. It only seems to be working on my machine.
So, how do I display an attached jpeg on a newly created form?
Just asked and answered in SO access-vba. Here's one solution.
Saving Image as OLE Object, in Access
Many others on google and SO search
EDIT: You must read the whole question to see the author's answer
Answer:
So, what I ended up doing was following this
https://support.microsoft.com/en-us/kb/210486
I use the readBLOB function to read the file and save it into the
database. Then, when I run a report or open a form that has the
picture, onload, I use the WriteBlob function to write the file to a
temp folder and then use that path to populate an Image object.

MS Access Letter Generator

I have a number of letter templates which I want to populate with data from my MS Access database and am unsure how to go about it.
The way I want it to work is as follows:
User is viewing a record within MS Access;
User presses "Generate Letter" button;
Choice of .doc/.docx templates (which I already have) appears;
User selects template and presses 'OK';
Letter is generated and populated with data from active record;
Once user is finished with letter, pressing 'Save' will attach it to active record;
(Ideally) any generated letters will appear within the attachments of each record (I have already created the attachments section - this is just for context)
How do I go about achieving this in MS Access 2013? I cannot seem to figure out nor find anything which deals with this specific problem.
The "Generate Letter" button should produce a pop-up form. That form will have either a combobox or listbox (depending on what you see fit) that displays the list of available templates, as well as an "OK" button.
Alternatively, you can place the combobox/listbox on the main form and the "Generate letter" button next to it, assuming your main form has a subform that's displaying the data.
You will then do a Mail Merge with only the active record. Once that's done, the most difficult part will be storing the "Save To" path in one of the fields. You could possibly use an OLE field, but saving the path to the file is my preferred method. I say it's the most difficult part because I'm not sure how you can capture that without using a standard dialog box.
For the word merge and selection of a template, try my super easy word merge example here:
The sample I have can be found here:
http://www.kallal.ca/msaccess/msaccess.html
Above sample is specially designed to enable ANY form with ONE LINE of code.
Thus, each time you build a new form, you can word merge enable it with great ease. (with one line of code).
Make sure you read the instructions from above, and you should eventually get to the following page
http://www.kallal.ca/wordmerge/page2.html
The above handles all of your issues a requests with the exception of the last step in which you save the path name to the document (and I recommend you don’t save the document in the database – but only path names to a folder). Grabbing the file name is also possible with my sample.

Replace DataSource for Reporting Services RDLC Reports

I am making some changes and need to change the DataSource for my report. How can I do that without losing all of the work I have done? Assume the field names are the same.
Update: The reports are still in Visual Studio and I need to change from a TableAdapter to a DataTable which I will fill through a class.
Update 2: Currently it is using fields in CustomerService_report_vw_ServiceRequest, I want to change that to CustomerService_ServiceRequest. I am seeing this in the expression editor. So when I select the Fields option in the Expression Editor, I want to see the fields in CustomerService_ServiceRequest.
Does that make more sense?
Update 3: So if you add a field from the other DataTable, you can switch your DataSetName to the new one. Now, how do I remove the old one?
I manually edited the *rldc file in a text editor and edited the XML therein to removed the DataSet.
If you already have the reports uploaded to the report server, the simplest thing would be to go into the properties of your report and then configure the data source information in there.
More information: Setting Data Source Properties in Reporting Services