I have SQL 2014 professional version 12.0.5000.0 with SSRS runing. eI have created a report in report builder 3.0 which works and runs find.
However when I go to create a subscription and run I get the user a1234 (as a example ) don't exist.
I looked there is no user with that name added to SSRS or in our domain.
my user name is ah1234 (as a example )
I looked in the subscription table and the owner is me ? However, the subscription is showing the owner as a1234?
I checked the report I uploaded it says the owner is a1234.
I'm thinking it might be a active directory issue but not sure.
Has anyone has see this before if so how can I fix the owner name of the subscription?
I don't know how SSRS has corrupted the owner name but here is a trick (written on 2008 R2) to correct owner names (I use this when people leave & their Active Directory user id gets deleted leaving orphaned subs that will not run).
Note that it updates the Microsoft-supplied subscriptions table, you may not wish to do that.
First identify the SSRS owner id for the from-person & also that of the to-person (you may need to get the to-person to create a subscription first):
SELECT distinct [OwnerID], u.username
FROM [<ssrs-database>].[dbo].[Subscriptions] s
join [<ssrs-database>].[dbo].[Users] u on s.ownerid = u.userid
Now make a safe copy of the subscriptions list, e.g.:
SELECT * into temp.subscriptionscpy
FROM [<ssrs-database>].[dbo].[Subscriptions] s
Now make the change, e.g. (this one changes the owner of all relevant subs):
update [<ssrs-database>].[dbo].[Subscriptions]
set ownerid = 'DDD87598-8957-42C8-8DBC-A893E7174CB6'
where ownerid = 'EBF0E483-69E6-4458-B171-BA28FFCCDF3F'
Now check the owner is as you want it.
Related
The problem is that alle the reports for a given project is now looking at a wrong team project.
In the standard reports the following query is used to determine the project:
SELECT TOP 1 p.ProjectNodeGUID, p.ProjectNodeName FROM
(
SELECT ProjectNodeGUID, ProjectNodeName, 1 AS RowRank FROM GetProjectNodeInfoFromReportFolder(#ReportPath)
UNION
SELECT '00000000-0000-0000-0000-000000000000' AS ProjectNodeGUID, 'missing' AS ProjectNodeName, 0 AS RowRank
) p ORDER BY p.RowRank DESC
But it does not return the correct one.
What has happened is that I renamed a project from A to A.Old and created a new project called A.
Looking at the report server, there is no folder called A.Old, only A but that actually points to A.Old.
Any idea of how to fix that?
If you are connecting to the Warehouse for TFS then you will need to run a rebuild of the Warehouse to have this change passed through. This is true for Project Renames, Deletes, and Collection detach/attach.
This should have been displayed in the warning message when you did the rename.
Running a rebuild from the admin console will fix this...
I have created a report on the SQL Server Report Service that lists all reports and their corresponding subscriptions.
[report name] [subscription description] [run]
I have added a column called [run] that contains an image. I want to make it so that if the user clicks on the [run] image/cell, it executes the corresponding subscription.
Is this possible?
I've looked at the image action, but it only seems to allow execution of reports (not subscriptions) or URLs.
The workaround I used was to create a separate report called SubscriptionRunner which accepts one parameter (the subscription id) and executes that subscription using the following SQL (provided by Anthony Forloney):
EXEC ReportServer.dbo.AddEvent #EventType='TimedSubscription', #EventData=<SubscriptionID>
I then set the Action property of the cell in the original report to Run the SubscriptionRunner report.
This has the side effect of opening SubscriptionRunner (which I would prefer to avoid) but it will do for now.
hello I have a database with 3 tables.
USERS('user_id','name','surname')
MESSAGE_GROUP('user_one','user_two', 'hash')
MESSAGES('from_id','group_hash', 'messages')
My php code enables me to send messages between users. My question is how to enable a user to delete a message from its mailbox but the other user still watching the message. The messages must be full deleted only if both users delete the message. I am not interesting about the code, I am interesting only in finding the logic behind this. Any proposals that includes mysql code are welcome. thanks
I think you should follow this. :)
You can keep an extra field in message_group table something like 'deleted_from' which will be initially 0
If user one deletes it make the value of 'deleted_from'=1, if user two deletes it, make the value of 'deleted_from' = 2.
When you go to delete the message for a user, and you find the value 'deleted_from' other than 0, delete the message completely, else mark the value of 'deleted_from' as '1' or '2'.
You will need to either:
Make a new table that specifies the mailboxes the message resides in, so that you can connect it to both users mailboxes
Or duplicate the message so that each user has their own copy that can be deleted
Add flags to the message table (not recommended) indicating whether the sender or recipient has deleted it. This I would avoid as it will not scale well if you have (or intend to add) group messaging.
add to MESSAGE_GROUP a status field with values :
0 no owner and should be deleted
1 only the sender owns the message
2 only the reciever owns the message
3 both sender and recievers own it
I would change the fields from the table in between like this (example that every user only can send a message to one person at a time):
USERS('user_id','name','surname')
MESSAGE_GROUP('user_id','message_id')
MESSAGES('from_id', 'to_id', 'messages')
So every user that has a message, will have a row in the MESSAGE_GROUP. When one user deletes the post, delete that row in MESSAGE_GROUP
I'm using MySQL with Vb.Net 2010 and Crystal Reports and to be honest I'm a complete noob when it comes to using Sql Queries. The problem is, I want to generate a report that will show the service fee from a transaction a person made while also showing the items bought, and their quantity and prices, basically a bill. I created a command from the data source I created in crystal reports and it contains this query:
SELECT t.transaction_code,t.fee,t.service_type,t.date_sched,total_bill, s.item_code, s.quantity_sold, i.item_description, i.price, CONCAT(p.fname,' ',p.mi,' ',p.lname),p.address FROM tbl_transaction AS t, tbl_sale AS s, tbl_item AS i, tbl_profile as p WHERE t.transaction_code = '{?trans_code}' AND s.transaction_code = t.transaction_code AND i.item_code = s.item_code AND p.id='{?p_id}'
It all works fine if I use that, the report shows everything like the persons name, transaction code, service type and its fee as well as all the items bought and the total bill. The problem is, if in that certain transaction, the said person only required services and did not buy any items, the report will just be blank. What I want is that the report should still be able to display the person's name, transaction code, service type and its fee, etc., even without buying an item. I know it's kind of hard to understand and it's also hard for me to explain, but I really need help right now.
Since I can't post images yet since I'm a new user. I'll just post a link to where I uploaded the structures of my tables:
http://oi42.tinypic.com/xogw9k.jpg
I also have a table called link_profile_transaction which does what it says and another table for the services which is linked to the services and fee from the transaction table(tbl_transaction) though it isn't included in the query.
http://oi41.tinypic.com/fqm2b.jpg
The links are legit and safe.
You must left join the items table to the service table.
Not really certain about the schema of your table, I am providing below for you to edit if it does not work as is.
SELECT t.transaction_code,t.fee,t.service_type,… s.item_code, s.quantity_sold,
i.item_description, i.price, CONCAT(p.fname,' ',p.mi,' ',p.lname),p.address
FROM tbl_transaction AS t, tbl_sale AS s, tbl_profile as p
LEFT JOIN tbl_item AS i ON i.item_code = s.item_code
WHERE t.transaction_code = '{?trans_code}'
AND s.transaction_code = t.transaction_code AND
p.id='{?p_id}'
Is it possible to get the files for a deployed reports ON SSRS 2005?
On of our developers deployed them to the Reporting Server, but didn't commited his changes to SVN. Now we are in an inconsistent state and we also can't find the files he created.
In Report Manager (usually the URL ends with /Reports or /Reports_instanceName ) You can look at the details of reports. The Edit button will allow you to download the .rdl definition files.
From
http://msdn.microsoft.com/en-us/library/ms156032(v=sql.90).aspx
In the Report Definition section, click Edit to extract a copy of the report definition. Modifications that you make locally to the report definition are not saved on the report server.
(I should have also noted, the interface and the button name change in SSRS 2008, so these instructions are specific to SSRS 2005.)
use ReportServer
go
create view vwReportDataSet_SharedDataSet_Mapping
as
select ds.itemid, ds.name as Report_DataSource,
cat.name as Shared_DataSource
from datasets ds
inner join catalog cat on ds.linkid = cat.itemid
go
create view vwSharedDataset_Usage
as
select cat.path,
cat.name,
cat.type,
ds.Report_DataSource,
ds.Shared_DataSource
from
catalog cat
left join vwReportDataSet_SharedDataSet_Mapping ds
on cat.itemid = ds.itemid
This SQL gives you your report dataset usage.
select * from vwSharedDataset_Usage
where type = 2
and path like '/SIT/%'
and name in ('Report1','Report2')