Click here to Skip to main content
14,665,555 members
Rate this:
Please Sign up or sign in to vote.
See more:
hi. I'm New to Crystal Reports. I'm bit stucked with some problem at the moment. I'm developing a small POS system, for that I'm trying/ testing small stuffs before starting for the thing.
I found a site
Crystal Report Step by Step
this was a very helpful web site for me.
almost every reports works as mentioned in the site.

I started creating a crystal report using a XML file.
it worked perfectly in my developing pc. But when I tried to run the same C# windows application on a different PC it keeps giving me a dialog box asking user name and password for the datatable.

I'm sure I never gave any authentication details to the Application. but everytime i tried to run the application on a differnt pc it prompts the message asking for username and password.

Please Help Me....!

XML file



<product>
<product_id>1
<product_name>Product 1
<product_price>1000

<product>
<product_id>2
<product_name>Product 2
<product_price>2000

<product>
<product_id>3
<product_name>Product 3
<product_price>3000

<product>
<product_id>4
<product_name>Product 4
<product_price>4000



--------------------------------------------------------
Added the XML file as a DataSource File from the Crystal Report Wizard.

---------------------------------------------------------

Form Load Code...!!!

using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

namespace testXML
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load("G:\\Mywork\\testXML\\testXML\\CrystalReport1.rpt");
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();
}
}
}
Posted
Updated 19-Apr-13 20:07pm
v3
Comments
Kschuler 19-Apr-13 16:51pm
   
How are you calling and/or setting up the crystal report in code? Can you click the Improve question link and add that code so that we have more information?
Member 8099391 20-Apr-13 1:53am
   
sir, I followed the steps shown in the following web site..!!
http://csharp.net-informations.com/crystal-reports/csharp-xml-crystal-reports.htm

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Pretty sure your problem is here:
cryRpt.Load("G:\\Mywork\\testXML\\testXML\\CrystalReport1.rpt");


Try this instead:

cryRpt.Load("G:\Mywork\testXML\testXML\CrystalReport1.rpt");
   
Comments
Member 8099391 10-Jul-13 6:33am
   
that didn't work either...!!!
I changed the whole reporting part to RDLC report...!!
now everything works fine...!!
Thank you for your suggestion..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100