Report.Design() Error

edited 11:07PM in FastReport .NET
Hi

i am new to fast reports, getting error on report design code statment, using following code in Asp.net weforms, may be its small issue, how i can fix it ?

FastReport.Report rpt = new FastReport.Report();
rpt = new FastReport.Report();
string repstr = string.Empty;
// loading string from database containing report contents
rpt.LoadFromString(repstr);

// this last line making error
rpt.Design();

Message : DragDrop registration did not succeed.

Inner Exception : Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it.

Thanks
Zain

Leave a Comment