Friday, February 24, 2012

Custom Code....

Hey guys I have a problem I am trying to solve using custom code but I am open to other solutions.

Situation: I have multiple reports that the user can see. Example (Move In Corp. report, Move In Region report,Move In Division report, Mid Year Corp. report, Mid Year Region report,Mid Year Division report etc.) I have a stored procedure that returns all the information needed based upon the UserID being passed from the report to the stored procedure.

Goal: When the user logs in I want to be able to foward the user to a specific report based upon their userid (global in RS). I currently have three textboxes(Move In, Mid Year, Year End) with navigation enabled to jump to another report. The report to which the user is passed to is determined by an expression which is something like this for the Move In text box =IIF(Fields!orgtypeid.Value = 1,"Move In Corp","Move In Region"). The orgtypeid.value is returned by the stored procedure. I want to be able to forward the user a specific Move In report (Move In Corp, Move In Region, etc) without having the user select the textbox.

Any suggestions are greatly appreciated.

TTT|||

You can try using subreports.

Make a topmost "switch" report that hosts three subreports and make Hidden value on each subreport an expression that returns true depending on the user type. This will not eliminate execution of all three reports but it will show only one that's needed.
The second step would be to make a switch report such that is executes only the needed report. To do this you will need to wrap each subreport in a separate dataregion (List for example) and make sure that datasets for each data region are built in such a way that only one dataset returns a row, while other two return empty sets.
I have not tried the second step myself, but it might be worth exploring

|||

Thanks for the response the first option is out simply because of performance issues.

This will be a dashboard used by a rather large company. I will look into the second option, in the mean time if anyone else has any other ideas I would welcome them now.

Thanks Alexandre!

No comments:

Post a Comment