List Info

Thread: crystal report




crystal report
country flaguser name
United States
2007-09-28 21:16:49


Hello dear Friends
I want to make a Report in Asp.Net
I made a report that its name is RepMain and use below code.but I have login error.please help me.
thanks

try
{


SqlConnection crysCon=new SqlConnection(ConfigurationSettings.AppSettings["strCon"]);
DataTable dtbl = new DataTable();
string st="select * from Main";
SqlDataAdapter MainDA=new SqlDataAdapter(st,strCon);
MainDA.Fill(dtbl);
DataSet MainDS=new DataSet();
MainDS.Tables.Add();

RepMain rpm= new RepMain();
rpm.SetDataSource(MainDS);
foreach(CrystalDecisions.CrystalReports.Engine.Table Main in rpm.Database.Tables)
{
myLogin = Main.LogOnInfo;
myLogin.ConnectionInfo.Password = "";
myLogin.ConnectionInfo.UserID = "";
Main.ApplyLogOnInfo(myLogin);
}

RepMainViewer.DisplayGroupTree = false;
RepMainViewer.ReportSource = rpm;

}
catch(Exception ex)
{
errorlbl.Text=ex.Message.ToString();
Response.Write(ex.Message);
}


---------------------------------
Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
Re: crystal report
country flaguser name
United States
2007-09-28 21:34:35

You might need to pass some login credentials to your database.

myLogin.ConnectionInfo.Password = "";
myLogin.ConnectionInfo.UserID = "";

Your code currently passes empty strings.

On 9/28/07, amine akhavan < amine_akhavan%40yahoo.com">amine_akhavanyahoo.com> wrote:
&gt;
>
> Hello dear Friends
> I want to make a Report in Asp.Net
> I made a report that its name is RepMain and use below code.but I have
>; login error.please help me.
> thanks
&gt;
> try
> {
>
>
>; SqlConnection crysCon=new SqlConnection(
> ConfigurationSettings.AppSettings["strCon"]);
> DataTable dtbl = new DataTable();
> string st="select * from Main";
> SqlDataAdapter MainDA=new SqlDataAdapter(st,strCon);
&gt; MainDA.Fill(dtbl);
> DataSet MainDS=new DataSet();
> MainDS.Tables.Add();
>
&gt; RepMain rpm= new RepMain();
> rpm.SetDataSource(MainDS);
&gt; foreach(CrystalDecisions.CrystalReports.Engine.Table Main in
> rpm.Database.Tables)
> {
> myLogin = Main.LogOnInfo;
>; myLogin.ConnectionInfo.Password = "&quot;;
> myLogin.ConnectionInfo.UserID = "&quot;;
> Main.ApplyLogOnInfo(myLogin);
> }
>
> RepMainViewer.DisplayGroupTree = false;
&gt; RepMainViewer.ReportSource = rpm;
>;
> }
> catch(Exception ex)
> {
> errorlbl.Text=ex.Message.ToString();
&gt; Response.Write(ex.Message);
> }
>
>
>;
>
>
>
> ---------------------------------
> Yahoo! oneSearch: Finally, mobile search that gives answers, not web
> links.
&gt;
> [Non-text portions of this message have been removed]
>
>;
>
>
> Yahoo! Groups Links
&gt;
>
>
>;

--
Dean Fiala
Very Practical Software, Inc
Now with Blogging...
http://www.vpsw.com/blogbaby
Microsoft MVP

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )