July 3, 2008 at 12:42 am
hii
when i prepaare a report , at the time the report is genarated i want that the report shud be 1 page report only.
that means if the actual report wud display in say 2 pages then at the time of report generation it has to display 1st page of that report only, and the rest of the data(i.e. 2nd page here) for report wud be truncated.
i hope u r getting wat my requirement is:i generate a single page rpeort n trunacte the rest of the data...
Thanx
Supriya
July 4, 2008 at 1:32 am
Hi
Not sure it makes much sense to me to simply truncate data just because it goes over to a second page, however, that's probably none of my business! I would say that the only way to achieve this is to do a manual count of the number of D/B rows you can fit onto a single page, then add a filter to your report table to select a TOP N equal to that number of rows.
If your row size is variable then this is going to be very difficult, I cannot think of a way to limit the report to a single page using a property.
Good luck,
Nigel West
UK
July 4, 2008 at 4:18 am
Yes, TOP N will be the best options.
First try to figure out how many rows are fitting on your first page. After that you will get the perfect top N number to put in your query
Wish u all the best
Sandip
July 4, 2008 at 4:42 am
hii
Thanx for the reply.
In my case, the row size is dynamic and thus the table size cannot be based on number of rows.
The row data is very much dynamic in nature.
It seems there is no way out.....
Before displaying the report to user , is there any way to delete/remove other pages(pages other than first page)?????
Thanx
-Supriya
July 4, 2008 at 7:32 am
Sounds like a strange request to me, but you could try this:
In the Code window, add the following:
Dim FirstPage = False
Sub StorePage( PageNumber as String )
If PageNumber = "1" Then
FirstPage = True
Else
FirstPage = False
End if
End Sub
In your header, create a text box, and put in the code (value) =Code.StorePage(Globals!PageNumber). This'll persist the page info so you can access it in the body of the report.
On your report object (table? Matrix?), try setting the "Hidden" for each cell to something like:
=Iif( Code.FirstPage, False, True)
If that doesn't work, I'd try setting it in the filter for control.
I haven't tested this yet and there's probably a syntax error in the code, but this should give you some ideas. Please report back if you find a solution.
Good luck.
July 4, 2008 at 9:49 am
Hello Dave
Great bit of code that! Actually there was another entry in the last ten days on this forum that would benefit from that code.
I'm trying to find it and will point them in the same direction, thanks for that, even though I'm not the originator of this one.
Regards,
Nigel West
UK
July 7, 2008 at 1:41 am
Thanx for ur reply Dave
The thing is : I was trying to do this and i think the method you have specified will do is:
It will navigate to other pages as well but would show them blank.
I don't want it do be done that way.
What i have done uptil now is:
i get the page number and able to access it.
i have set the hidden property to true if page number is gretaer than 1.
But the thing is that user gets to see a blank page now whereas it should not be shown.
i hope u r getting my point.
is there a way to do that: if page number is anything other than 1 then user should not be able to migrate to the other pages.The user has to always remain on page 1.
Thanx a lot for all ur replies.
Supriya
July 7, 2008 at 2:16 am
hi
i m not able to set the visibility of table control based on page number 🙁
-Supriya
July 7, 2008 at 7:49 am
I'd concentrate on controling either the visibility of the rows (cells) or trying to filter the data (less likely to work).
NB. If you're still stuck, post a sample. Perhaps there's a totally different approach that might work.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply