Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Export without Viewer Post Reply Post New Topic
Author Message
tikotikotako
Newbie
Newbie


Joined: 02 Dec 2010
Online Status: Offline
Posts: 1
Quote tikotikotako Replybullet Topic: Export without Viewer
    Posted: 02 Dec 2010 at 5:44am

I use VS 2008 and I write in C# .NET.

I've to:
1) open a report
(please for the next step consider I don't really know what there is inside),
I use :
ReportDocument rpt = new ReportDocument();
rpt.Load(strPath);

ok?

2) set an database.mdb as source of data,
I've find this way:

rpt.SetDatabaseLogon("", "", "localhost", "C:\\Sample.mdb");

not shure about the parameters. is it correct to write "localhost"?
2b) do I have to pass parameters?
I don't know anything about these.
I know there is the method 
SetParameterValue, but I have to make this step automatically... How can I do it?

3) export in PDF
I've find some code to set export options and the method
Export(crExpOpt)


I've to do all the these things without user interaction and without the Viewer.
Can someone  help me?
Thank you so much.

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 03 Dec 2010 at 4:11am
for your report to be meaningful, there are parameters.  these can be parameters to the report, or parameters the your user entered in the application and then you retrieve the data and pass the data to the report. the latter is what my company does, we build our own wizards, retrieve the data and then pass the results to report which displays.
 
I don't know about exporting, as we have the user decide on that, and while I haven't written the code, I know we send reports straight to the printer without the viewer every being display, so it is possible. I just don't know the code/method off the top of my head.
 
HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.