Click here to Skip to main content
15,902,893 members
Home / Discussions / C#
   

C#

 
AnswerRe: Can I raise an event for a class rather than an object? Pin
BoneSoft25-Jan-08 8:16
BoneSoft25-Jan-08 8:16 
GeneralRe: Can I raise an event for a class rather than an object? Pin
Clive D. Pottinger25-Jan-08 10:50
Clive D. Pottinger25-Jan-08 10:50 
GeneralRe: Can I raise an event for a class rather than an object? Pin
BoneSoft25-Jan-08 12:12
BoneSoft25-Jan-08 12:12 
GeneralRe: Can I raise an event for a class rather than an object? Pin
Clive D. Pottinger1-Apr-08 11:13
Clive D. Pottinger1-Apr-08 11:13 
GeneralRe: Can I raise an event for a class rather than an object? Pin
BoneSoft1-Apr-08 13:06
BoneSoft1-Apr-08 13:06 
GeneralRe: Can I raise an event for a class rather than an object? Pin
Ennis Ray Lynch, Jr.25-Jan-08 8:20
Ennis Ray Lynch, Jr.25-Jan-08 8:20 
GeneralRe: Can I raise an event for a class rather than an object? Pin
led mike25-Jan-08 8:27
led mike25-Jan-08 8:27 
QuestionWhats the correct way to populate the DataSource in SubReports? [modified] Pin
DeepToot25-Jan-08 7:31
DeepToot25-Jan-08 7:31 
have a report that contain at least 7 subreports. Each with their own datasource. I have set the subreports datasource to the correct datasource and on a few of them passed in parameters.

however, upon running it I noticed that the reports would show "SubReport cannot be shown". I made sure my parameters were being passed and its of the same type.

I googled and found a lot of examples that used the 'LocalReport_SubreportProcessing' event to populate the datasources for each subreport.

Is this the right way to go about it? I cannot find any good examples of how to populate a subreport. I need to justify putting the logic like this inside the ReportViewer form rather than someplace else.

Could someone please shed some light on this for me?

I am using VS 2005 C#, Sql 2k, on Windows Server 2003. I am using Reporting Services however the reports in my project are .rdlc files not .rdl they are inside my Windows Project not a Reporting Project...if this matters.

Any help asap would be greatly appreciated. Below is a small sample of how im using the event.



void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
{
if(ReportEmbeddedResource =="Desktop_Controller.Reports.Desktop_Controller.Reports.rptPatientInfo.rdlc")
   {

System.Diagnostics.Debug.Write("SubReport being processed: " + e.ReportPath + "\r\n");

try
{

  switch (e.ReportPath)
  {
      case "rsubPatientInfoReferred":
          if (null == vwReferrals)
          {
             VwPatientInfoReferralsService vwSer = new VwPatientInfoReferralsService();
             vwReferrals = vwSer.GetAll();
          }
          vwReferrals.Filter = "PatientNumber = '" + PatientNumber + "'";
          e.DataSources.Add(new ReportDataSource("StVincent_Bariatrics_DomainModel_VwPatientInfoReferrals", vwReferrals));
          break;
   }
}
catch{}
}
}


Steve Welborn
Software Engineer
Inrange Consulting

modified on Friday, January 25, 2008 1:49:29 PM

QuestionDeploy a web service Pin
usermans25-Jan-08 6:13
usermans25-Jan-08 6:13 
GeneralRe: Deploy a web service Pin
led mike25-Jan-08 6:48
led mike25-Jan-08 6:48 
Generalimage transparent Pin
netJP12L25-Jan-08 5:34
netJP12L25-Jan-08 5:34 
GeneralRe: image transparent Pin
Ennis Ray Lynch, Jr.25-Jan-08 6:25
Ennis Ray Lynch, Jr.25-Jan-08 6:25 
GeneralRe: image transparent Pin
netJP12L25-Jan-08 9:28
netJP12L25-Jan-08 9:28 
GeneralRe: image transparent Pin
Ennis Ray Lynch, Jr.25-Jan-08 9:33
Ennis Ray Lynch, Jr.25-Jan-08 9:33 
GeneralTaskbarNotifier in Client Server Application Pin
ALI BIN ABID25-Jan-08 4:04
ALI BIN ABID25-Jan-08 4:04 
GeneralRe: TaskbarNotifier in Client Server Application Pin
DaveyM6925-Jan-08 4:13
professionalDaveyM6925-Jan-08 4:13 
GeneralRe: TaskbarNotifier in Client Server Application Pin
ALI BIN ABID25-Jan-08 4:22
ALI BIN ABID25-Jan-08 4:22 
QuestionWhat is Dirty ? Pin
Nadia Monalisa25-Jan-08 4:01
Nadia Monalisa25-Jan-08 4:01 
AnswerRe: What is Dirty ? Pin
DaveyM6925-Jan-08 4:06
professionalDaveyM6925-Jan-08 4:06 
GeneralRe: What is Dirty ? Pin
Nadia Monalisa25-Jan-08 4:26
Nadia Monalisa25-Jan-08 4:26 
GeneralDatabinding small mistakes Pin
Trustapple25-Jan-08 3:10
Trustapple25-Jan-08 3:10 
GeneralRe: Databinding small mistakes Pin
Justin Perez25-Jan-08 3:30
Justin Perez25-Jan-08 3:30 
GeneralRe: Databinding small mistakes Pin
Paul Conrad25-Jan-08 3:34
professionalPaul Conrad25-Jan-08 3:34 
Generaldon't use CODE, use PRE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Pin
Luc Pattyn25-Jan-08 3:49
sitebuilderLuc Pattyn25-Jan-08 3:49 
GeneralRe: don't use CODE, use PRE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Pin
Paul Conrad25-Jan-08 3:53
professionalPaul Conrad25-Jan-08 3:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.