Error on calling Embedded Resource in Crystal Report

I am writing a BarCode in my Crystal Report.  This is an existing code which works in Production.

While calling the same code .. running from .Net Project Solution, I am getting an error saying that ..

Error : The report definition for report 'EBill.rdlc' has not been specified

ReportViewer1.LocalReport.ReportEmbeddedResource = "EBill.rdlc"
  ReportViewer1.LocalReport.DataSources.Clear()
        ReportViewer1.LocalReport.DataSources.Add(RptDataSource)
        ReportViewer1.LocalReport.Refresh()

        'Initialize required parameter variables for rendering newly-created report as a tif
        Dim warnings As Microsoft.Reporting.WebForms.Warning() = Nothing
        Dim streamids As String() = Nothing
        Dim mimeType As String = Nothing
        Dim encoding As String = Nothing
        Dim extension As String = Nothing
        Dim deviceInfo As String
        Dim bytes As Byte()
'The deviceinfo parameter specifies the settings used to render the report as an image
        'X and Y resolution should be specified, as well as output format of Tif
        deviceInfo = "<DeviceInfo><DpiX>200</DpiX><DpiY>200</DpiY><OutputFormat>TIFF</OutputFormat></DeviceInfo>"

        'Render the report as image to a local bytes variable
        bytes = ReportViewer1.LocalReport.Render("Image", deviceInfo, _
          mimeType, encoding, extension, streamids, warnings)

        'Use a filestream to place the report file from the bytes variable into the target
        'report output file (the path being specified by the report generation sproc above)
        Dim fs As New System.IO.FileStream(OutputFI.FullName, IO.FileMode.Create)
        fs.Write(bytes, 0, bytes.Length)
        fs.Close()

Open in new window

Error : The report definition for report 'EBill.rdlc' has not been specified
chokkaStudentAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
0
chokkaStudentAuthor Commented:
My existing code uses - Microsoft.Reporting.WebForms.ReportViewer. Application is a Console Application.

Still i couldnt figure it out,why this exception is poping out.
If not crystal Report , what i have to do to fix it?
0
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
See the link I provided above.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

chokkaStudentAuthor Commented:
My existing report property doesn't have a Report Viewer. However, they have declared Report Viewer in the .Net Code.
0
mlmccCommented:
You need to change this line

ReportViewer1.LocalReport.ReportEmbeddedResource = "EBill.rdlc"

The report name is case-sensitive so make sure that matches.  Also unless the rpt file is in the active folder, you need to specify the full folder path.

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chokkaStudentAuthor Commented:
Still working on it ..
0
chokkaStudentAuthor Commented:
Thanks mlmcc !!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.