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

Friday, March 30, 2012

How can I connect to SQL Server 2005 analysis services server programmatically?

Hi, all here,

Would please anyone here give me any idea about how can I connect to SQL Server 2005 analysis services server and send XML request to it programmatically (with Business intelligence development studio in SQL Server 2005)? Thanks a lot.

With best regards,

Yours sincerely,

That's a big topic - you can start here

http://msdn2.microsoft.com/en-us/library/ms186654.aspx

For the XMLA ThinMiner sample look here

http://www.sqlserverdatamining.com/DMCommunity/LiveSamples/124.aspx

Here's a blog entry of someone who's figured it out as well

http://geekswithblogs.net/darrengosbell/archive/2006/05/25/xmlaClient.aspx

|||Hi, Jamie, thanks a lot.

Wednesday, March 21, 2012

How can I assign a value to a textbox programmatically in a report?

For example: If I want to display the date today, txtDate.Text = DateToday;Type
=System.DateTime.Now
into the Textbox and set the Format (right-click->properties) to dd.MM.yyyy or your corresponding date-format
|||that's design time, what i'm trying to do is at run-time I want to assign a value to a particular textbox in the report. ΓΌ|||There is no way other than assigning a expression to the Textbox. The "MS Access way" doesn't work anymore ;(
You can do something like:
=iif( some_condition = true, System.DateTime.Now, "No Date")

or create your own function:
Add
Public Function myFunction(val as Object)
if val is Nothing then return System.DateTime.Now
return "Empty"
End Funcion

to Report-Properties->Code
and call it by
=Code.myFunction(Fields!ConditionColumn.Value)

|||ok thanks, i'll try your solution later. sql