Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report re-prompts for parameter values in ASP.NET

Status
Not open for further replies.

lestrope

Programmer
Oct 10, 2006
14
0
0
US
I have a solution that reads from a database and sets a cookie with the parameter values for the report. I can successfully pass this information to the report and display it.

However, if I click on the plus sign to expand the catagory for the group on the left I get re-prompted to enter the parameters.

This report does contain a sub-report. I'm also setting all the parameters and calling the Databind() in the page load method.

I'm wondering if:
- This could be because they are dynamic parameters and not static?
- Is this because I set the paramets in the page load but the report refreshes and the page doesn't technically reload. Should I be setting these parameters somewhere else?
- Should I create an instance of the report in my code as opposed to setting the bindings in the properties of the crystal viewer?
- Anyone ran into this and found a solution?


 
I set this up to not prompt for parameters and it now tells me I am missing parameters when I go to drill down the group. Why is this?

Shouldn't they be set? If I am passing them and binding them to the report viewer, shouldn't it remember these parameters?

Do I need to add the code that sets the parameters to an event?
 
I guess report is refreshing. So it is asking for the parmeter values again.

-SN
 
I found the solution to this.

Instead of setting parameters and calling DataBind() in the Page_Load handler, it should be done in the Page_Init().

Simply cutting and pasting the code from one to the other made this work.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top