Showing posts with label ssrs. Show all posts
Showing posts with label ssrs. Show all posts

Friday, March 30, 2012

How to attach a database from other server

Hi

I have created a test enviroment on my laptop where i have installed SQL server Experss and SSRS.

I already have one production server, and I would like to have a copy of one of its databases linked to my test Server.

How do I do that?

Thansk

Hello,

If you can take the database offline:

Take the database offline, manually copy the data and log files to your test server, then attach the database back on your production server, then on the test server.

If you can not take the database offline:

Create a backup of the database on your production server, then restore it to your test server.

Hope this helps.

Jarret

How to attach a database from other server

Hi

I have created a test enviroment, by installing SQL server express and SSRS on my laptop.

I also have a production server, and i am trying to make a copy of one of its database and linked it to my test server.

How do i do it?

Thanks

Hello,

If you can take the database offline:

Take the database offline, manually copy the data and log files to your test server, then attach the database back on your production server, then on the test server.

If you can not take the database offline:

Create a backup of the database on your production server, then restore it to your test server.

Hope this helps.

Jarret

|||It works. Thanks1

Wednesday, March 28, 2012

How to assign roles to a user on reporting server through Web Service MEthod

I am using the Web service of SSRS to assign the roles for a user that exists on that reporting server machine.

I am using the followng code to do this.

Policy[] p = new Policy[1];
p[0] = new Policy();
Role[] R = new Role[1];
R[0]= new Role();
R[0].Name = "Content Manager";
p[0].GroupUserName = "systemtest\user1";
rs.SetPolicies(@."/",p);

The same I have tried with SetSystemPolicy method also.

Policy[] p = new Policy[1];
p[0] = new Policy();
Role[] R = new Role[1];
R[0]= new Role();
R[0].Name = "Content Manager";
p[0].GroupUserName = "systemtest\user1";
rs.SetSystemPolicies(p);

I have used the above codes in achieving the mapping between the SSRS role and the windows local user. Getting error on this.

Vikas

The code looks good to me. What kind of error did you get? There might be a couple of reasons for failing:

1. you do not have permission to perform this action

2. Role can be managed by user, "Content Manager" is a pre-defined role out of box. But it may have been deleted. You have to make sure the role exists. ListRoles soap APIs can get you the available roles.

3. There is already a policy associated with the same user.

...

|||

There is only one issue i see...

p[0].Roles = R;

Before calling SetPolicies.

How to assign roles to a user on reporting server through Web Service MEthod

I am using the Web service of SSRS to assign the roles for a user that exists on that reporting server machine.

I am using the followng code to do this.

Policy[] p = new Policy[1];
p[0] = new Policy();
Role[] R = new Role[1];
R[0]= new Role();
R[0].Name = "Content Manager";
p[0].GroupUserName = "systemtest\user1";
rs.SetPolicies(@."/",p);

The same I have tried with SetSystemPolicy method also.

Policy[] p = new Policy[1];
p[0] = new Policy();
Role[] R = new Role[1];
R[0]= new Role();
R[0].Name = "Content Manager";
p[0].GroupUserName = "systemtest\user1";
rs.SetSystemPolicies(p);

I have used the above codes in achieving the mapping between the SSRS role and the windows local user. Getting error on this.

Vikas

The code looks good to me. What kind of error did you get? There might be a couple of reasons for failing:

1. you do not have permission to perform this action

2. Role can be managed by user, "Content Manager" is a pre-defined role out of box. But it may have been deleted. You have to make sure the role exists. ListRoles soap APIs can get you the available roles.

3. There is already a policy associated with the same user.

...

|||

There is only one issue i see...

p[0].Roles = R;

Before calling SetPolicies.

Wednesday, March 21, 2012

how to align data

I am not sure what combination or item from my toolbox to do the follwing in my ssrs 2005 report:

I want sort of like a table that shows something like this:

label1 value1

lable2 value2

label3 value3

I tried dragging a table but it has headers, footers, details...I don't want all that. I ended up having to use a combination of textboxes to do all this but the values don't really align well with the label textbox. Also, this is going to be exported to Excel so I am also worried they will also not align correctly after this report is exported into Excel.

the values are 3 individual values, not all from the same DataSet so I'll be putting in expressions for each...I just want to know the best way to create a grid like this other than using the table in the toolbox to create a standard report.

Drag and drop table. Delete the header and footer. Drag the fields in the detail part and select the entire row, set border property to show like grid, use the align property to align text.

Hope this help.

|||AZ-xyz, thanks for the reply. I did actually try that before I posted. The problem though is that the details repeated itself so I ended up wtih repeated fields all the way down. So I figured well, then maybe I need to add those 3 lables and values in a group...tried adding 3 groups but that didn't work...don't remember why but maybe I'll try groups again.|||I think you need to use textboxes for all the six items