Click here to Skip to main content
15,918,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm creating .pdf reports with c # in fastreport.Then I'm trying to set the document properties in the report. In FastReport, these properties have both set and get properties, but these features are not assigned to the report that I saved.



Before saving the report as .pdf, FastReport can open its own form and enter the relevant topic, title and author data here, but I do not want the user to enter this process every time. I want to set these properties programmatically with c #.

How can I do this?

What I have tried:

public Report_Test()
{
 FastReport.Report report1 = new FastReport.Report();
 report1.ReportInfo.Author = "Test Test";
 report1.ReportInfo.Description = "TEST Report";
 report1.ReportInfo.Created = DateTime.Now;
 report1.ReportInfo.CreatorVersion = "1.1";
 report1.ReportInfo.Modified = DateTime.Now;
 report1.ReportInfo.Name = "1.1";
 report1.ReportInfo.Version = "1.1";

 /*
 I wrote other codes here ()
 */
 report1.RegisterData(dataSet11.Tables["Datas"], "Datas");
 report1.GetDataSource("Datas").Enabled = true;
 (report1.Report.FindObject("Data1") as FastReport.DataBand).DataSource = 
 report1.GetDataSource("Datas");
}
Posted
Updated 22-Apr-19 2:28am
Comments
Richard MacCutchan 22-Apr-19 4:38am    
What happens when you run this code? What does the Fastreport documentation say?
CengBrothers 22-Apr-19 4:47am    
Open any one .pdf. Then right-click and enter Document Properties. There is the explanation tab. I want to print the author, title, and other data with c #. The above code needs to do this, but the report doesn't write the data I set, it looks blank

1 solution

You're asking about functionality specific to a vendor library. The best place to ask this is in the Support forums supplied by that vendor for their product. Support - Fast Reports Inc.[^]
 
Share this answer
 
Comments
Maciej Los 23-Apr-19 14:59pm    
5ed!

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900