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
Solved

CS1026: ) expected

Posted on 2003-11-16
4
998 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Greetings C# program 17 124
SSRS subreport with parameter 3 47
Moving code from one TFS branch to another 3 33
Where does legacy ASP.NET initialize language? 2 22
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…
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…

839 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