C# the report definition has not been specified - c#

I have a report tool that displays a lot of RDLC reports and I'm trying to add a new one and I can't see what I'm missing. I have the report included in the Project (I see it along with all the other RDLC reports in the Solution exporer).
This code for older reports works fine.
rvReports.LocalReport.ReportEmbeddedResource = "paylocity.id.eStart.EditSummary.rdlc";
However, this gives me the error that the report definition has not been specified.
rvReports.LocalReport.ReportEmbeddedResource = "paylocity.id.eStart.EditSummaryByMngr.rdlc";
I've double checked that the case is correct for the file I created. Can someone else see something I'm missing?

Select the file in Solution Explorer and open its Properties (Right-click > Properties, or F4 or Alt+Enter). Ensure its Build Action is set to Embedded Resource

Related

Asp.net Crystal Reports changes to child reports not showing in vs2017 debug/release mode

Similar to the user in my first link, I've inherited an ASP.NET web application which displays reports using Crystal Reports. I was asked to edit some of the reports and make some new ones but my subreport changes are not being displayed when the report is called with the site running in the IDE. I realize from what I've read that the .rpt files are rolled into the DLL but how are the parent report changes working and the subreports changes not?
The report(s) I'm working on is/are a parent report that outputs information and then has 5 embedded sub reports (child?) that output the rest. (All of the report is shown in PDF format.)
I had originally not been able to see changes to either the parent or children reports but yesterday I discovered (4th day working on this problem) that when I changed the Solution Configurations dropdown from Debug to Release my changes to the PARENT report ARE correctly showing in the running site IDE. However, no matter what I change for the child reports the code that is running is the code that I was originally given/compiled and does not contain any of my subreport .rpt changes. The running file(s) has/have to be on my computer somewhere, I brought all the code here from nothing and it builds and runs in my IDE.
Things I've done/checked:
Both the child and parent report .rpts that I am editing reside in the same directory. They are in solution\subproject\Reports. I have verified changes to the files modified immediately after making a change.
I tried Starting/Stopping the IDE
I tried Starting/Stopping the computer
I tried Publishing the project after Rebuild. Publishes with no errors but the subreport changes do not show up.
I tried right clicking the individual .rpt file and choosing 'Publish ReportName.rpt'. Gave errors stating that the bin/Release/PublishOutput Web Site does not exist.
In the properties pane:
The Build Action for all the .rpt files is set to 'Content'.
I changed the Copy to Output Directory property to 'Copy Always'.
As soon as I start the site via the IDE the changed files are copied to:
solution\subproject\bin\Reports\
Now that I have the Solution Configurations dropdown set to Release, the corresponding Build/Configuration Manager is set to Release. The Platform is Any CPU and all Build checkboxes are checked. (None of the Deploy checkboxes are checked.)
I have not tried 'Deleting ASP.net temp files'.
My research includes this:
Crystal Report Not Showing Changes to Report
Then this:
Crystal Reports in ASP.NET 2.0 app - report changes not showing
Also saw something on an SAP site but lost the link...
As Franck indicates above:
'Did you update the subreports in the main report or just the subreport files separately. If you did update separately you need to open the main report and right-click the subreport and choose Re-import Subreport.'
Editing the subreport, Re-importing and rebuilding the site allowed my changes to be seen while running the IDE! Thank you so much!

Ambiguity Error after changing Resource File

I have an ASP.NET application that is available in two languages: English by default and Portuguese as second option.
Everything was working good, look this first image:
Then when I try to add or remove a string resource, visual studio starts to give me ambiguity errors when compiling, as those:
The namespace 'VolunteerGames.Web.Translations' already contains a
definition for 'Translation'
and
Ambiguity between
'VolunteerGames.Web.Translations.Translation.ResourceManager' and
'VolunteerGames.Web.Translations.Translation.ResourceManager'
I noticed that after changing the resource in designer (Translation.resx) a new file named Translation1.Designer.cs was created. It created another class called Translation. If I delete this new file I can compile, but the new strings I just created are not found when I try to use on my controller.
I can't understand what's going on. I've been working for months in this project and it was all good.
Because Visual Studio started to create the file Translation1.Designer.cs, and that new file conflicted with Translation.Designer.cs, and when I tried to delete it I got erros, then I deleted Translation.Designer.cs so everything is working now again.
For late-comer who encountered with the same problem
It looks like the project was created in ResX Schema older version (v1.3) but reopen(and save) in ResX schema v2.0, since the Schemea is auto created, the VS will do so because schema standard is different is not adaptable. We can have two files with completely same name in one directory, it attached a number with its original name

