Crystal Report with reference to xsd file

I am trying to create a crystal report, but I want the connection string that I mentioned in the Web.Config file to be available. In addition, I want to create an xsd file for my Crystal report file. Can someone please direct me to a tutorial or forum to solve my problem?

+1
source share
3 answers

you can also programmatically set the report data source if you need - I can provide details if you need

between the call to myReportDocument.Load ("myreport.rpt") and myReportDocument.Refresh (), the last of which actually gets data from the database), you can add a call to myReportDocument.SetDataSource (myDataSource), which accepts an object of the data source type that you can create by calling its constructors with the URL of the data source you want to use, its username and password.

Hope this helps

+1
source

Thanks for helping me. Now I can display the data in the crystal report file using the XSD file. There are fields in the xsd file that exactly match the names specified in the select query, which brings the values ​​from the database. The following is the part of the xsd file that contains the field names in the xs: tag.

You must also specify the data types of these fields. The XSD file name can be saved as desired. The names "Summary_Report_on_portal" and "Summary_Updt" do not match any data set names in the code or request fields. It can be stored at the request of the user.

This XSD file must be transferred to the crystal report using the database expert in the field explorer window. The name "Summary_Updt" appears in the new connections that can be added to the Crystal report. The fields mentioned in the xs: element field are visible to the user to drag him into the crystal report. When a user mentions a data source in a crystal report (dataset), the fields in the dataset are mapped to the XSD field values. CODE: objBL.Rpt.SetDataSource (objBL.ds_shipment_info.Tables [0]);

Hope this is detailed enough. Let me know if anyone wants more information.

+1
source

another way would be to call ReportDocument :: SetDatabaseLogon (String * user, String * password, String * server, String * database); before updating (); if you do not want to reuse the connection. This has the advantage of being simple, but means that you will not reuse data sources.

0
source

All Articles