We help IT Professionals succeed at work.

REPORT VIEWER IN NEW WINDOW

bsheikh
bsheikh asked
on
Medium Priority
296 Views
Last Modified: 2012-05-05
Hi Experts,

having a report viewer as well as 6 option buttons on form .
as soon as user choose any option itwill display the report.

my problem is
when ever i choose any option.
report viewer is opening in current window .

how can we make reort viewer to open in new window  but not in the window on which we placed the report viewer controler.
regards
bilal
Comment
Watch Question

Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
How are you opening the report?

I assume this is a web application?  You should be able to add code to the line that opens the window to force it to use a new window.

mlmcc

Commented:
bsheikh, I assume that you are developing a window base application.
You could create a new form and place the report viewer on that form. So when display report, call to display that new form and do report binding and display.

dylan

Author

Commented:
This is win based application .

I did what dylan is saying .
but when u put report viewer in new form .  and call it by option button it will always open a report which is defined in cr  report viewer. or other wise  we need a way to forward the report details to other form also . means if i choose option button 2 . it will load the report against that option button. but i dotn know how to pass this or do this .

i have a old application in VB6.
that was doing in 1st way they just put the viewer on the form and still when ever u pick any option it opens report in new window


Regards,
Bilal
Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
What code is used to display the report?

mlmcc
Commented:
bsheikh, to pass report detail to the other form, you could create several properties in your new form and assign value to it upon calling them.

something like:

rptForm = new rptViewerForm
rptForm.ReportName = "sample.rpt"          ' ReportName is a properties you created
rptForm.setPameterValue("p1", "value1")   ' setPameterValue is a function you created
...


dylan

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Commented:
glad I could help~

dylan
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.