Showing posts with label programatically. Show all posts
Showing posts with label programatically. Show all posts

Sunday, March 11, 2012

Change color of Graph

How do I programatically set the graph color (actual bar colors) and bypass the use of the palette?

You need at least RS 2000 SP1 or later installed on report designer and report server machines. Then take a look at the following whitepaper: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/MoreSSRSCharts.asp

Specifically, read the section about "Custom Chart Color Palettes and Legends".

-- Robert

|||Thanks.

Wednesday, March 7, 2012

Change "Output Alias" on synchronous component programatically

Wanted to enquire how this is done. Tried doing it in the setUsageType method I have overwritten but only allows description to be changed. Basically need to change "Name".

Best option would be to change it instantly when a user selects a column from the inputs in the custom component, ie. it changes the Output Alias to a desired value. (Input tab in advanced editor)

All this is being done in a custom component which I would like to be synchronous, can achieve a similar result asynchronously.

Thanks

Not relaly sure if this can be done, as there is no output column, just the upstream input column which has already been named. If you select the column, then can you not change the IDTSInputColumn90 name in SetUsageType? What happens? The other thing to try would be to change the name property on the IDTSVirtualInputColumn90, can you?

You do not really have an output alias. When you see this in the stock UIs it is because you are creating a new output column, which is not what you appear to be doing.

|||

If you change the name is setUsageType you see a change in debug mode but eventually it does not change the column name (strangely description can be changed however), basically change is ignored. When I change the Output Alias in the gui advanced designer (non programatically) it does not create a new output column in the output column tab listing but does successfully change the alias and column name, which is basically the result I want. Have been able to achieve the change with a new output column and asynchronous component but wanted to do it synchronously. Also figured it could be done programatically due to the fact you can do it non-programatically in the gui advanced editor.

Thanks, will try the virtual column thing.

Friday, February 24, 2012

cdosysmail with attachment

With cdosysmail I have gotten my code to work to programatically send emails
out as HTML.
Does anyone know how to tweak the standard CDO example to send the query
results as an attachment?
thanksI strongly, strongly, strongly urge you to use xp_smtp_sendmail instead of
cdo. See http://www.aspfaq.com/2403 (which incidentally does have a sample
of using CDO to send an attachment, but please read my first sentence
again).
A
"26point2er" <26point2er@.discussions.microsoft.com> wrote in message
news:D8D7CBB4-2174-4F79-B94D-18520BC6B060@.microsoft.com...
> With cdosysmail I have gotten my code to work to programatically send
> emails
> out as HTML.
> Does anyone know how to tweak the standard CDO example to send the query
> results as an attachment?
> thanks
>|||Thank you for the input. I will post my results here.
"Aaron Bertrand [SQL Server MVP]" wrote:

> I strongly, strongly, strongly urge you to use xp_smtp_sendmail instead of
> cdo. See http://www.aspfaq.com/2403 (which incidentally does have a sampl
e
> of using CDO to send an attachment, but please read my first sentence
> again).
> A
>
>
> "26point2er" <26point2er@.discussions.microsoft.com> wrote in message
> news:D8D7CBB4-2174-4F79-B94D-18520BC6B060@.microsoft.com...
>
>

Tuesday, February 14, 2012

Catch and analyse incoming queries

Can I programatically (from f.e. c# program) catch incoming queries to
an SQL server?
I want to watch and analyse them, if such queries are
create/alter/drop I want to log this information in a database to view
changes history of database structure.
You can use profiler for these type of activities. I recollect reading on
Dejan blog to build a trigger on profiler based events. Can take a read at
: http://solidqualitylearning.com/blog...11/25/214.aspx
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
"Sergi" <adamchuk@.gmail.com> wrote in message
news:6f504b3b.0502250002.103d18a5@.posting.google.c om...
> Can I programatically (from f.e. c# program) catch incoming queries to
> an SQL server?
> I want to watch and analyse them, if such queries are
> create/alter/drop I want to log this information in a database to view
> changes history of database structure.