Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Problems to assign datatable (from dataset) to subreport

$
0
0

Hi all.

 

I am having a lot of problems with all my reports that contains any subreport/s (only crashes in client´s machines, not development machine), Due this reports are a bit complex, ill try to make a new simple report with a subreport to see if it works but i had no results, and the problems is that i dont receive any message error, the program just crashes. I looked up for a solution and any of it works for me, The most common problem with subreports is that the sql query of the subreport and dataset are different, in my case are the same and the report its too simple to crash the application.

 

 

 

Here is the dataset that is assigned to the subreport:

 

Dim _dsld As DataSet = iCalc.SelectSql("select CR.pr_id,cr_id from corridas as cr inner join prestamos as pr on pr.pr_id=cr.pr_id where pr_nombre='" + CBOPrestamo.SelectedValue + "'")

 

 

                Dim rep_ As New CRPrueba

                rep_.Subreports("CRPruebaSub.rpt").SetDataSource(_dsld.Tables(0))

 

 

                rep_.SetParameterValue("pr_nombre", CBOPrestamo.SelectedValue)

             

                CrystalReportViewer1.ReportSource = rep_

 

Here is the subreport command:

 

select CR.pr_id,cr_id from corridas as cr inner join prestamos as pr on pr.pr_id=cr.pr_id where pr_nombre='{?pr_nombre}'

 

If i dont assign a dataset (datatable) to the subreport and insted of it i put the name of the loan, the subreport doesnt crashes, then the problem is at the moment of the dataset assignment to the subreport but i dont understand why crashes, in fact, i dont understand why reports that i dont made a change are crashing the application when it does not happened before.

 

I hope you can help me because if i can´t solve it,I'll have to make the reports without subreports (increasing the complexity of the reports)

 

Thanks in advance 


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>