Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Friday, March 23, 2012

Number of rows

Hello!

I try to figure out how to change the number of rows at each page, but I'm stuck.

I have no page break , but I get a number of pages when I view my report. Is there any way to set the number of rows shown at each page?

//Cissi

Checking out these two threads might help:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1028484&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=892738&SiteID=1

|||

It works up to about 30 rows at each page, but I don't want any page break at all.
The reason is that I use a report viewer which I have a link to from an asp page. In the report I have a "jump to url", which take a value back to the asp page. When I change page in the report and then jump to the url I get the head of the reportviewer with me like a frame back to the asp page. This only happens when I change page in the report before I jump to the url.

|||I solved the problem by changing the properties for the Report Viewer. I changed AsyncRendering to false. But I still dont know what to do with the row number.

Friday, March 9, 2012

Null View Definition?!?

In QA,
SELECT Table_Name, View_Definition
FROM Information_Schema.Views
Table_Name View_Definition
ThisView CREATE VIEW...
ThatView CREATE VIEW...
OtherView NULL <-- HUH?!?
So I flip over to EM and double-click 'OtherView' and I can see the code in
the property page that appears. What does that mean?
Peace & happy computing,
Mike Labosh, MCSD
"Mr. McKittrick, after very careful consideration, I have
come to the conclusion that this new system SUCKS."
-- General Barringer, "War Games"Mike,
No idea, but try refreshing all views before selecting from
information_schema.views
Example:
use northwind
go
declare @.ts sysname
declare @.tn sysname
declare @.sql nvarchar(4000)
declare views_cursor cursor local fast_forward
for
select
table_schema,
table_name
from
information_schema.tables
where
table_type = 'view'
and objectproperty(object_id(quotename(table
_schema) + N'.' +
quotename(table_name)), 'IsMSShipped') = 0
open views_cursor
while 1 = 1
begin
fetch next from views_cursor into @.ts, @.tn
if @.@.error != 0 or @.@.fetch_status != 0 break
set @.sql = N'exec sp_refreshview ''' + quotename(@.ts) + N'.' +
quotename(@.tn) + ''''
exec sp_executesql @.sql
end
close views_cursor
deallocate views_cursor
go
AMB
"Mike Labosh" wrote:

> In QA,
> SELECT Table_Name, View_Definition
> FROM Information_Schema.Views
> Table_Name View_Definition
> ThisView CREATE VIEW...
> ThatView CREATE VIEW...
> OtherView NULL <-- HUH?!?
> So I flip over to EM and double-click 'OtherView' and I can see the code i
n
> the property page that appears. What does that mean?
> --
> Peace & happy computing,
> Mike Labosh, MCSD
> "Mr. McKittrick, after very careful consideration, I have
> come to the conclusion that this new system SUCKS."
> -- General Barringer, "War Games"
>
>|||> SELECT Table_Name, View_Definition
> FROM Information_Schema.Views
> Table_Name View_Definition
> ThisView CREATE VIEW...
> ThatView CREATE VIEW...
> OtherView NULL <-- HUH?!?
I GOT IT!
Inside Information_Schema.Views, it does this:
-- Displays views accessable to current user
create view INFORMATION_SCHEMA.VIEWS
as
select
db_name() as TABLE_CATALOG
,user_name(obj.uid) as TABLE_SCHEMA
,obj.name as TABLE_NAME
,case
when exists (select *
from syscomments com3
where com3.id = obj.id
and com3.colid > 1) then convert(nvarchar(4000), NULL)
else com.text
end as VIEW_DEFINITION
If the text of the view is greater than 4000 characters, the convert
function returns null.
Rats.
So where does EM get the code from, to display in the View's property page?
Peace & happy computing,
Mike Labosh, MCSD
"Mr. McKittrick, after very careful consideration, I have
come to the conclusion that this new system SUCKS."
-- General Barringer, "War Games"|||What about quering the tables direct without the information_views...
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Mike Labosh" <mlabosh@.hotmail.com> schrieb im Newsbeitrag
news:etaHXDvZFHA.2788@.TK2MSFTNGP12.phx.gbl...
> I GOT IT!
> Inside Information_Schema.Views, it does this:
> -- Displays views accessable to current user
> create view INFORMATION_SCHEMA.VIEWS
> as
> select
> db_name() as TABLE_CATALOG
> ,user_name(obj.uid) as TABLE_SCHEMA
> ,obj.name as TABLE_NAME
> ,case
> when exists (select *
> from syscomments com3
> where com3.id = obj.id
> and com3.colid > 1) then convert(nvarchar(4000), NULL)
> else com.text
> end as VIEW_DEFINITION
>
> If the text of the view is greater than 4000 characters, the convert
> function returns null.
> Rats.
> So where does EM get the code from, to display in the View's property
> page?
> --
> Peace & happy computing,
> Mike Labosh, MCSD
> "Mr. McKittrick, after very careful consideration, I have
> come to the conclusion that this new system SUCKS."
> -- General Barringer, "War Games"
>

Monday, February 20, 2012

Null Parameters IN Preview View

Anyway to pass a null value as the preview and through the URL? I saw some
posts about this, but was unable to discern the answer. Some of the
parameters are optional in the sproc and need to be able to be passed as
NULL.Mark the parameter as nullable in the report. Do not provide a default
value. By doing this, the default value is null. Then for URL access you
simply don't provide a value and it will take the default (null).
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"Michael Solomons" <mikesolo@.optonline.net> wrote in message
news:O%234WTINcEHA.384@.TK2MSFTNGP10.phx.gbl...
> Anyway to pass a null value as the preview and through the URL? I saw
some
> posts about this, but was unable to discern the answer. Some of the
> parameters are optional in the sproc and need to be able to be passed as
> NULL.
>