TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kasuni Abegunawardana
NA
211
125.9k
Crystal Report generate
Dec 5 2017 1:51 AM
Hi all,
This is urgrnt. I have created a crystal report when its running it doesn't appear i didn't get any errors even
This is the code of web config and my web form
Please can you say what is the mistake
Web Config
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="businessObjects">
<sectionGroup name="crystalReports">
<section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null" />
<section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler"></section>
</sectionGroup>
</sectionGroup>
</configSections>
<businessObjects>
<crystalReports>
<rptBuildProvider>
<add embedRptInResource="true" />
</rptBuildProvider>
<crystalReportViewer>
<add key="ResourceUri" value="~/crystalreportviewers13" />
</crystalReportViewer>
</crystalReports>
</businessObjects>
<connectionStrings>
<add name="dbconnection" connectionString="Data Source=ADMIN;Initial Catalog=FoodCalorieCalculator_db;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="FoodCalorieCalculator_dbConnectionString" connectionString="Data Source=ADMIN;Initial Catalog=FoodCalorieCalculator_db;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network host="smtp.nimanaqipour.com" userName="Nimanaqipour" password="mypass" port="587"/>
</smtp>
</mailSettings>
</system.net>
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
<add key="CrystalImageCleaner-AutoStart" value="true" />
<add key="CrystalImageCleaner-Sleep" value="60000" />
<add key="CrystalImageCleaner-Age" value="120000" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="CrystalDecisions.Web, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Shared, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></assemblies>
</compilation>
<httpRuntime targetFramework="4.5"/>
<httpHandlers>
<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</httpHandlers>
</system.web>
<system.webServer>
<handlers>
<add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>
</handlers>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
</configuration>
Web form Button Click
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
lbl_CName.Text = Session["C_EmailAddress"] as String;
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
con.Open();
string sqlq = "SELECT * FROM Consultant_tb where C_EmailAddress='" + lbl_CName.Text + "'";
SqlDataAdapter myDA = new SqlDataAdapter(sqlq, con);
DataSet1 DS = new DataSet1();
myDA.Fill(DS, "Consultant_tb");
CrystalReport1 rpt = new CrystalReport1();
rpt.SetDataSource(DS);
CrystalReportViewer1.Visible = true;
CrystalReportViewer1.ReportSource = rpt;
CrystalReportViewer1.RefreshReport();
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
finally
{
con.Close();
}
Reply
Answers (
6
)
Mvc grid with multiselect filter in header
data set is not available in .net core?