Showing posts with label mode. Show all posts
Showing posts with label mode. Show all posts

Monday, March 19, 2012

Can I add user and passw to my OLAP ConnectionString?

Hi all,
I have written a custom assembly that works fine in preview mode, but when I deploy the report I get the '#Error' message instead of the output.
I have copied the assembly to the bin folder of Reportserver, placed it in the GAC and even edited the policyfiles.

Any help would be very appriciated,

Thanks in advance

public static class SimCardBuyer
{
public static string ReturnBuyer(string Seller, string PeriodeCode, string ComDevice)
{
string connstring = "PROVIDER=MSOLAP;DATA SOURCE=srv03-gc-10;INITIAL CATALOG=Invoicing";
AdomdConnection conn = new Microsoft.AnalysisServices.AdomdClient.AdomdConnection(connstring);
//Create a new string builder to store the results
System.Text.StringBuilder result = new System.Text.StringBuilder();
//Connect to the local server
using (conn)
{
conn.Open();
//Create a command, using this connection
AdomdCommand cmd = conn.CreateCommand();
cmd.CommandText = @."SELECT NON EMPTY { [Measures].[InvoiceAmount] } ON COLUMNS, NON EMPTY { ([Buyer].[Company].[Company].ALLMEMBERS ) }
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM
( SELECT ( { [Com Device].[Com Device].[" + ComDevice + @."] } ) ON COLUMNS FROM
( SELECT ( { [Invoice].[Period Code].[" + PeriodeCode + @."] } ) ON COLUMNS FROM
( SELECT ( { [Seller].[Company].[" + Seller + @."] } ) ON COLUMNS FROM [Invoicing])))
WHERE ( [Seller].[Company].[" + Seller + @."], [Invoice].[Period Code].[" + PeriodeCode + @."], [Com Device].[Com Device].[" + ComDevice + @."] )";

//Execute the query, returning a cellset
CellSet cs = cmd.ExecuteCellSet();
//Output the column captions from the first axis
//Note that this procedure assumes a single member exists per column.
TupleCollection tuplesOnRows = cs.Axes[1].Set.Tuples;
if (tuplesOnRows.Count > 1)
{
for (int row = 0; row < tuplesOnRows.Count - 1; row++)
{
result.Append(tuplesOnRows[row].Members[0].Caption);
result.Append(" / ");
}
result.Append(tuplesOnRows[tuplesOnRows.Count - 1].Members[0].Caption);
}
else if (tuplesOnRows.Count == 1)
{result.Append(tuplesOnRows[0].Members[0].Caption);}
else{result.Append(Seller);}
conn.Close();
return result.ToString();
}
}

Dear readers,

I have solved the problem above, but now I get an error with the Connectionstring.
I'm getting the next error now:


Either the user, NL01\SRV03-GC-10$, does not have access to the Invoicing database, or the database does not exist.
NL01\SRV03-GC-10$ is not a user in my system, so I'm stunned with this strange error.

I would appriciate any reply on this.

regards.

Sunday, March 11, 2012

Can I access my data source in Custom Report Item during design mode?

Hi,

I'm developing a Custom Report Item and would like to fill my properties dialog in design mode with real data. I have the name of the data source and the command text for the corresponding report dataset, read from the report design.

Is it possible to create an ado.net dataset so that I can display and use real data in my properties dialog box? First problem I have is to get the connection string from the data source string. I found no docs for that, especially the Microsoft.ReportingServices.DataExtensions.ReportDataSource class is not documented. Am I on the right way with that?

Thomas

Check out.. http://msdn.microsoft.com/msdnmag/issues/06/10/SQLServer2005/default.aspx

|||

Sorry,

I can't see where that relates to my question. Did I miss the point?

After rereading the article, I didn't find any word on how to get actual data values in design mode.

Maybe I didn't state clear enough what I want to obtain:

I would like to get actual data values from the dataset in design mode in order to use them for a properties dialog. I have access to the sql statement from reportDataSet.CommandText already and I know the datasource name (that somehow is an alias for the db connection). What's missing is how to get the connection string from the datasource - then I can open the connection and read the data using ado.net.

Thomas

|||

For connection string:

check the DataSourceDefinition class in Reporting Service web service

Can I access my data source in Custom Report Item during design mode?

Hi,

I'm developing a Custom Report Item and would like to fill my properties dialog in design mode with real data. I have the name of the data source and the command text for the corresponding report dataset, read from the report design.

Is it possible to create an ado.net dataset so that I can display and use real data in my properties dialog box? First problem I have is to get the connection string from the data source string. I found no docs for that, especially the Microsoft.ReportingServices.DataExtensions.ReportDataSource class is not documented. Am I on the right way with that?

Thomas

Check out.. http://msdn.microsoft.com/msdnmag/issues/06/10/SQLServer2005/default.aspx

|||

Sorry,

I can't see where that relates to my question. Did I miss the point?

After rereading the article, I didn't find any word on how to get actual data values in design mode.

Maybe I didn't state clear enough what I want to obtain:

I would like to get actual data values from the dataset in design mode in order to use them for a properties dialog. I have access to the sql statement from reportDataSet.CommandText already and I know the datasource name (that somehow is an alias for the db connection). What's missing is how to get the connection string from the datasource - then I can open the connection and read the data using ado.net.

Thomas

|||

For connection string:

check the DataSourceDefinition class in Reporting Service web service

|||Did you ever make any progress on this? I'm trying to get to the Connection String property of the data source from my Custom Report Item code.

Any direction is appreciated.

Thanks

J

Tuesday, February 14, 2012

Can a database become suspect after being opened in STANDBY mode?

Hello,
I have an MS SQL Server 2000 SP3 database. My question is whether I can be
confident it won't become suspect after it has been successfully opened in
STANDBY mode. Can I use the fact as an indicator that the database won't go
suspect when I later try to open it RECOVERY mode?
-- Many thanks, OskarOn Oct 4, 5:20 pm, Oskar <Os...@.discussions.microsoft.com> wrote:
> Hello,
> I have an MS SQL Server 2000 SP3 database. My question is whether I can be
> confident it won't become suspect after it has been successfully opened in
> STANDBY mode. Can I use the fact as an indicator that the database won't go
> suspect when I later try to open it RECOVERY mode?
> -- Many thanks, Oskar
Didn't test it, but I do think that the database can become suspect
even if it is in standby mode. If you have a hardware failure, it can
cause the database to get into suspect status. For example if
something gets wrong with your storage, and the disk suddenly
disappears, then the database can get into suspect status. Of course
it is rare that something like that happens.
Adi|||At that stage hardware faults would already be fixed.
"Adi" wrote:
> On Oct 4, 5:20 pm, Oskar <Os...@.discussions.microsoft.com> wrote:
> > Hello,
> > I have an MS SQL Server 2000 SP3 database. My question is whether I can be
> > confident it won't become suspect after it has been successfully opened in
> > STANDBY mode. Can I use the fact as an indicator that the database won't go
> > suspect when I later try to open it RECOVERY mode?
> >
> > -- Many thanks, Oskar
> Didn't test it, but I do think that the database can become suspect
> even if it is in standby mode. If you have a hardware failure, it can
> cause the database to get into suspect status. For example if
> something gets wrong with your storage, and the disk suddenly
> disappears, then the database can get into suspect status. Of course
> it is rare that something like that happens.
> Adi
>