Crystal Reports -- Unable to get report name in code behind in ASP.NET2.0 web form.
-
Hello All, I created my crystal report and saved it. Then I created a new webpage and added Crystal report viewer and saved it. In the code behind of the webpage when i tryed to add code i am unable to get the report name (automatically in the dropdown). If I write/typed the report name and tryed to run report it is showing an error message there. "Compiler Error Message: CS0246: The type or namespace name 'CrystalReport1' could not be found (are you missing a using directive or an assembly reference?)" Please let me know how to get the report name in the code behind automatically. :doh: Regards, Jagadeesh
-
Hello All, I created my crystal report and saved it. Then I created a new webpage and added Crystal report viewer and saved it. In the code behind of the webpage when i tryed to add code i am unable to get the report name (automatically in the dropdown). If I write/typed the report name and tryed to run report it is showing an error message there. "Compiler Error Message: CS0246: The type or namespace name 'CrystalReport1' could not be found (are you missing a using directive or an assembly reference?)" Please let me know how to get the report name in the code behind automatically. :doh: Regards, Jagadeesh
-
Did you load the crystal server runtime on the web server? You need the crystal dlls for crystal reports to run. Ben
Ben, I couldn't get what you are saying. This is my first Crystal report. I am working in VS2005, using ASP.NET & C# for this Crystal Reports. When i binded a simple report using CrystalReportViewer control (with out using any dataset), It worked fine. (There is no code in the codebehind except the CrystalReportViewer bind property) It showed the values correctly. When I tryed the same with the dataset in the code behind i am unable to get the reportname in the snippet. CrystalReport1 crReportDocument = new CrystalReport1(); --> i'm not getting this report name here. I am following the following steps to generate Crystal Reports using the Datasets. 1) Right clicked on my solution and selected add, New Item. 2) Added a dataset and created a query in the dataset. and saved this dataset. 3) Added a Crystal Report Viewer to my webform. 4) Right clicked on my solution and selected add new Item Again and then added a crystal report 5) In the crystal report wizard Selected crystal reports wizard and then selected my report format... 6) Under the data menu I selected project data, then ADO.NET datasets. My dataset showed up with its fields and you can make your selection as well as created my crystal report. 7) The code behind ******(in the webform where I added Crystal Report Viewer)***** I tryed to write code but unable to get my report name (automatically in the dropdown). Is my step 3 correct? I am unable to understand why my crystal report name is not showing up in my code behind. Please let know your thoughts. Many Thanks, Jagadeesh.J