Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Friday, March 30, 2012

How to get total page count for individual groups

Hello,

I have report in which I have created groups base on the customer name. Can anybody please tell me how to get the total page counts for the individual group? I have page break after every new group and I am able to reset page count to 1 when new group start but I am getting the total number of pages for a particular group.

For ex, let say I have 4 groups, 1 group has 3 page, 2 group has 2 pages and 3 group has 6 page and 4th group has 7 pages I need something like,

For 1st group

'Page 1 of 3’ when user click next page it should be 'Page 2 of 3' etc

Similarly for other groups as wll.

Thanks!

Hello,

Brian Welcker has a blog post that covers this:

http://blogs.msdn.com/bwelcker/archive/2005/05/19/420046.aspx

but you will want to modify his code slightly to use a hash table as he notes at the end.

Let me know if you need assistance implementing this solution or if this doesn't solve your issue.

Larry

|||

Hi Larry,

Thanks a lot for the reply.

I am able to implement the code but I am not able to get the total page count for the individual group.

Let say there are total 15 Pages in the report and there are 3 groups with page break then I need something like

For Group 1 paging would be -> Page 1 of 3, Page 2 of 3.....etc

For Group 1 paging would be -> Page 1 of 5, Page 2 of 5, Page 3 of 5...etc

For Group 1 paging would be -> Page 1 of 7

Currently I am getting like

Group 1 - Page1 of 15, Page 2 of 15...ect

Group 2 - Page 1 of 15, Page 2 of 15..etc

Group 3 - Page 1 of 15, Page 2 of 15..etc

Thanks

|||

I see. I didn't fully read your original post. Take a look at the following thread:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1807270&SiteID=1

where Lisa posts a method of doing what you want. It requires some external code as the pages in a report are rendered in a single pass and it would require two passes (one to count and one to update) to accomplish what you are wanting.

Larry

Wednesday, March 21, 2012

How to get Summary of Page Totals

Hi,

Does anyone know a way to get the summary of all the page totals
at the end of the report.

The page totals for each page can be printed,
by using a shared variable and adding it while printing details and
by reseting it in the page footer. but the problem is to get all the
page totals at the end of the report.

Does anyone have an idea how to do this?Refer this
http://www.dev-archive.com/forum/showthread.php?t=366673

Monday, March 12, 2012

How to get rid of Ghost Pages

For those of you who may not have heard of ghost pages, when SQL Server
deletes all the rows in a data page, it doesn't re-use it untill a seperate
process cleans up such pages. These pages are called ghost pages.
I have a SQL7 production database where the process to clean up the ghost
pages is not waking up. I just read some where that there is a trace that ca
n
be turned on in order to stop this process from waking up. Can someone pleas
e
tell me what the trace number is that I can turn off?
Here are some more details... I have a table in production that is used as
"scratch pad" and therefore encounters a lot of inserts/deletes. The table a
t
any given time will have a couple of rows to may be a couple of hundred rows
.
Over time, the number of ghost pages increase and the SQLs doing joins
against this table treat it as if it has a lot of rows and as a result, the
underlying query plan changes and causes the SQLs to run for a long time.
Here is the interesting part... I noticed at one point there were only a
couple of rows in the table and the number of data pages showing up in DBCC
SHOWCONTIG output where in hundreds and the extent fragmentation was very
high. Also, in some cases, every data page was in a different extent even
though the table only had a couple of rows. When I created a clustered index
and droped the index, the ghost pages disappeared and made a day and night
difference in performance. When I left the clustered index on the table, the
ghost pages eventually appeared again. From that point onwards, when I
dropped and re-created the clustered index, the ghost pages disappeared one
more time and the underlying SQLs started running much faster again.
Does anyone know of a permenant fix to this?
Thanks.
AdamCan you post the list of trace flags that you have on?
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstor...ne/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Adam" <Adam@.discussions.microsoft.com> wrote in message
news:6DB63A27-CBE7-49E3-9AD7-B61C1BD49C53@.microsoft.com...
> For those of you who may not have heard of ghost pages, when SQL Server
> deletes all the rows in a data page, it doesn't re-use it untill a
> seperate
> process cleans up such pages. These pages are called ghost pages.
> I have a SQL7 production database where the process to clean up the ghost
> pages is not waking up. I just read some where that there is a trace that
> can
> be turned on in order to stop this process from waking up. Can someone
> please
> tell me what the trace number is that I can turn off?
> Here are some more details... I have a table in production that is used
> as
> "scratch pad" and therefore encounters a lot of inserts/deletes. The table
> at
> any given time will have a couple of rows to may be a couple of hundred
> rows.
> Over time, the number of ghost pages increase and the SQLs doing joins
> against this table treat it as if it has a lot of rows and as a result,
> the
> underlying query plan changes and causes the SQLs to run for a long time.
> Here is the interesting part... I noticed at one point there were only a
> couple of rows in the table and the number of data pages showing up in
> DBCC
> SHOWCONTIG output where in hundreds and the extent fragmentation was very
> high. Also, in some cases, every data page was in a different extent even
> though the table only had a couple of rows. When I created a clustered
> index
> and droped the index, the ghost pages disappeared and made a day and night
> difference in performance. When I left the clustered index on the table,
> the
> ghost pages eventually appeared again. From that point onwards, when I
> dropped and re-created the clustered index, the ghost pages disappeared
> one
> more time and the underlying SQLs started running much faster again.
> Does anyone know of a permenant fix to this?
> Thanks.
> Adam

How to get rid of Ghost Pages

