![asp net crystal report viewer using static rpt no data source asp net crystal report viewer using static rpt no data source](http://2.bp.blogspot.com/-UpPgdbeeHVM/T1qn4c5MgUI/AAAAAAAAAE0/5LhgBZciJ4U/s1600/CrystalReportHiddenField.png)
- #Asp net crystal report viewer using static rpt no data source code
- #Asp net crystal report viewer using static rpt no data source windows
A document processed by the JRC engine cannot be
#Asp net crystal report viewer using static rpt no data source windows
When I Publish to my web server (yes, it's a personal server - Windows Server 2003, installed CR 13 Engine on it), I get the error: When I put in the password, the report is shown exactly as "CrystalReport1" was made to show it. When I run on my development machine, everything works perfect (except for one problem) - a modal comes up asking for login credentials for the server. In the report, I just added one field in the "Details" section. Of course, I added a CrystalReport, "CrystalReport1.rpt" to my project as well. In the Page_Load, I DataBind() the viewer.
#Asp net crystal report viewer using static rpt no data source code
I created a whole new project and used the following code to test the most simple example:
![asp net crystal report viewer using static rpt no data source asp net crystal report viewer using static rpt no data source](http://4.bp.blogspot.com/-IIW2otba4fM/UVXNXjJyFgI/AAAAAAAAAGU/KDq-unwNni0/s1600/New+Picture.png)
So instead of doing it all from the code behind, I kind of followed what you said. But currently, I can't get anything to show, so that's what I need to I'm sure it's something dumb I'm doing, but does anyone have any suggestions? I know if I can figure this little problem out, I can expand it to the more complex things I want it to do. So the DataSet is definitely loaded with data, the CrystalReport is found (because before I was having trouble with loading into oRpt), and no exception is being thrown because the "Catch" section is never reached. Where "CrystalReport.rpt" is obviously the report I created.Īnd I used the following code to make sure that myDS actually was loaded with the data:įor Each s As DataRow In myDS.Tables(0).Rows Where "DataSet1" is the DataSet I created and holds my table. Where "CrystalReportViewer1" is obviously the viewer I have put in my aspx page. ORpt.SetDataSource(myDS.Tables("Budgets")) ORpt.Load(Server.MapPath("~/CrystalReport.rpt")) On some button click, I use the following code to show the report:ĭim query As String = "SELECT * FROM Budgets"ĭim MyDA As New SqlClient.SqlDataAdapter()ĭim oRpt As New () The report added their names to the "Page Header" and the fields to the "Details" section. In the CrystalReport designer, I used the "Field Explorer" to add 5 of my database fields (just for testing purposes). I expanded "Project Data" and found my DataSet.I selected my table and added it to the "Selected Tables" list. I added a CrystalReport to my project and in the Details section, I right clicked and chose "Database Expert" under "Database". I added a DataSet to my project and added my database table to it.
![asp net crystal report viewer using static rpt no data source asp net crystal report viewer using static rpt no data source](https://3.bp.blogspot.com/-Mri1V5QUoJc/Txb8bYRu6ZI/AAAAAAAAA5M/PrIrX2br6Mk/w1200-h630-p-k-no-nu/AddNewItem.png)
I'm having a lot of trouble with this, and all the examples that I've found online tell me different things, so I was hoping someone could help.