Create report entirely in code

Stimulsoft Reports.NET discussion
Post Reply
jmiller
Posts: 91
Joined: Mon Sep 20, 2010 12:18 pm

Create report entirely in code

Post by jmiller »

I have a legacy system that creates text files. The text files contain special codes to indicate header/footer blocks. Over time we will be changing our system to newer technology and be able to use Stimulsoft. In the meantime I would like to try and use Stimulsoft to view these legacy text files. Because headers/footers and even page layouts could differ between the reports, I was thinking the best way to do this is to somehow write C# code that will create the report in Stimulsoft - no designer or mrt file. Is this possible? Our current report viewer does this in .NET using the built-in ReportViewer control, but we want to move to Stimulsoft since there is a lot more functionality available. I basically want to say (all in code): use this page layout, add this header, put page numbering here, here is the data, etc. I was also thinking of adding a "business object" that would treat each line of data in legacy text file as a 1 text column dataset.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Create report entirely in code

Post by Brendan »

Yes it should be possible for you to do this.

There's an example of creating runtime reports through code in the Samples that come installed with Stimulsoft Reports.
The project is called RuntimeBuildReport.

You could parse the special codes you have in your text files and build a Stimulsoft Report file from them.
jmiller
Posts: 91
Joined: Mon Sep 20, 2010 12:18 pm

Create report entirely in code

Post by jmiller »

Thank you! I will look into the sample.
Post Reply