n0minal
n0minal

Reputation: 3223

Devexpress Report Bands

Hi can i export not the whole report but instead the report bands of devexpress xtrareport? I want to have the header, body and footer pass onto different strings. It is possible? Thanks

UPDATE

I have a InvoiceReceipt which has ReportHeader, Detail, ReportFooter what i want is to pass

ReportHeader => string header;
Detail => string items;
ReportFooter => string footer;

So when i get header it should have the header of the report in text format ( since it was exported as text ) and the rest follows.

OR

can i have the ReportHeader be exported as Text? same as ReportFooter and the Details part?

OR

can i have devexpress reports export to text a specific report by reportheader, reportfooter and details?

Upvotes: 0

Views: 3291

Answers (2)

Lalit Sharma
Lalit Sharma

Reputation: 49

on document viewer :-

public void Getnewreport()
        {
            XtraReport report = new XtraReport();
            // Create a report and bind it to a dataset. 
            report.DataSource = Datads;
            // Show the print preview. 
            report.ShowPreview();
        }

on designer
XtraReport objDevReport = new XtraReport();
                objDevReport.ShowPreview();
                objDevReport.ShowPreviewDialog();

Upvotes: 0

JohnnBlade
JohnnBlade

Reputation: 4327

Look for a code that almost looks like this

    XtraReport report = new XtraReport();

    ReportModel model = this.DataContext as ReportModel;

    report.DataSource = model;

    report.Report.DataSource = model.items;

    report.ShowPreviewDialog();

Cause building your header, detailband, and footer strings can be done by using the model that is set as the datacontext of the report, so there is no need to get the strings from the report header, detail band, footer

Upvotes: 0

Related Questions