Error while executing a Report

Stimulsoft Reports.NET discussion
Post Reply
gurpreet.madaan
Posts: 1
Joined: Wed Dec 06, 2006 9:25 pm
Location: India

Error while executing a Report

Post by gurpreet.madaan »

when we try to do report.preview() , we get this error.

System.Exception was unhandled
Message="c:\Documents and Settings\Narinder\Local Settings\Temp\nvryqt2s.0.cs(23,57) : error CS1002: ; expectedc:\Documents and Settings\Narinder\Local Settings\Temp\nvryqt2s.0.cs(23,68) : error CS1002: ; expectedc:\Documents and Settings\Narinder\Local Settings\Temp\nvryqt2s.0.cs(24,58) : error CS1002: ; expectedc:\Documents and Settings\Narinder\Local Settings\Temp\nvryqt2s.0.cs(24,66) : error CS1519: Invalid token ':' in class, struct, or interface member declarationc:\Documents and Settings\Narinder\Local Settings\Temp\nvryqt2s.0.cs(26,54) : error CS1002: ; expectedc:\Documents and Settings\Narinder\Local Settings\Temp\nvryqt2s.0.cs(27,59) : error CS1002: ; expectedc:\Documents and Settings\Narinder\Local Settings\Temp\nvryqt2s.0.cs(27,61) : error CS1519: Invalid token ';' in class, struct, or interface member declaration"
Source="Stimulsoft.Report"
StackTrace:
at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate)
at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType, Boolean autoCreate)
at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType)
at Stimulsoft.Report.StiReport.Compile(StiOutputType outputType)
at Stimulsoft.Report.StiReport.Compile()
at Stimulsoft.Report.StiReport.Render(Boolean showProgress)
at Stimulsoft.Report.StiReport.Render()
at SDP.Base.QueryBuilder.ReportExecuter.ExecuteReport(Report report, String querySql) in C:\QueryBuilder\QueryBuilder\QueryBuilder\ReportExecuter.vb:line 36
at SDP.Win.QueryBuilder.App.QueryBuilderMainForm.HandlePreviewReport(Report execReport, String sql) in C:\QueryBuilder\QueryBuilder\QueryBuilderApp\QueryBuilderMainForm.vb:line 383
at SDP.Win.QueryBuilder.App.QueryBuilderMainForm.ExecuteReport(Object report) in C:\QueryBuilder\QueryBuilder\QueryBuilderApp\QueryBuilderMainForm.vb:line 380
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Error while executing a Report

Post by Edward »

It seems that you are building your report from code. The error occurs during the compilation. Please show code which builds your report or send it to Image.

Thank you.
ngaheer
Posts: 44
Joined: Sat Jul 22, 2006 1:12 am
Location: San Jose

Error while executing a Report

Post by ngaheer »

Hi,

This is the XML that represents the report. As you can see the report was designed in StiDesigner and there was no special code written for the report: -








Master File

nmfuid,ID,System.Int32
nmfid,Reference_x0020_ID,System.String
nmfdob,Date_x0020_of_x0020_Birth,System.DateTime
nmfAccountLastName,Account_x0020_Last_x0020_Name,System.String

Data.nmf

nmf





ReportOptions,Print_x0020_Banner_x0020_Page:,Print_x0020_Banner_x0020_Page:,SDP.Base.QueryBuilder.ReportOption,,False,False
ReportOptions,Update_x0020_Accounts:,Update_x0020_Accounts:,SDP.Base.QueryBuilder.ReportOption,,False,False
ReportOptions,Copies,Copies,SDP.Base.QueryBuilder.ReportOption,,False,False
ReportOptions,As_x0020_Of_x0020_Date,As_x0020_Of_x0020_Date,SDP.Base.QueryBuilder.ReportOption,,False,False
ReportOptions,Printed_x0020_By,Printed_x0020_By,SDP.Base.QueryBuilder.ReportOption,,False,False
ReportOptions,Print_x0020_Banner_x0020_Page:,Print_x0020_Banner_x0020_Page:,SDP.Base.QueryBuilder.ReportOption,,False,False
ReportOptions,Update_x0020_Accounts:,Update_x0020_Accounts:,SDP.Base.QueryBuilder.ReportOption,,False,False
ReportOptions,Copies,Copies,SDP.Base.QueryBuilder.ReportOption,,False,False
ReportOptions,As_x0020_Of_x0020_Date,As_x0020_Of_x0020_Date,SDP.Base.QueryBuilder.ReportOption,,False,False
ReportOptions,Printed_x0020_By,Printed_x0020_By,SDP.Base.QueryBuilder.ReportOption,,False,False





None;Black;2;Solid;False;4;Black
Transparent


Transparent
0,0.2,7.49,0.3


Transparent
0.2,0.1,2.7,0.2

Arial,8
0,0,0,0
Text1


{nmf.nmfAccountLastName}
Black





nmf
Top

DataBand1






0.39,0.39,0.39,0.39
Page1

11.69
8.27


Arial,100
[50:0:0:0]





System.Dll
System.Drawing.Dll
System.Windows.Forms.Dll
System.Data.Dll
System.Xml.Dll
Stimulsoft.Controls.Dll
Stimulsoft.Base.Dll
Stimulsoft.Report.Dll

Report
12/7/2006 7:20:36 PM
12/7/2006 7:19:52 PM
907dbad75fd443a68026ce58ae6b087b
Report
Inches
2007.1
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.ReportControls;
using Stimulsoft.Report.Components;

namespace Reports
{

public class Report : Stimulsoft.Report.StiReport
{

public Report()
{
this.InitializeComponent();
}
#region StiReport Designer generated code - do not modify#endregion StiReport Designer generated code - do not modify
}
}
CSharp

Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Error while executing a Report

Post by Edward »

There are the following problems in your report.
1. Variable names can not contain spaces or any special symbols. They must to satisfy of the requirements of naming variables in .Net.
2. A report can not works correctly with more than one variable with the same name because report it is a c# or vb type.
3. The report contains SDP.Base.QueryBuilder class. This class must be added to the referenced assemblies section of the report. This section is available in the Property Editor of the designer from the object Report.

If the problems with your report still exists, please send it to Image for the analysis.

Thank you.
Post Reply