473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Crystal Report & Application variable

[sorry if this is the second one you receive]

Hi all,

My web application has Application variables for
connection strings, as they can change often.

Global.asax.cs :

protected void Application_Start(Object sender, EventArgs
e)
{
Application["Server"]=...;
Application["DataBase"]=...;
Application["UserID"]=...;
Application["Password"]=...;
}

I'm discovering Crystal Reports, and try to use these
variables. First docs I read talk about defining a dataset
(xsd format), but this doesn't allow me to use my
Application variables. I read an example who seems to
match my needs, here is the code :

ReportDocument rd = new ReportDocument();
rd.Load (@"myReport.rpt");
int i;
for (i=0; i<=rd.Database.Tables.Count-1; i++)
{
TableLogOnInfo tloi = new TableLogOnInfo ();
tloi.ConnectionInfo.ServerName = Application
["Server"].ToString ();
tloi.ConnectionInfo.DatabaseName = Application
["DataBase"].ToString ();
tloi.ConnectionInfo.UserID = Application
["UserID"].ToString ();
tloi.ConnectionInfo.Password = Application
["Password"].ToString ();
rd.Database.Tables[i].ApplyLogOnInfo (tloi);
}
rd.ExportToDisk (ExportFormatType.PortableDocFormat,
@"myReport.pdf");

This works perfectly fine with an empty report, but
what can I do to get the database's fields on the report,
as I don't have any .xsd file ?

Thanks
Karine

Jul 21 '05 #1
0 1411

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
13
by: kristoff plasun | last post by:
I have a problem with a C++ DCOM application that prints Crystal Reports with data from Oracle. The SQL query is relatively complex but when the report is printed from the Crystal Reports...
0
by: Karine Edhel Proot | last post by:
Hi all, My web application has Application variables for connection strings, as they can change often. Global.asax.cs : protected void Application_Start(Object sender, EventArgs e) {...
1
by: Bari Allen | last post by:
First I'm an almost complete newbie at .NET, as I've only taken some classes, worked through a beginner-level book, and done one minor console application on my own. That being said, I followed...
0
by: Henry | last post by:
Using ideas provided by some of you I was able to figure out how to get the names of the parameters fields of a crystal report specified at run time. The code below just basically puts the...
0
by: Robert Warnestam | last post by:
Hello, I have some problems deploying Crystal Reports. I'm using Visual Studio 2005 Beta 1. In this version Crystal Reports (9.7.3500.0) is included. I created a small test application...
0
by: John Kastrinos | last post by:
Yes, I know this is more of a Crystal group question. I posted there about 2 weeks ago, but no one EVER replies over there. So, I thought I would take a shot here. If anyone has heard of this,...
1
by: riyaz | last post by:
i am new to .net environment, anyone can advise me how to create a crystal report ,how to connect to databse and to display in web page .As i m developing asp.net based web application i want...
1
by: pmkconsulting | last post by:
Hello, I am using an asp script that uses rptserver.asp to display some reports over http. It worked fine previously but now the webpages with the report display just hang. I tried switching from...
0
by: Mark Gold | last post by:
Hi! We have a VB application using Crystal Reports 6 that has worked successfully on hundreds of systems for over 10 years. Now, on one network, the application and access database does not close....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.