?
Solved

CS1026: ) expected

Posted on 2003-11-16
4
Medium Priority
?
1,022 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 166 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 166 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 168 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

764 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