Showing posts with label programmatically. Show all posts
Showing posts with label programmatically. Show all posts

Friday, March 30, 2012

Margin and Paper Orientation programmatically

Hello.

I have a report but by default it prints Portrait and 1.0inch Margin. I would like to programmatically set the values of my report to 0.2 inch margin and Landscape. I am using RDLC (Local Report).

Does anyone has an idea how to achieve this?

Jose

Pls try, Report ->properties ->layout.

Over here u cans et margins as well as width and height of the report.

|||

Report -> Properties -> Layout does not exists.

i don't think it has something to do with the report itself, but the PrintDoc related to the Report Control.

Based on my analysis, The Report Control MIGHT create a PrintDoc on the fly and set the Rendered Report to it. So, i guess we could try to trap that PrintDoc before is sent to Printer.

But, so far... i can't find the "way" to "meet up" with this PrintDoc chic.

Any other suggestion?

|||

Ok. I see what you mean now. Those Margins and Padding are related to the Control itself. For example, any other control inside the Reprt Control. It's like <Table> in HTML. You can set Margins and Paddings of its cells for other controls inside.

Well... i keep on looking a solution.... I trapped the Print Event but nothing about any hint to set Printing Margin and Orientation... Sad

|||

I found this solution but still is not what i am looking for. So far this solution only works with IMAGE output and it's really messy. So, i'll try to figure out what to do.

http://blogs.msdn.com/bryanke/articles/71491.aspx

Nobody can help please?

Wednesday, March 7, 2012

Managing DTS Programmatically

Does anyone out there have any tip on managing DTS packages
programmatically?
Specifically, I want to install and run a dts package using tsql through
query anyalyzer.
I know how to run it using the xp_cmdshell, but I don't know how to install
it programatically from a Structured Storage File.You can 'install' the structured storage file like you would any other file
needed by your application. DTS doesn't really care where the file resides.
You might consider creating a folder on the SQL Server specifically for DTS
package files. You could then launch the packages using DTSRUN via
xp_cmdshell from that well-known location. Folder/file creation can be done
manually or as part of a Windows Installer package, depending on your
deployment requirements.
Hope this helps.
Dan Guzman
SQL Server MVP
"rmg66" <rgwathney__xXx__primepro.com> wrote in message
news:%23WYn30uEGHA.524@.TK2MSFTNGP09.phx.gbl...
> Does anyone out there have any tip on managing DTS packages
> programmatically?
> Specifically, I want to install and run a dts package using tsql through
> query anyalyzer.
> I know how to run it using the xp_cmdshell, but I don't know how to
> install
> it programatically from a Structured Storage File.
>