Y a-t-il des fonctions disponibles dans Crystal Report (C# .net) pour changer la police dans une autre langue? si non, comment convertir un rapport de cristal au format pdf?Conversion de Crystal au format PDF
-1
A
Répondre
0
foreach (ReportObject objReport in rpt.ReportDefinition.Sections["Section3"].ReportObjects)
{
FieldObject objField = (FieldObject)objReport;
objField.ApplyFont(new Font("Arial", 8.25F, FontStyle.Italic, GraphicsUnit.Point, ((byte)(0))));
}
Pour PDF, voir ci-dessous:
1
protected void Page_Load(object sender, EventArgs e)
{
ExportOptions objExOpt;
CrystalReportViewer1.ReportSource = (object)getReportDocument();
CrystalReportViewer1.DataBind();
// Get the report document
ReportDocument repDoc = getReportDocument();
repDoc.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
repDoc.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
DiskFileDestinationOptions objDiskOpt = new DiskFileDestinationOptions();
objDiskOpt.DiskFileName = @"c:\crystal report\TFA.pdf";
repDoc.ExportOptions.DestinationOptions = objDiskOpt;
repDoc.Export();
}
private ReportDocument getReportDocument()
{
// File Path for Crystal Report
string repFilePath = Server.MapPath("~/CrystalReport1.rpt");
// Declare a new Crystal Report Document object
// and the report file into the report document
ReportDocument repDoc = new ReportDocument();
repDoc.Load(repFilePath);
// Set the datasource by getting the dataset from business
// layer and
// In our case business layer is getCustomerData function
return repDoc;
}
0
ReportDocument reportobj = //Add code to return valid report document from a crystal report
if (reportobj != null)
{
//Export to PDF
((ReportDocument)reportobj).ExportToDisk(ExportFormatType.PortableDocFormat, file);
//Open using default app for PDF docs
if (System.IO.File.Exists(file))
System.Diagnostics.Process.Start(file);
}
-2
Pour convertir le rapport en cristal au format PDF, vous pouvez essayer les bibliothèques PDF qui seront cristal imprimé rapport au fichier pdf.
Questions connexes
- 1. Conversion d'une Grille Voir au format PDF
- 2. HTML Table wraps lors de la conversion au format PDF
- 3. Conversion de documents/pages générés en JavaScript au format PDF
- 4. Exportation de page ASP.Net au format pdf
- 5. Crystal Rapport au format Excel
- 6. conversion formulaire HTML au format PDF en asp classique
- 7. conversion automatique des formulaires InfoPath au format PDF
- 8. PDF au format XPS Conversion via Microsoft XPS Document Writer
- 9. Conversion d'un fichier Adobe PDF au format JPEG
- 10. Suivi au format PDF
- 11. format rtf au pdf
- 12. Crystal Rapport enregistrement direct au format PDF, au lieu de voir
- 13. Conversion de fichiers HTML en format PDF
- 14. Conversion au format matlab
- 15. Conversion de HTML au format MSWord-Readable
- 16. Crystal Report Fonction de conversion des secondes en format Timespan
- 17. images enregistrement au format PDF sharepoint
- 18. Images non reproduites lors de la conversion d'un blob du format HTML au format PDF
- 19. Remplacer le texte au format PDF
- 20. Export DataWindow au format PDF
- 21. Ecriture HTML au format PDF
- 22. javascript jsgantt au format PDF
- 23. Placer l'image au format PDF
- 24. itextsharp PostScript au format PDF
- 25. page HTML au format PDF
- 26. Dessin au format PDF existant
- 27. Java Image au format PDF
- 28. WPF: fluxdocument au format PDF
- 29. Conversion du format XML au format JSON
- 30. ASP.NET + C# - Exportation de Crystal Report au format PDF - Erreur + mise à niveau nécessaire?
merci brij ... je l'ai essayé –