Showing posts with label beginning. Show all posts
Showing posts with label beginning. Show all posts

Thursday, March 29, 2012

Create an index in a PDF file

Hi!!

I have a report that is exported to a PDF file... Is possible to get an index in the beginning of the file? I have the page number at the bottom of each page but i would need an index...

Thx in advance!!

Any idea? Isn′t possible to do it? At the moment, I havent found anything linked with this...|||

Hi Sergio,

Do you mean a document map? Check out this link: http://msdn2.microsoft.com/en-us/library/ms156383.aspx

|||

Hi Brad!!

not exactly... i would like to appear something similar but in a page in the beginning of the PDF document including the page number where each element is, i.e. the tables of the document... is there any option to do this? it′s very similar to the document map but with the page number...

I see two problems:

- I was thinking of using "=Globals.PageNumber" but i can′t, it says me that only can be placed in the header or the footer...

- and the other problem is setting the content of the document map in a page of the PDF... could I do this?

Perhaps, this is a bit difficult but I am always looking for challenges ... any suggestions? thx in advance!!

Sergio

|||I know of no way to accomplish exactly what you are looking for sorry to say. The document map links to items as repeated on pages. But I am not sure what you mean by "setting the content of the document map in a page of the PDF". If you mean as a page, there is no way to control this.|||

Hi Brad,

that was exactly i ment: i want to show it as a page, but if there is no way to do it... anyway, thank you for your help...

Sergio

Tuesday, March 27, 2012

Create a table and then using it as OLE DB Destination component

I want to do the following in a package:

Create a table at the beginning of a package (using a ExecuteSQLTask component) and then use the created table as a OLE DB destination component, later on the package.

Is this possible in SSIS?

The problem I run into is that I have to point the OLE DB destination component to a table and set up mappings, however as the table does not exist until the package is running, it does not seem to be possible.

I've looked at:

http://blogs.conchango.com/jamiethomson/archive/2006/11/19/SSIS_3A00_-Using-temporary-tables.aspx

Which is slightly similar to what I want, but the table I create would not be a temp tables, and I need to set up mappings and I don't see how this is possible.

Thanks

To design and build the package you will need to create the table. Once that has been completed, the table can be dropped, and you can rely on the table created in the Exec SQL Task for the actual running of the package. You will however need to change the DelayValidation property to be True, on the Data Flow Task. This will prevent the task (and components it contains) from being validated, and failing due to the missing table. The Data Flow Task will still be validated, immediately prior to execution, but by that stage the Exec SQL Task will have completed, so the table will then exist.|||

Ok, thanks for the answer but thats whats was mentioned on the cochango link. The difference here is that I do not wish to drop the table after it has been created, I want to create it, use it and keep it...

I'm currently creating packages in C#, however the problem occurs when I make the call:

// Establish a connection

componentInstance.AcquireConnections(null);

// Initialize the metadata

componentInstance.ReinitializeMetaData();

The component is question here is a OLE DB Destination component, it throws an exception because the table does not exist in the database whilst the package is being created.

Now, I know I can set DelayValidation on the Task which contains the destination component

It would be nice if I could:

1. set DelayValidation = true on the Task which contains this component

2. Skip the componentInstance.ReinitializeMetaData() method

3. Set up mappings between the input collection and external meta columns (each of which I would have to create)

However, if I skip the method componentInstance.ReinitializeMetaData I receive there is no inputCollection available to map to, so when you call:

// Get the destination's default input and virtual input.

IDTSInput90 input = component.InputCollection[0];

IDTSVirtualInput90 vInput = input.GetVirtualInput();

there is are no columns available....

Therefore, my question is, can this be done in a C# environment, or does the same rule as creating this in the Designer apply, whereby I would have to have the table available in the database on the creation of the package in order to create the package?