For those of you who may not have heard of ghost pages, when SQL Server
deletes all the rows in a data page, it doesn't re-use it untill a seperate
process cleans up such pages. These pages are called ghost pages.
I have a SQL7 production database where the process to clean up the ghost
pages is not waking up. I just read some where that there is a trace that can
be turned on in order to stop this process from waking up. Can someone please
tell me what the trace number is that I can turn off?
Here are some more details... I have a table in production that is used as
"scratch pad" and therefore encounters a lot of inserts/deletes. The table at
any given time will have a couple of rows to may be a couple of hundred rows.
Over time, the number of ghost pages increase and the SQLs doing joins
against this table treat it as if it has a lot of rows and as a result, the
underlying query plan changes and causes the SQLs to run for a long time.
Here is the interesting part... I noticed at one point there were only a
couple of rows in the table and the number of data pages showing up in DBCC
SHOWCONTIG output where in hundreds and the extent fragmentation was very
high. Also, in some cases, every data page was in a different extent even
though the table only had a couple of rows. When I created a clustered index
and droped the index, the ghost pages disappeared and made a day and night
difference in performance. When I left the clustered index on the table, the
ghost pages eventually appeared again. From that point onwards, when I
dropped and re-created the clustered index, the ghost pages disappeared one
more time and the underlying SQLs started running much faster again.
Does anyone know of a permenant fix to this?
Thanks.
Adam
Can you post the list of trace flags that you have on?
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstorageengine/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Adam" <Adam@.discussions.microsoft.com> wrote in message
news:6DB63A27-CBE7-49E3-9AD7-B61C1BD49C53@.microsoft.com...
> For those of you who may not have heard of ghost pages, when SQL Server
> deletes all the rows in a data page, it doesn't re-use it untill a
> seperate
> process cleans up such pages. These pages are called ghost pages.
> I have a SQL7 production database where the process to clean up the ghost
> pages is not waking up. I just read some where that there is a trace that
> can
> be turned on in order to stop this process from waking up. Can someone
> please
> tell me what the trace number is that I can turn off?
> Here are some more details... I have a table in production that is used
> as
> "scratch pad" and therefore encounters a lot of inserts/deletes. The table
> at
> any given time will have a couple of rows to may be a couple of hundred
> rows.
> Over time, the number of ghost pages increase and the SQLs doing joins
> against this table treat it as if it has a lot of rows and as a result,
> the
> underlying query plan changes and causes the SQLs to run for a long time.
> Here is the interesting part... I noticed at one point there were only a
> couple of rows in the table and the number of data pages showing up in
> DBCC
> SHOWCONTIG output where in hundreds and the extent fragmentation was very
> high. Also, in some cases, every data page was in a different extent even
> though the table only had a couple of rows. When I created a clustered
> index
> and droped the index, the ghost pages disappeared and made a day and night
> difference in performance. When I left the clustered index on the table,
> the
> ghost pages eventually appeared again. From that point onwards, when I
> dropped and re-created the clustered index, the ghost pages disappeared
> one
> more time and the underlying SQLs started running much faster again.
> Does anyone know of a permenant fix to this?
> Thanks.
> Adam

Wednesday, March 7, 2012

How to get number of pages per group

I am creating an invoice print using Reporting Services and have
managed to figure out how to reset the Page number for each group
change.
Now, I need to figure out how many pages will print for each group
change. The report is rendered for many invoices (each invoice is a
group change) and each invoice may or may not have multiple pages.
I need to hide the page footer until the last page of the invoice.
Any ideas on how to do that?
Thanks!can't you adapt your sql query ? add an extra field (that uses a count by
grouping). And add that count field in your group footer...
just a mind spinning ;)
"Sher" wrote:
> I am creating an invoice print using Reporting Services and have
> managed to figure out how to reset the Page number for each group
> change.
> Now, I need to figure out how many pages will print for each group
> change. The report is rendered for many invoices (each invoice is a
> group change) and each invoice may or may not have multiple pages.
> I need to hide the page footer until the last page of the invoice.
> Any ideas on how to do that?
> Thanks!
>|||can't you adapt your sql query ? add an extra field (that uses a count by
grouping). And add that count field in your group footer...
just a mind spinning ;)
"Sher" wrote:
> I am creating an invoice print using Reporting Services and have
> managed to figure out how to reset the Page number for each group
> change.
> Now, I need to figure out how many pages will print for each group
> change. The report is rendered for many invoices (each invoice is a
> group change) and each invoice may or may not have multiple pages.
> I need to hide the page footer until the last page of the invoice.
> Any ideas on how to do that?
> Thanks!
>

How to get non-html format data to open in a new window

I am totally new to reporting services and am struggling with how to
accomplish something. I have an aspx page that needs to display the
html format version of a report on the bottom portion of the page and
then provide a drop down list from which the user can select another
format and an export button. When the user clicks a new format (pdf,
csv, etc) and then the export button, I need for the report to pop open
in a new window. I have succeeded in getting the report to come out on
the bottom part of the page but have no idea how to get the other
formats to pop open in a new page. I am coding in vb - can someone
point me in the right direction.You could use window.open(URL) method to open in a new window
"lisa.bogart@.eds.com" wrote:
> I am totally new to reporting services and am struggling with how to
> accomplish something. I have an aspx page that needs to display the
> html format version of a report on the bottom portion of the page and
> then provide a drop down list from which the user can select another
> format and an export button. When the user clicks a new format (pdf,
> csv, etc) and then the export button, I need for the report to pop open
> in a new window. I have succeeded in getting the report to come out on
> the bottom part of the page but have no idea how to get the other
> formats to pop open in a new page. I am coding in vb - can someone
> point me in the right direction.
>