Solved

CS1026: ) expected

Posted on 2003-11-16
4
1,017 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

705 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