1

I am developping a web application by using the ASP .NET MVC 3 framework.

I want to display a Crystal Reports 2011 report in a viewer in one of my view : VIEW-1.
So I have created an ASPX WebForm containing a CrystalReportViewer control.

I want to load VIEW-1 from another view by JavaScript programming.
More precisely I want to display VIEW-1 in a pop-up window.
I will be able to pass a SQL query in the URL.

The HTTP request to load VIEW-1 will be caught by one of my action method.
I will programmatically instantiate and configure a ReportDocument object in the action method.

Then I want to share the ReportDocument object with VIEW-1 before executing it and generating the HTTP response.
The ReportDocument object will be bound to the CrystalReportViewer during the execution of VIEW-1.

I usually share data between a controller and a Razor view by using the ViewData property.
But I have no idea about sharing data between a controller and an ASPX WebForm.
Any help will be really appreciated.

2
  • Why do you need a controller action? What's the benefit of it? Why not directly pointing the popup url to the web form and pass it any arguments it needs to generate the report? Commented Mar 12, 2012 at 16:50
  • I do not plan to do this because I want to implement the logic of getting data and filling a ReportDocument in an action method. Commented Mar 13, 2012 at 8:12

1 Answer 1

1

You can share data using Session variable . But storing so much data in session is not a good idea because session is stored in the server and that will make your server cry if its lot of session data.

you may just pass the querystring values (id's) and then build the data / object in the other part (web forms/ mvc)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.