Solved

CS1026: ) expected

Posted on 2003-11-16
4
995 Views
Last Modified: 2010-05-18
Can somewhere help me figure this error out -- "CS1026: ) expected"? I have a Crystal Reports object withing my aspx page, pointed to a .rpt file.

Here's the line that is throwing the error:
<cr:CrystalReportViewer id="objCRViewer" runat="server" width="1050px" height="1088px" reportsource="<%# C:\Chart.rpt %>" displaytoolbar="False" borderstyle="Solid" borderwidth="1px"/>

Here's some of the code-behind for the page:
            protected CrystalDecisions.Web.CrystalReportViewer objCRViewer;
      
            private void Page_Load(object sender, System.EventArgs e)
            {
                  ReportDocument objReportDoc = new ReportDocument();

                  objReportDoc.Load(@"C:\Chart.rpt");
                  objCRViewer.ReportSource  = objReportDoc;
            
            }

Nothing to difficult, but it doesn't want to display. "Chart.rpt" is one of the samples that comes with VS.Net.

Thanks in advance
0
Comment
Question by:Junoti
4 Comments
 
LVL 6

Assisted Solution

by:DaniPro
DaniPro earned 83 total points
ID: 9762114
I think that you haven't close the tag
<cr:CrystalReportViewer id="objCRViewer" runat="server" width="1050px" height="1088px" reportsource="<%# C:\Chart.rpt %>" displaytoolbar="False" borderstyle="Solid" borderwidth="1px">
</cr:CrystalReportViewer>
0
 
LVL 10

Assisted Solution

by:smegghead
smegghead earned 83 total points
ID: 9762601
Hi,

What is the punctuation around c:\chart.rpt, why can't it just be

reportsource="c:\chart.rpt"

??

If you need to include an angle bracket within the xml, you have to use &lt; &gt;  for < >

HTH

Smg.
0
 
LVL 1

Accepted Solution

by:
darkxenn earned 84 total points
ID: 9766382
try throwing a @ in front of your "" for reportsource...

make it look like this
reportsource = @"<%# C:\Chart.rpt %>"

that should do it
-Xen
0
 
LVL 1

Author Comment

by:Junoti
ID: 9768014
I'll split the points with everyone for at least taking a stab. It turned out that I couldn't have two "ReportSource" assignments. There was one in the HTML and in the code-behind. I took the HTML version out, and left the code-behind version in, and voila. <shakes head> Stupid me...

Thanks everyone.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Icons and Colors for Terms 3 32
Printing 1 50
updating order of the rows, N+1 query issue, C#, asp.net, MVC, SQL Server 3 25
Problem!!! 8 33
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now