What View do ?
• First, It help you break down complex queries.
• Secong, Query reusability.
• Third, Security.(not fully recommendable)
What is View ?
View is just a stored query. Can also be said as virtual
table. They don't hold any data into them.Data comes from
real tables.SQL select query operator (WHERE, ORDER BY, etc)
can be used with it.
You can generate XML from SQL queries without even doing single line of code in your programming language. Below is the script used in above video:
--Query 1
select 1 as tag,null as parent,
c.customerid as [Customers!1!Customerid],
null as [order!2!orderid]
from customers c inner join orders o
on o.customerid=c.customerid
union
select 2 as tag,1 as parent,
c.customerid,
o.orderid
from customers c inner join orders o
on o.customerid=c.customerid
order by [Customers!1!Customerid],[order!2!orderid]
for xml auto
--Query 2
select 1 as tag,null as parent,
c.customerid as [Customers!1!Customerid],
null as [order!2!orderid]
from customers c inner join orders o
on o.customerid=c.customerid
union
select 2 as tag,
... Read more »
Below is script you can use to get scheduled records:
-- Table you requre to hold schedule time and other information
-- you can add other columns too to suite your requirements.
-- Main columns are scheduletype : it hold information if schedule is daily, weekly or monthly
-- Scheduletime : Time when you need to send report
-- Scheduleday : Day of week or month you want to fire report
-- for week Sunday holds value 1, monday 2, ... saturday equal 7 and repeat for next week from 1 to 7
-- for month value for scheduleday is for day of month means 1 is 1st day of month
-- for daily its value doesn't matter
-- other columns are just dependent on requirement
create table #scheduletable
(
reportname varchar(100),
scheduletime time,
scheduletype varchar(10),
scheduledate date,
scheduleday int,
userid int
)
--Note: I am using temporary table. Use table ac
... Read more »
IE11 ssrs report viewer OR report viewer internet explorer 11
If you are doing this in ASP.net. Then add ASP NET Folder App_Browser. Then add Browser File and replace all text with text below or download file attached below:
<browsers><browserid="IE11Preview"parentID="Mozilla"><identification><userAgentmatch=... Read more »