?
Solved

Crystal Reports in ASP.net - add parameter, wants username and password

Posted on 2011-09-12
5
Medium Priority
?
514 Views
Last Modified: 2012-05-12
Hi

I have setup access to Crystal Reports on the web via asp.net, and all seems to work fine

However, as soon as I add a parameter (code below), it asks for a username and password, which is driving me mad!

 
<Report FileName="InvoiceSummary.rpt">
				<parameters>
					<CR:ControlParameter ControlID="HiddenField" ConvertEmptyStringToNull="False" 
						DefaultValue="" Name="InternalInvoiceNum" PropertyName="Value" ReportName=""></CR:ControlParameter>
				</parameters>            
            </Report>

Open in new window


Why does adding a parameter mean needing to enter a username and password ? I have set it as integrated security in IIS but still no joy

Please help!

Thanks
0
Comment
Question by:seancurt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 2000 total points
ID: 36522221
0
 

Author Comment

by:seancurt
ID: 36522316
Hi

Thanks for that, but doesn't work for me. I now get "Database Logon Failed"

If I run it in Visual Studio on my machine, it works fine. If I put it remotely through IIS, it asks for the info or fails like the above.

I see that there is extra coding in the code behind, however I don't have one. All I have is below

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" 
        AutoDataBind="True" GroupTreeImagesFolderUrl="" Height="1269px" 
        ReportSourceID="CrystalReportSource" ToolbarImagesFolderUrl="" 
        ToolPanelWidth="200px" Width="1082px"  ></CR:CrystalReportViewer>

    <CR:CrystalReportSource ID="CrystalReportSource" runat="server" >
        <Report FileName="InvoiceSummary.rpt">
            <parameters>
                <CR:Parameter Name="UserName" DefaultValue = "globe" />
                <CR:ControlParameter ControlID="HiddenField" ConvertEmptyStringToNull="False" 
                DefaultValue="" Name="InternalInvoiceNum" PropertyName="Value" ReportName=""></CR:ControlParameter>
            </parameters>
        </Report>
    </CR:CrystalReportSource>

Open in new window



As it works locally, but not remotely it seems that it is permissions related. But I have tried anonymous access (using admin logon), integrated (i am an admin) and both, but still no good
0
 
LVL 3

Expert Comment

by:samsymon
ID: 36522449
I think it is not because of the parameter,but how you access the data from the data base.
Which method you used to display the report Push or Pull method.

Are you doing any sub report.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 36522772
Where does the report pull its parameter from?

Is the report saved with data?

If you run without using the parameter are you prompted for a value?

Did you give EVERYONE permissions to the database?

Generally Crystal run from a server is run under a system login in not the user running the report.

mlmcc
0
 

Author Closing Comment

by:seancurt
ID: 36523434
Hi

The first solution was ok, i just had understand it !

I created an empty viewer. Then take their code and so the report and params is loaded in in the codebehind

Thanks for your help
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question