Showing posts with label depending. Show all posts
Showing posts with label depending. Show all posts

Friday, March 30, 2012

Parameter problem

HI, I have a report that users select a parameter value from a dropdownbox.

I want to be able to limit the number of parameter options depending on who is logged in.

user A can only see values 'ABC', 'DSC', 'BHT''

whereas user B can see values 'MKP','NHJ','BLP'

is this possible? if so how?

TIA

Reporting services provides the "User!UserID" global parameter in all its reports. This populates with the windows user name if I'm not mistaken. You could pass this value as a parameter to the dataset that you're using to populate the dropdown box.|||If the datasource is driven by a view or a stored procedure or a query you can implement row-level security using a mapping table which locks ( locks up down the appropiate values which should not be seen by some people. If you have a static list, this would be too hard to implement / impossible (Nothing is impossible, impossible just takes longer :-) )

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

I was hoping to be able to use custom code to populate the parameter dropdownlist/ set the parameter values.

Is this possible? can I reference datasets in my code?

|||

I created a view then set a filter on the dataset to return values based on the User!UserID=UserName field from dataset

then set the parameter to 'From Query' chose the dataset and appropriate field from dataset and everything aok.

|||Welcome to rowlevel security :-)|||

I am trying to do the something similar. In my report i created a stored procedure that stored procedure is passed a parameter CaseNumber. (I am using the Report Veiwer Control in Remote Mode). In Report Designer, I created to datasets the first dataset populates the dropdown list box and it is displayed in the toolbar. The Second dataset takes this parameter (CaseNumber) and brings back the report. Everything works fine in the Report Manager; however, when I run it from frmReport.aspx page the report does not show.

If I run the report without any parameters from the frmReport.aspx page (still using the stored procedure w/o using parameters) the report shows. Can any body help me with this.

Zachary

|||

Fixed the problem - thanks

Zachary

Saturday, February 25, 2012

Pagebreak for long texts in a textbox

Hi
I got a report than can grow depending on what information it gets.
My problem is that When I have a large text for a textbox.
Example of the problem:
I have a few textgroups thats gonna be printed out on a pdf. On page 1
we start of with some adresses and stuff and in the middle of the page
its gonna print out a description. The problem is that this description
for this particular case takes up roughly 75% of a A4-page. this means
that on Page 1 the header 'description' prints in the middle of the
page, then it jumps to Page 2 and prints out the text for
'description'. This leaves half of Page 1 blank, which isnt really good
looking. How do I get RS to start filling page 1 with the text, and
then put in a pagebreak in the middle and move the rest of the text
that didnt fit in onto page 2?
And if it can sence so it doesnt break in the middle of a word that
would be nice too :)
Its a ordinary textbox that gets it values from a SQL server.
Hope anyone understood my problem and has a good solution
Regards
Peter Berglundforgot to mention..its RS2000 we use .. :)

Monday, February 20, 2012

Page number information available in report body

Hi Group,
How can I get the page number while in report body ? I need to show/hide
some controls, depending on the page number.
Any solution is welcome !
Thank you,
CataOn Apr 10, 3:46 pm, "Catalin Magher" <cmag...@.era-environmental.com>
wrote:
> Hi Group,
> How can I get the page number while in report body ? I need to show/hide
> some controls, depending on the page number.
> Any solution is welcome !
> Thank you,
> Cata
Normally, to use Globals!PageNumber, you have to be in the Page Header/
Footer. That said, this link might provide you a work around:
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/2eee17d147fb5603/dda039e65c969ce2?lnk=st&q=get+page+number+in+report+body+reporting+services&rnum=1#dda039e65c969ce2
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||This is an older post, but I tried to find a solution in the forum and
found many with the same unanswered question.
This is how I worked the problem. What you are doing is having the
Report call the global function and pass to a string and then you are
calling the function return str and inserting into the textbox!
Add the following code to the Report properties (main menu
REPORT>Report Properities > Code )
Public Function PageNumber()
Dim str as String
str = me.Report.Globals!PageNumber.ToString()
Return str
End Function
Public Function TotalPages()
Dim str as String
str = me.Report.Globals!TotalPages.ToString()
Return str
End Function
Now add the following function calls to empty textboxes
=Code.PageNumber
=Code.TotalPages