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"

        '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)

Open in new window

Error : The report definition for report 'EBill.rdlc' has not been specified
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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:
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?
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
See the link I provided above.
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

chokkaStudentAuthor Commented:
My existing report property doesn't have a Report Viewer. However, they have declared Report Viewer in the .Net Code.
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.


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 ..
chokkaStudentAuthor Commented:
Thanks mlmcc !!
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.