Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Today, i was creating a simple crystal report when suddenly a problem arised as soon as i connected the crystal report with my access database. The error is mentioned below.
C#
Error 1 Custom tool error: "Code generator 'ReportCodeGenerator' failed. Exception stack = CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException (0x800002AD): Error in File C:\Users\HARSHO~1\AppData\Local\Temp\ItemLedger {F2A0D055-4F7D-48F7-9990-AAC0E5938DCB}.rpt: The request could not be submitted for background processing. at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() --- End of inner exception stack trace --- at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) at CrystalDecisions.VSDesigner.CodeGen.ReportClassWriter..ctor(String filePath) at CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator.GenerateCode(String inputFileName, String inputFileContent)" D:\Software\My Code\New Project (Started Project)\Working On\Main Page 1\Forms\Printing\ItemLedger.rpt 1 1 Started Project

Platform : Visual Studio 2008
Crystal Report : Crystal Report 2008
Access : Access 2013

Can anyone tell me where did i go wrong?
Posted
Comments
[no name] 2-Jan-16 0:31am    
Please follow below link:

https://scn.sap.com/thread/3577368
agent_kruger 2-Jan-16 1:29am    
sorry mr., that post is not relevant to this one as i have no sub reports. I have a blank report with some textobjects in it and i am just trying to connect it with my ACCESS database and after connecting when i build the solution it gives the above error. (My database also has password in it and i tried removing it and it did not help at all)
jame01 3-Jan-16 15:32pm    
hello , i didn't used with access i used it with sql but i think its same..
put this cryRpt.Load("set your crystal path here\CrystalReport1.rpt");and in crystal report there is some change you have to made like embedded or new or from path
that decide take crystal report from where...
and if my question is not clear plz let me know :)
agent_kruger 3-Jan-16 23:36pm    
how can i mark the path because if i run this statement on another PC the path must be changed.

1 solution

here is what you have to do
1: right click on report from solution explorer
2:the first properties change it to build on action to {content}
3:change copy to output .. {copy always} ..

this is code for run the reports
C#
reportViewer1.Reset();// here you resting report
            reportViewer1.LocalReport.DataSources.Clear();
            ReportDataSource rpc = new ReportDataSource("DataSet1", dt);//here you can change the your source data ,im getting mine from dataset so you .. 
            reportViewer1.LocalReport.ReportPath = "charting.rdlc";//here is the code work with build on action with local reoport ..

            reportViewer1.LocalReport.DataSources.Add(rpc);
            reportViewer1.RefreshReport();
            reportViewer1.Visible = true;


plz if the helping you mark it as accepted solution ..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900