469,910 Members | 1,444 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,910 developers. It's quick & easy.

crystal report promt for database login => Why?

only my server get the report whitout the dialogue database login.
I think it is where the database is localhost and the crystal report know
not the connection string.

how I can crystal reports say where the database is?
Have anywhere a idee how a can fix this?

thank you

michael schindler

Nov 15 '05 #1
3 22659
Hi Michal,

This is the code I'm using, it works great IF it the datasource is a SQL
server, as we speek( or as I write ;) ) I'm been unable to get the thing
going on a dataset, but it works great on a SQL backend. The thing is that
you have to set the db info using code, when you do that you are ok.

Here is the code basically what you do is set the logon info on all the
tables of the report

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
ConnectionInfo crConnectionInfo = new ConnectionInfo();

crConnectionInfo.ServerName = "127.0.0.1";

crConnectionInfo.DatabaseName = "CTP";

crConnectionInfo.UserID = "test";

crConnectionInfo.Password = "test";

foreach (CrystalDecisions.CrystalReports.Engine.Table table in
reportDocument1.Database.Tables)

{

TableLogOnInfo crTableLogonInfo = new TableLogOnInfo();

crTableLogonInfo.TableName = table.Name;

crTableLogonInfo.ConnectionInfo = crConnectionInfo;

crTableLogonInfos.Add( crTableLogonInfo);

table.ApplyLogOnInfo( crTableLogonInfo);

}

CrystalReportViewer1.LogOnInfo = crTableLogonInfos;

"Michael S" <sc*******@bluewin.ch> wrote in message
news:e3**************@TK2MSFTNGP12.phx.gbl...
only my server get the report whitout the dialogue database login.
I think it is where the database is localhost and the crystal report know
not the connection string.

how I can crystal reports say where the database is?
Have anywhere a idee how a can fix this?

thank you

michael schindler


Nov 15 '05 #2
thank you

i'm very happy.

where i can set the logon info?
You have write on all the tables of the report?
Please can you me that a few explain more in detail?

thanl you

michael schindler

Please my english is very bad but i give my best that you me understand => I
hope :-)


"Ignacio Machin" <ignacio.machin AT dot.state.fl.us> schrieb im Newsbeitrag
news:OR**************@TK2MSFTNGP10.phx.gbl...
Hi Michal,

This is the code I'm using, it works great IF it the datasource is a SQL
server, as we speek( or as I write ;) ) I'm been unable to get the thing
going on a dataset, but it works great on a SQL backend. The thing is that
you have to set the db info using code, when you do that you are ok.

Here is the code basically what you do is set the logon info on all the
tables of the report

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
ConnectionInfo crConnectionInfo = new ConnectionInfo();

crConnectionInfo.ServerName = "127.0.0.1";

crConnectionInfo.DatabaseName = "CTP";

crConnectionInfo.UserID = "test";

crConnectionInfo.Password = "test";

foreach (CrystalDecisions.CrystalReports.Engine.Table table in
reportDocument1.Database.Tables)

{

TableLogOnInfo crTableLogonInfo = new TableLogOnInfo();

crTableLogonInfo.TableName = table.Name;

crTableLogonInfo.ConnectionInfo = crConnectionInfo;

crTableLogonInfos.Add( crTableLogonInfo);

table.ApplyLogOnInfo( crTableLogonInfo);

}

CrystalReportViewer1.LogOnInfo = crTableLogonInfos;

"Michael S" <sc*******@bluewin.ch> wrote in message
news:e3**************@TK2MSFTNGP12.phx.gbl...
only my server get the report whitout the dialogue database login.
I think it is where the database is localhost and the crystal report know not the connection string.

how I can crystal reports say where the database is?
Have anywhere a idee how a can fix this?

thank you

michael schindler



Nov 15 '05 #3
Hi Michael,

I set the logoninfo in the page load handler, before the call to DataBind()

It seems that you have to set the logon info on ALL the tables in the
report ( the code I sent do that ) , you see as far as today I have been
having lot of problems with CR, no matter what I do i'm not been able to run
the report using a dataset as source. and it seems that this is a common
problem with the .net version of CR.

If you have any further problems do not hesitate in post it and I will
answer if I know the solution and never mind in regards of the language, the
english is not my first language neither :)

Pd:
You could get a GOOD knowledge of CR form this link:
http://www.crystalreportsbook.com/

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Michael S" <sc*******@bluewin.ch> wrote in message
news:ev**************@TK2MSFTNGP11.phx.gbl...
thank you

i'm very happy.

where i can set the logon info?
You have write on all the tables of the report?
Please can you me that a few explain more in detail?

thanl you

michael schindler

Please my english is very bad but i give my best that you me understand => I hope :-)


"Ignacio Machin" <ignacio.machin AT dot.state.fl.us> schrieb im Newsbeitrag news:OR**************@TK2MSFTNGP10.phx.gbl...
Hi Michal,

This is the code I'm using, it works great IF it the datasource is a SQL
server, as we speek( or as I write ;) ) I'm been unable to get the thing
going on a dataset, but it works great on a SQL backend. The thing is that you have to set the db info using code, when you do that you are ok.

Here is the code basically what you do is set the logon info on all the
tables of the report

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
ConnectionInfo crConnectionInfo = new ConnectionInfo();

crConnectionInfo.ServerName = "127.0.0.1";

crConnectionInfo.DatabaseName = "CTP";

crConnectionInfo.UserID = "test";

crConnectionInfo.Password = "test";

foreach (CrystalDecisions.CrystalReports.Engine.Table table in
reportDocument1.Database.Tables)

{

TableLogOnInfo crTableLogonInfo = new TableLogOnInfo();

crTableLogonInfo.TableName = table.Name;

crTableLogonInfo.ConnectionInfo = crConnectionInfo;

crTableLogonInfos.Add( crTableLogonInfo);

table.ApplyLogOnInfo( crTableLogonInfo);

}

CrystalReportViewer1.LogOnInfo = crTableLogonInfos;

"Michael S" <sc*******@bluewin.ch> wrote in message
news:e3**************@TK2MSFTNGP12.phx.gbl...
only my server get the report whitout the dialogue database login.
I think it is where the database is localhost and the crystal report

know not the connection string.

how I can crystal reports say where the database is?
Have anywhere a idee how a can fix this?

thank you

michael schindler




Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by codepuller | last post: by
3 posts views Thread by Deasun | last post: by
19 posts views Thread by Michael O'Donnell | last post: by
12 posts views Thread by Murali via DotNetMonster.com | last post: by
reply views Thread by Tumurbaatar S. | last post: by
2 posts views Thread by wassssup | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.