.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

crystal report

Posted By: rashmi     Posted Date: July 19, 2011    Points:5   Category :C#
hi
i want to show two crystal report with datasource in one crystalreportviewer
how can i do this


Responses
Author: Narayanan             
Posted Date: July 19, 2011     Points: 20   

Hi,
Use Sub report in your Crystal report

http://msdn.microsoft.com/en-us/library/ms227520%28v=vs.80%29.aspx


Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
Author: rashmi             
Posted Date: July 19, 2011     Points: 20   

thanks
i have two crystal report consumption and finalconsumption in project, in consumption report i use finalconsumption report as a sub report but the prob is finalconsumption report done by stored procedure
when i write code to display this reports in reportviewer that time database login form appear

i write the code like this


public static DataTable getsaleconsumpndata(DateTime fromdate,DateTime todate)
{


DbCommand dbcom = BaseDB.CreatestrCommand();
dbcom.CommandText = " select distinct S.date,S.itemname ,v.ingname,v.quantity,count(S.quantity) as salequantity, (v.quantity *count(S.quantity) ) as totqty from ingredientdetails v INNER JOIN bill S ON S.itemname= v.itemname where S.date between '"+fromdate+"' and '"+todate+"' group by v.itemname,v.ingname,v.quantity,S.itemname,S.date ";
datatable dt;
try
{
dt = BaseDB.ExecuteSelect(dbcom);
}
catch (Exception ex)
{
throw ex;
}
return dt;
}



under button:

dt1 = MustardSoftware.Code.Report.getsaleconsumpndata(Convert.ToDateTime(dateTimePicker2.Text), Convert.ToDateTime(dateTimePicker1.Text));
if (dt1.Rows.Count >= 1)
{
MustardSoftware.reports.consumptionreport c = new MustardSoftware.reports.consumptionreport(); ;
c.SetDataSource(dt1);
crystalReportViewer1.ReportSource = c;
}
else
{
MessageBox.Show("No data found");
crystalReportViewer1.ReportSource = null;
}


but when i running the project and click on button database login form will appear

plz any one help me how can i solve this problem


Author: Narayanan             
Posted Date: July 19, 2011     Points: 20   

hi,
try these sites
http://vb.net-informations.com/crystal-report/vb.net_crystal_report_subreport.htm
http://www.vbforums.com/showthread.php?t=591571
Note : Create a sub report once again in the Main Report

Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
Author: Dhiraj Ranka             
Posted Date: July 27, 2011     Points: 20   

Hi,

You can add all the necessary tables in one dataset or any other option of your choice and then use those tables and fields from the designer.


Hope this helps.

Thanks & Regards,
Dhiraj Ranka
http://www.twitter.com/dhirajranka | http://www.dhirajranka.com
Author: Sasi Prabhu             
Posted Date: July 29, 2011     Points: 20   

Refer :

http://www.codeproject.com/KB/reporting-services/Report_Viewer_Control.aspx



http://www.dotnetbips.com/articles/51df0f69-ee0e-4982-a7bb-d3e9b2182841.aspx

Thanks & Regards,
Sasi Prabhu.
Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   

try coding as


Dim Report As New ReportDocument  
If Not Session("DataSetX") Is Nothing Then
ds = Session("DataSetX")
'Report.Load(MapPath("\Reports\SS.rpt"))
Report.SetDataSource(ds)
CrystalReportViewer.ReportSource = Report
CrystalReportViewer.DataBind()
Else
End If


Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   

try url as


http://www.codeproject.com/KB/aspnet/Crstalreportusingvs2010.aspx

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend