Triggering A Report On Sql Statement
Aug 17, 2007
is it possible to trigger the sending of a report upon the results of a sqlstatement
i.e my statement brings back 10 different e-mails can i trigger a report to be sent to these e-mails.
next day my report brings back 5 different e-mails can i trigger a report to be sent to these e-mails and not the others
cheers for your help
View 11 Replies
ADVERTISEMENT
May 22, 2007
Is there a way to trigger a report to run and the be stored as a snapshot? We have a Reporting Build process that stores aggregate values into a summary table, however this stored proc takes a couple of hours to run. What we would like is to have a report run immediately after the stored procedure is complete and then the reports be able to be viewed on-demand, but already run and stored in the Report Server
Not know much about the SQL part of it, is this possible?
Thanks for the information.
View 3 Replies
View Related
Dec 21, 2006
Is there a way to trigger a Subscription from DTS?
or is there a another way to do the following:
I have a Subscription that creates a pdf file on our server. I want to archive the existing file before I create the new one.
I was thinking of using a DTS package to copy the file then trigger the report.
But, I'm open to other solutions...Thanks in advance!!!
View 1 Replies
View Related
Jul 20, 2005
I have a trigger on a table. I am trying to dynamically log thechanged fields on the table to another table, so I am iteratingthrough the bits in COLUMNS_UPDATED() to find what's changed, andgetting the column name programatically. This is all working fine.If I do a regular insert command in my trigger then everything worksfine. However, since I want to retrieve data from the column namewhich I got programatically from the inserted and deleted tables (toget the old and new values) I wanted to do something like this:insert into auditTransactionLog (TableName,PrimaryKeyId,ColumnName,OldValue, NewValue, ActionType) EXEC( 'SELECT(''cmContactInfo''), I.contactID,'''+ @colname+''', D.'+@colname+',I.'+@colname+', '+@action+' FROM inserted I INNER JOIN Deleted D onI.ContactId = D.ContactId')The presence of this line of code appears to be preventing theupdating of the table with the trigger. Is there some reason why Ican't do the EXEC in the trigger? If I did it without EXEC it worksfine but I have no idea of getting at the D. and I. @colname columnsotherwise.Thanks for any help!Rebecca
View 1 Replies
View Related
Dec 17, 2007
Hi,
We have requirement where we need to run the SSRS report from Command Prompt. We are using Control + M, which is a scheduler runs only from DOS prompt.
Can anyone help us to know the procedure of doing this.
Thanks
Karthik
View 1 Replies
View Related
Jan 12, 2007
Is it possible to set up a trigger on a table on one Sql Server that will trigger an event on another SQL Server on a different box? I have never done this before, so I was wondering if it is possible and how to go about it.
Thank you
Todd
View 4 Replies
View Related
Dec 12, 2007
can anyone help me with triggering repliation from a stored procedure??
i'd like to know how to execute the replication using a stored procedure..
thanks a lot!!! appreciate it.
View 2 Replies
View Related
Jun 12, 2008
hi friends.... i had a problem with sending mail using trigger when Update data from a table. Procedure is executed successfully. but when i update record from a particular table. I had a following error xp_sendmail: Either there is no default mail client or the current mail
client cannot fulfill the messaging request. Please run Microsoft Outlook
and set it as the default mail client. (0 row(s) affected)
Can any one explain what's my problem and give me a solution for this.
it's Urgent !!!!!!!
View 1 Replies
View Related
Mar 11, 2006
If I am creating an auction site and I want the auction to absolutely close on a certain date is there a way in SQL I can trigger to change the status of the auction to close?
View 1 Replies
View Related
Feb 20, 2006
I am currently building an ASP.Net web app and implementing SQL Server 2005 for a project. I was relying somewhat on kicking off SSIS packages from the web app, but I am not really sure how to do this.
If anyone could help me out, I would really appreciate it.
View 1 Replies
View Related
Dec 31, 2007
Hi Everyone,
Is there any way to trigger the run of SSIS packages automatically each time an update comes from the source, and not schedule it for a constant interval of time.
The scenario is the enduser updates or adds data from the infopath forms. for that particular data he wanted to generate the report instantaneously. so we need to run the SSIS packages instantaneously when there is any update from source data. for this, is there any feature in SSIS that it can recognize the updates from source data like the proactive caching in SSAS.
View 7 Replies
View Related
Feb 24, 2007
Is there a way to do this? It would be useful to test whether a subsciption works. At the moment I am setting the scheduled time a few minutes ahead and waiting for the report to run.
Subsciptions are also a convenient way to store different parameter settings for a report.
My preference would be to to do this through the Report Server UI (presumably from the subscriptions tab).
Alernatively, being able to call a report (with paramters) from a stored procedure woukd be useful.
Thanks,
Dick Campbell
View 3 Replies
View Related
Mar 8, 2002
I would like to have stored procedures run on the first of every month. What would be the best way to do this?
View 1 Replies
View Related
Dec 8, 2006
I've read through several threads concerning the triggering of a subscription in RS by the use of a FireEvent. I have made this work using the following...
C:> rs.exe -i MyScriptFile.rss -s "MyReportServer/ReportServer"
where MyScriptFile contains the subscription/schedule ids. This works if I am signed on to the ReportServer C:> drive and execute the command line.
What I need to do is create a trigger based on data changing in an SQL database on one server and execute this line of code on the ReportServer on another server.
Do I need to use a stored procedure, extended stored procedure, or WHAT???? to execute this command?
Thanks! Wanda
View 3 Replies
View Related
Jan 11, 2004
Hi All,
My question is regarding syncronization between two databases in MS SQL Server. If we wanted to do MERGE REPLICATION then we can set up pulishers and subscribers using the PS/SQL script (stored procedures) without having to use Enterprise Manager gui tools. I see that after you set all the publishers, distributors and subscribers and you want to start syncronization explicitly the only way you could do is go to Enterprise Manager and find the Publishing/Subscribing Items and right click on them and choost "Start Syncronization" (Sorry I have omitted the nitty-gritty details about how to find those Publishing/Subscribing items in Enterprise Manager).
I am wondering whether we could trigger the start of syncronization using any system stored procedures or without using Enterprise Manager.
Please let me know if you have any idea about it.
I will highly appreciate your response.
Thanks,
Niben Singh
View 6 Replies
View Related
Sep 13, 2007
I have discovered trace output in MSSQLDATAMSSQL.1MSSQLLOG that I have not kicked off. It is at various times and limited to 20MB. So that tells me a server event is kicking off a pre-defined trace. The trace contains mostly hash warnings and sort warnings.
I have looked through my Agent Jobs, Agent Alerts, and perfmon and don't find anything that is set up to kick off a trace under a specified condition.
I have checked the job activity, SQL error logs, SQL server logs, and the server's event viewer for any odd events or event times that correlate with the times of the traces.
I have checked each database's sys.sql_modules for a definition containing '%sp_trace%'.
Where else can I check to find what would be triggering these traces?
Our app logins don't have permissions high enough to run traces, I verified:
You do not have permission to run 'SP_TRACE_CREATE'
I am the DBA, not a .NET programmer -- so I am lacking experience if there's anything on the .NET side.
This is SQL 2005 64-bit running active/passive on a Win2003 clustered pair.
View 1 Replies
View Related
Jul 18, 2007
Hello,
I have a sqlclr stored procedure that works well if started via execute in SSMS. (The stored procedures makes a SSRS web service call.) When I install a trigger on a database table to execute the stored procedure
create trigger NewWdsStatsEntry on dbo.WDSSTATS after insert
as execute UpdateReportExecutionSnapshot N'http://localhost/ReportServer/reportservice2005.asmx', N'/Report1';
go
and add something to the table, I get the following error:
Msg 6522, Level 16, State 1, Procedure UpdateReportExecutionSnapshot, Line 0
A .NET Framework error occurred during execution of user-defined routine or aggregate "UpdateReportExecutionSnapshot":
System.Net.WebException: The request was aborted: The operation has timed out.
System.Net.WebException:
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at UserProcedures.ReportService2005.ReportingService2005.UpdateReportExecutionSnapshot(String Report)
at StoredProcedures.UpdateReportExecutionSnapshot(String url, String reportPath)
.
The statement has been terminated.
The insert times out after 100 seconds and no row has been added to the table, but the web service call actually created a new report! Any idea why the trigger can't execute the stored procedure?
Thanks!
werner
View 3 Replies
View Related
Apr 29, 2008
I am trying to trigger SSIS package if a file is present in a folder, can I use any of the SSIS tasks in doing that??
Thanks!!
View 13 Replies
View Related
Apr 29, 2008
I am trying to trigger SSIS package if a file is present in a folder, can I use any of the SSIS tasks in doing that??
Thanks!!
View 1 Replies
View Related
Jul 20, 2005
Hello, SQL gurus!This message use HTML tables (in case you see a bunch of gobbledy-gook).I need to modify an SQL statement:SELECT DISTINCT Trim(InvtID)+', '+Trim(Descr) AS Item, month, Sum(QtyShip) AS QtyFROM Sales_View GROUP BY Trim(InvtID)+', '+Trim(Descr), month, CustID HAVING (CustID)= @CustID ) ORDER BY Trim(InvtID)+', '+Trim(Descr), month;Whose output is something like the following:ItemmonthQty 26479F, Report Cover Sheets (100/pkg)32 26479F, Report Cover Sheets (100/pkg)81 26479F, Report Cover Sheets (100/pkg)91 46217C, Manual- 5th Ed61 46217C, Manual- 5th Ed81 514560, Profile Report81 51900C, Technical Manual11 ADHAC0, Adults and Children (kit)86 ADS04, Technical Manual 2nd Ed715 And turn it into something like this:ItemJanQtyFebQtyMarQtyAprQtyMayQtyJunQtyJulQtyAugQtySepQtyOctQtyNovQtyDecQty 26479F, Report Cover Sheets (100/pkg)002000011000 46217C, Manual- 5th Ed000001010000 514560, Profile Report000000010000 51900C, Technical Manual100000000000 ADHAC0, Adults and Children (kit)000000060000 ADS04, Technical Manual 2nd Ed0000001500000 Can anyone help?!TIA...
View 4 Replies
View Related
May 14, 2008
All,
I have a report that currently lists the results of a query in SSRS. The list is a list of
items that need to be updated by the users. They have asked us to crate an "update all" button on the report so that they can just click this to update all of the items returned.
I can write the SQL for doing this but am unsure as to how to apply it to an SSRS report. I could do this easily by relocating the report to an IIS server using ASP but the reporting services side has me lost and I don't want to relocate the report away from SSRS as the users are all familiar with it's current location. I've considered adding a stored procedure to run the update but it's a third party database so that would be difficult at best and a maintenance hassel going forward.
Anyone have ideas for linking an "update button" to run an UPDATE statement from an SSRS report?
View 1 Replies
View Related
Jan 21, 2008
Hi,
I have a report with 5 filters which can be applied to it. The records are grouped by the Rotation programme there are on, with a subtotal for each unique programme name.
The report seems to work fine, but upon closer inspection - we noticed that 2 of the records are not being displayed. As a result, the total count is out by 2.
We tracked down the missing records so I ran the SQL query with a Where clause, and it was able to find the two records.
What could possibly cause this behaviour? Please see included SQL statement :
Code Block
SELECT Posts.PostNumber,COUNT(Posts.PostNumber) AS RPCount, Incumbents.Name AS IncumbentName, Grades.GradeTitle, Specialties.SpecialtyTitle,
Hospitals.Name AS Hospital, Genders.Gender, [Incumbent History].YearGraduated, COUNT([University Origins].Origin) AS OriginCount,
Incumbents.Nationality AS NationalityID, Countries.[Country Name] AS Nationality, [Rotation Programmes].[Programme Name],
Posts.[Post Approved for Training], [University Origins].Origin, Posts.OldPostNumber, [Rotation Programmes].[Programme ID]
FROM Posts INNER JOIN
Incumbents ON Posts.PostNumber = Incumbents.PostNumber INNER JOIN
[Incumbent History] ON Incumbents.[Incumbent ID] = [Incumbent History].IncumbentID INNER JOIN
Grades ON Incumbents.[Official Grade] = Grades.GradeID INNER JOIN
Specialties ON Posts.Specialty = Specialties.SpecialtyID INNER JOIN
Hospitals ON Posts.HospitalID = Hospitals.[Hospital ID] INNER JOIN
Genders ON Incumbents.GenderID = Genders.GenderID INNER JOIN
Countries ON Incumbents.[Country Of Birth] = Countries.[Country ID] INNER JOIN
[Rotation Programmes] ON Posts.[Rotation Programme] = [Rotation Programmes].[Programme ID] INNER JOIN
[University Origins] ON [University Origins].[Uni Origin ID] = Incumbents.[University Origin]
GROUP BY [Rotation Programmes].[Programme Name], Posts.PostNumber, Incumbents.Name, Grades.GradeTitle, Hospitals.Name, Genders.Gender,
[Incumbent History].YearGraduated, [University Origins].Origin, Incumbents.Nationality, Countries.[Country Name], [University Origins].Origin,
Posts.[Post Approved for Training], Posts.OldPostNumber, Specialties.SpecialtyTitle, [Rotation Programmes].[Programme ID]
View 12 Replies
View Related
Jun 16, 2006
SQL server 2005 express reporting problem.
error message:
This feature "remote access to report data sources and/or the report server database" is not supported in this edition of reporting service
I got this error message when I try to connect to database hosted in another PC running SQL server 2000.
Is it true that SQlL server Express can only use Local Database Engine to host the database?
View 5 Replies
View Related
Sep 9, 2015
I just created a report builder. I have a main report and i wanted to create a sub report. why i cant or i cant view the path or the folder of my .rdl file to be use as my sub report.
View 5 Replies
View Related
Jun 30, 2006
After I use the report builder to create a generic report, how do I actually get that report into the report designer so that I can modify it more effectivly?
The issue that I have now is that the file on the report server is not a .rdl file and if I simply save it as one and then bring it into VS to modify it the code file is a html structure rater than a XML file type.
Any suggestions would be appreciated. Thanks
View 3 Replies
View Related
May 3, 2007
How do I jump to another report based on a value in my current report. The report that I am jumping from has no parameters, just values.
View 7 Replies
View Related
Aug 29, 2006
I am currently having this problem with gridview and detailview. When I drag either onto the page and set my select statement to pick from one table and then update that data through the gridview (lets say), the update works perfectly. My problem is that the table I am pulling data from is mainly foreign keys. So in order to hide the number values of the foreign keys, I select the string value columns from the tables that contain the primary keys. I then use INNER JOIN in my SELECT so that I only get the data that pertains to the user I am looking to list and edit. I run the "test query" and everything I need shows up as I want it. I then go back to the gridview and change the fields which are foreign keys to templates. When I edit the templates I bind the field that contains the string value of the given foreign key to the template. This works great, because now the user will see string representation instead of the ID numbers that coinside with the string value. So I run my webpage and everything show up as I want it to, all the data is correct and I get no errors. I then click edit (as I have checked the "enable editing" box) and the gridview changes to edit mode. I make my changes and then select "update." When the page refreshes, and the gridview returns, the data is not updated and the original data is shown. I am sorry for so much typing, but I want to be as clear as possible with what I am doing. The only thing I can see being the issue is that when I setup my SELECT and FROM to contain fields from multiple tables, the UPDATE then does not work. When I remove all of my JOIN's and go back to foreign keys and one table the update works again. Below is what I have for my SQL statements:------------------------------------------------------------------------------------------------------------------------------------- SELECT:SELECT People.FirstName, People.LastName, People.FullName, People.PropertyID, People.InviteTypeID, People.RSVP, People.Wheelchair, Property.[House/Day Hab], InviteType.InviteTypeName FROM (InviteType INNER JOIN (Property INNER JOIN People ON Property.PropertyID = People.PropertyID) ON InviteType.InviteTypeID = People.InviteTypeID) WHERE (People.PersonID = ?)UPDATE:UPDATE [People] SET [FirstName] = ?, [LastName] = ?, [FullName] = ?, [PropertyID] = ?, [InviteTypeID] = ?, [RSVP] = ?, [Wheelchair] = ? WHERE [PersonID] = ? ---------------------------------------------------------------------------------------------------------------------------------------The only fields I want to update are in [People]. My WHERE is based on a control that I use to select a person from a drop down list. If I run the test query for the update while setting up my data source the query will update the record in the database. It is when I try to make the update from the gridview that the data is not changed. If anything is not clear please let me know and I will clarify as much as I can. This is my first project using ASP and working with databases so I am completely learning as I go. I took some database courses in college but I have never interacted with them with a web based front end. Any help will be greatly appreciated.Thank you in advance for any time, help, and/or advice you can give.Brian
View 5 Replies
View Related
Jan 9, 2015
Ok I have a query "SELECT ColumnNames FROM tbl1" let's say the values returned are "age,sex,race".
Now I want to be able to create an "update" statement like "UPATE tbl2 SET Col2 = age + sex + race" dynamically and execute this UPDATE statement. So, if the next select statement returns "age, sex, race, gender" then the script should create "UPDATE tbl2 SET Col2 = age + sex + race + gender" and execute it.
View 4 Replies
View Related
Jul 20, 2005
hiI need to write a stored procedure that takes input parameters,andaccording to these parameters the retrieved fields in a selectstatement are chosen.what i need to know is how to make the fields of the select statementconditional,taking in consideration that it is more than one fieldaddedfor exampleSQLStmt="select"if param1 thenSQLStmt=SQLStmt+ field1end ifif param2 thenSQLStmt=SQLStmt+ field2end if
View 2 Replies
View Related
Oct 29, 2007
Hi guys,
I have the query below (running okay):
Code Block
SELECT DISTINCT Field01 AS 'Field01', Field02 AS 'Field02'
FROM myTables
WHERE Conditions are true
ORDER BY Field01
The results are just as I need:
Field01 Field02
------------- ----------------------
192473 8461760
192474 22810
Because other reasons. I need to modify that query to:
Code Block
SELECT DISTINCT Field01 AS 'Field01', Field02 AS 'Field02'
INTO AuxiliaryTable
FROM myTables
WHERE Conditions are true
ORDER BY Field01
SELECT DISTINCT [Field02] FROM AuxTable
The the results are:
Field02
----------------------
22810
8461760
And what I need is (without showing any other field):
Field02
----------------------
8461760
22810
Is there any good suggestion?
Thanks in advance for any help,
Aldo.
View 3 Replies
View Related
Nov 5, 2015
I've have a need with SQL Server 2005 (so I've no MERGE statement), I have to merge 2 tables, the target table has 10 fields, the first 4 are the clustered index and primary key, the source table has the same fields and index.Since I can't use the MERGE statement (I'm in SQL 2005) I have to make a double step operation, and INSERT and an UPDATE, I can't figure how to design the WHERE condition for the insert statement.
View 2 Replies
View Related
Aug 13, 2014
i was tasked to created an UPDATE statement for 6 tables , i would like to update 4 columns within the 6 tables , they all contains the same column names. the table gets its information from the source table, however the data that is transferd to the 6 tables are sometimes incorrect , i need to write a UPDATE statement that will automatically correct the data. the Update statement should also contact a where clause
the columns are [No] , [Salesperson Code], [Country Code] and [Country Name]
i was thinking of doing
Update [tablename]
SET [No] =
CASE
WHEN [No] ='AF01' THEN 'Country Code' = 'ZA7' AND 'Country Name' = 'South Africa'
ELSE 'Null'
END
What is the best way to script this
View 1 Replies
View Related
Jul 4, 2006
Hello friends,
I want to use select statement in a CASE inside procedure.
can I do it? of yes then how can i do it ?
following part of the procedure clears my requirement.
SELECT E.EmployeeID,
CASE E.EmployeeType
WHEN 1 THEN
select * from Tbl1
WHEN 2 THEN
select * from Tbl2
WHEN 3 THEN
select * from Tbl3
END
FROM EMPLOYEE E
can any one help me in this?
please give me a sample query.
Thanks and Regards,
Kiran Suthar
View 7 Replies
View Related