RTF2PDF - Reporting C# Sample |
[Top] [Chapter] [Previous] [Next] |
The principle is very similar when using our product the RTF2PDF TextDynamic Server.
Here this feature is used best with the token conversion or complete and tested templates. You can use TextDynamic to create and edit such templates.
using wPDF; using WPDynamic;
private void ConvertTest_Click(object sender, System.EventArgs e) { // Set License with Reportion Option rtF2PDF2.SetLicense( "---", "---", 0);
// Load a File rtF2PDF2.Memo.LoadFromFile(@"c:\Template_With_Tokens.RTF", false, "");
// Use the Token To Template Conversion rtF2PDF2.Memo.TextCommandStr(17,0, "");
// Create the Report (will be in Memo2) rtF2PDF2.Report.CreateReport();
// Set Output Filename rtF2PDF2.FileName = @"c:\test.pdf";
// And convert Memo2 to PDF rtF2PDF2.PrintSecond(); }
We are also using this event to loop each group 10 times:
private void rtF2PDF2_OnReportState(object Sender, string Name, int State, WPDynamic.IWPReportBand Band, ref bool Abort) { if (State==0) Abort = Band.Count>10; } |