cancel
Showing results for 
Search instead for 
Did you mean: 

ASP.NET C# Schema asking for Password?

Former Member
0 Kudos

I have a crystal report that is on a web page (or rather crystal report viewer to show the report), this report is attached to an XSD file only (I will be using a datatable /dataview later to fill the data to show on the report), when I refresh the page, the crystal report is asking for a login to the Schema.. well this is impossible since the schema has no login at all.

I stepped through the code, the test datatable that is attached as a result for the information that is applied to the schema has 1 record in it like it should. On my test machine running local IIS shows the result but a published version of the site always asks for a database login for the schema.

VS 2005

C# ASP.NET application

SQL 2005 (doesn't matter because I do all the datapull and use dataviews / datatables to fill the results to show)

Windows Server 2003

Crystal Reports XI R2

Is there a piece of the puzzle I am missing at the time I deploy it that I have in the test environment that I am not seeing?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Jonathan,

When you get a database logon prompt like this it normally means the dataset you're creating at runtime does not match the schema that the report was designed with.

The simplest thing to do is write out the dataset to XML with Schema after you fill the dataset. Once you've written out the dataset you can go back to the report in Crystal Reports itself and try to point the report to the XML file directly. If you get any errors this confirms that the dataset does not match what the report is expecting.

Try it, address any differences, and you should be all set.

Sincerely,

Dan Kelleher

Former Member
0 Kudos

Thank you for the suggestions, I will give this a try. My developer machine shows the report with the information, it is the production server that is asking for the login information for the schema, I was expecting the same results on the production as the development environment. Maybe like you are saying, something broke in the data on the production pull vs development pull. I will update the thread as soon as I get a result on this.

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks for this direction, it helped me to solve the problem, marked as very helpful answer What I ended up doing since this is a push model, is go ahead and create a datatable and a dataset manually in code that matched the schema and not rely on VS 2005 to do this for me, then I applied the datatable to the report source and bingo.