Click here to Skip to main content
11,494,943 members (36,465 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET3.5 C#
Hello,

My data, It's not displaying in crystal report,when i use AttachDbFileName=|DataDirectory|\Abc.mdf in app.config.

I am using .\SQLEXPRESS with AttachDbFileName=|DataDirectory|\Abc.mdf in app.config.
It's showing error of Logon Failed with only crystal report.

Every thing is perfect, but i having problem with crystal report only.

Please help me.

Thanks in Advance.
Ankit Agarwal
Software Engineer
Posted 26-Dec-12 18:25pm
Comments
Krunal Rohit at 26-Dec-12 23:35pm
   
your code?
ankit.agg1984 at 26-Dec-12 23:43pm
   


it's my coonection string.

I am exporting crystal report to pdf,but my database's data it's not display in pdf, I have design crystal report with datasource.

SQPDF cr = new SQPDF();\\ SQPDF it's my crystal report name.

public void ExportToPdf()
{
try
{

cr.SetDatabaseLogon("", "", @".\SQLEXPRESS", "ABC");
ExportOptions CrExportOptions;
DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
PdfRtfWordFormatOptions CrFormatTypeOption = new PdfRtfWordFormatOptions();
CrDiskFileDestinationOptions.DiskFileName = "C:\\"+CustomerDetails+".pdf";
CrExportOptions = cr.ExportOptions;
{
CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
CrExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
CrExportOptions.ExportDestinationOptions = CrDiskFileDestinationOptions;
CrExportOptions.ExportFormatOptions = CrFormatTypeOption;
}
cr.Export();
MessageBox.Show("Your Data Successfully Export");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
ankit.agg1984 at 27-Dec-12 0:55am
   
hello,

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

  Print Answers RSS
0 Dnyaneshwar@Pune 692
1 CHill60 318
2 Sascha Lefèvre 280
3 Sergey Alexandrovich Kryukov 245
4 Nakul Chaudhari 236
0 Sergey Alexandrovich Kryukov 10,307
1 OriginalGriff 8,821
2 Sascha Lefèvre 3,889
3 Maciej Los 3,412
4 Richard Deeming 2,560


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 26 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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