|
-
Apr 8th, 2011, 12:00 PM
#1
Thread Starter
Hyperactive Member
View crystal report in pop-up page
I used code below to open crystalreportviewer.
I works fine at the same brower but not working in pop-up page.
At pop-up page it prompts for SQL server login name and password.
How solve this problem?
Dim rpt As New ReportDocument
rpt.Load(Server.MapPath(ReportName))
rpt.SetDatabaseLogon("sa", "password")
rpt.SetDataSource(myDataset.Tables(0))
-
Apr 9th, 2011, 08:06 AM
#2
Re: View crystal report in pop-up page
Hello,
Can you show the code that you are using to bring up the pop-up?
Gary
-
Apr 11th, 2011, 08:31 AM
#3
Thread Starter
Hyperactive Member
Re: View crystal report in pop-up page
In default.aspx page, there is a button called "Lab", on button click I added code below to open Reportview.aspx:
Me.ClientScript.RegisterStartupScript(Me.GetType(), "OpenReport", "<script language=javascript>window.open('Reportview.aspx?FLAG=Lab','Report');</script>")
At page_init sub, I added code at previous post to pass SQL server account and password.
If I do not use pop-up to open Reportview.aspx, it works fine but using pop-up will prompt for SQL account and password.
-
Apr 19th, 2011, 01:54 AM
#4
Re: View crystal report in pop-up page
So, to be clear, in the page_init event of the ReportView.aspx, you have the code to set the password, or this is in the Default.aspx page_init event?
Gary
-
Apr 19th, 2011, 07:39 AM
#5
Thread Starter
Hyperactive Member
Re: View crystal report in pop-up page
At page_load of reportview.aspx I have code to set password.
-
Apr 20th, 2011, 01:17 AM
#6
Re: View crystal report in pop-up page
Hello,
So during the debug cycle, do you see the line of code to set the password being hit, before you get prompted for the username and password? If not, you might need to move that code earlier in the page life cycle.
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|