Source file '' could not be found

I have some solution already created I need to work with, but I get these:
Warning 1 At least one file is missing the 'RelPath' attribute. SolutionName
Error 2 Source file '' could not be found C:\Users\me\Desktop\someDir\someDir\CSC SolutionName
I use VS Express 2013 for Desktop.
I get this error when I click rebuild solution
Why I get this error and how to fix it?
Create a backup of your project file.
In solution explorer, right click your project and unload it. Then right click again and "Edit project file".
There you can inspect your files. There should be a problem with one of them, like lacking a file name, or something different from the other files.
Remove the attributes regarding that file, save the project, right click, reload project.

Unable to find the report in the manifest resources - Crystal Report / C#

I have a windows application written in C# and am trying to display crystal report using crystal report viewer. The name of my report is "receiptReport" and I am using following line to show report in viewer:
receiptReport rpt = new receiptReport();
crystalReportViewer.ReportSource = rpt;
I am receiving following error: Unable to find the report in the manifest resources. Please build the project, and try again.
I have tried by setting Build Action of report file 'receiptReport.rpt' to Embedded Resource but still now luck.. Im using VS2010..
A lot of things go wrong with CR after a lot of googling one of these fixes will solve the problem.
1) Full FullResourceName property in the reports code file (.cs) will be wrong if the containing folder(s) has spaces in its name. The best fix is to rename the folder to remove spaces if you manually edit the code file the error will keep coming back
2) Make sure the build property of the rtp file is set to Embedded Resource
3) Use Developer Express for reporting and avoid all headaches in the first place
Well... I had the same problem.
My solution was to edit the properties of the Report, and change the Custom Name Space.
Lets say that I was caling the report from Name Space "A", and my report was in the same Tool Name Space but in other DLL.
So, I've cleared the Custom Name Space... and rebuilt everything.
Problem solved for me.
I received the same "Unable to find the report in the manifest resources" error in VS 2010 after manually copying *.rpt and *.vb files into a different solution's directory.
After checking the embedded resource setting everyone speaks about in this post (it was already set to embedded resource),
I solved the problem by right-clicking the .rpt file in Solution Explorer and selected "Run Custom Tool".
Name the Folder name which contains the Crystal Report, without Space.
For Eg: Folder Name "Report Section" as "ReportSection"
My issue was that the directory's name where my reports was located was all numbers in order to correspond to the client codes we use. So what happened was that Visual Studio named the class Reports._1234567, while my directory was "\Reports\1234567". When I renamed the folder "_1234567" then the folder matched the class name and everything worked fine.
In the report's code behind the FullResourceName property is this:
public override string FullResourceName {
get {
return "app700.Reports._1234567.CrystalReport1.rpt";
}
set {
// Do nothing
}
}
The underscore character was added by VS because you can't have a class name that does not start with a letter or underscore.
This is a silly mistake done by a number of programmers.
It actually happens only when you transfer or change a project or report from one project to another project.
"Unable to find the report in the manifest resources - Crystal Report / C#"
Solution:
Go into the project's Report Form's .CS file
Now You have:
public override string FullResourceName
{
get
{
//Note this path it must be yours project name Or full path of Crystal report
return "FullPath_from_project_name.Crystalreport.rpt";
}
set
{
// Do nothing
}
}
I"m deadly sure you must Error free
If not mail me with Error:kapil.dev824#yahoo.com
My problem was solved by removing a folder which contain space .
after i change it then this error is gone.
:)
VS2010 in VB.Net. In the Solution Explorer window, I moved the .rpt file from the root folder to a sub folder for reports. This fixed the error for me.

Problem compiling a .sln file with Visual C# 2010 Express

First thing when I try to run the application (I just downloaded it from CodeProject, right here), I get this error:
The name Resource does not exist in the current context
So when I double click the error it takes me to this code:
private Image mp_CodeImage_Class = Resource._class;
But there is a class called Resource but is in a file called Resource.Designer.cs, and this file is in a resource file called Resource.resx. When I check the properties of Resource.resx, Build Action is set to Embedded Resource and Custom Tool is set to PublicResXFileCodeGenerator. I'm just saying this details in case they help you find a solution because I know nothing about resources, just almost never use them. Hope you can help. Thanks.
For one, you can't open .sln files (which are VS solutions) in the express versions.
So what you will need to do is open the project file (.csproj), compile it, close that project and then copy the dll which you've just compiled into your project in which you want to use the control.
Hope this helps.

Categories