on 07-26-2012 8:22 AM
Hi everyone
I am using Crystal Reports with Visual Studio 2010 and have the following problem:
When I create a group name field and start the program, generate the report everything works. Shows the grouping on the program. But if in the left hand panel with the tree drop down I click on one of the names of the group, everything stops and the app crashes and I get an error
"Value cannot be null" (null exception)
On show detail I get the
Cannot evaluate expression because the current thread is in a stack overflow state.
Without grouping everything works but that left sided panel is empty so there is nothing to click inside, there is a possibility it would crash if there was.
Even if I click on the text Preview, it crashes, so without clicking on the tree it crashes. Any text in the group tree side panel and it all breaks down.
Any idea why this is happening?
What SP for CRVS2010 are you using?
Can you copy in here your code?
Web, WPF or Win app?
- Ludek
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have no idea what service pack of crystal reports when I go to help it just says Crystal reports for .Net framework 4.
I am creating a WPF app. I have figured a sort of workaround, I just set the group panel not to show at all and the button as well. Would like to see a solution if possible.
Here is my code for the report. I use a dispatcher because of timing:
[code]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Inventar.Presenters;
using Inventar.Model;
using CrystalDecisions.CrystalReports.Engine;
using Inventar.UserControls;
using System.Collections.ObjectModel;
using CrystalDecisions.Shared;
namespace Inventar.Views
{
/// <summary>
/// Interaction logic for Report.xaml
/// </summary>
public partial class Report : UserControl
{
//CrystalReport1 report = new CrystalReport1();
CrystalReport1 report = new CrystalReport1();
public Report()
{
int ZoomLevel = 75;
try
{
InitializeComponent();
//ParameterFieldDefinitions crParameterFieldDefinitions;
//ParameterFieldDefinition crParameterFieldDefinition;
//ParameterValues crParameterValues = new ParameterValues();
//ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
//crParameterDiscreteValue.Value = textBox1.Text;
//crParameterFieldDefinitions = report.DataDefinition.ParameterFields;
//crParameterFieldDefinition = crParameterFieldDefinitions["StartDate"];
//crParameterValues = crParameterFieldDefinition.CurrentValues;
Dispatcher.BeginInvoke(new Action(() =>
{
crystalReportsViewer1.ViewerCore.Zoom(ZoomLevel);
report.Database.Tables[0].SetDataSource(Presenter.ListReport);
crystalReportsViewer1.ViewerCore.ReportSource = report;
}), System.Windows.Threading.DispatcherPriority.Background);
//report.SummaryInfo.ReportAuthor = Presenter.Login.Username;
}
catch (Exception ex)
{
MessageBox.Show("Doslo je do greske" + ex.Message);
throw new Exception(" and error is: " + ex.Message);
}
}
public ReportPresenter Presenter
{
get { return DataContext as ReportPresenter; }
}
private void Close_Click(object sender, RoutedEventArgs e)
{
Presenter.CloseReport();
}
//private void crystalReportsViewer1_Refresh(object source, SAPBusinessObjects.WPF.Viewer.ViewerEventArgs e)
//{
// Presenter.RefreshReport();
//}
}
}
[/code]
The dispatcher is there because I had some other issue with even starting up the report and that helped me solve them.
I have no idea what service pack of crystal reports when I go to help it just says Crystal reports for .Net framework 4.
Go here:
C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86
Look at any file / dll - they all should be version 13.0.4.x.
If they are not, get SP 4 from here:
http://scn.sap.com/docs/DOC-7824
- Ludek
Hi Ludek sorry for the late reply. I go here
C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64
And then right click on the file and go properties, then go to tab details and there I have
Product Version: 13.0.3.612
File version is the same. It's probably a stupid question but is this what you mean?
Hmm - not sure. The 32 bit vs 64bit should not be an issue - it's not for me anyhow. I tested with one of our sample reports and I get no issues at all. If you do the test with your report as "saved data", do you get the same issue?
Also, can you do a quick test with your report in the win viewer?
- Ludek
Well, I assumed there was nothing to address as Dino abandoned the Discussion after my last reply...
So, the question would be; is your issue identical? E.g.;
WPF App
Version of SP
32 bit app on a 64 bit OS
There have been a number of fixes released for the WPF viewer, so updating to SP 8 will be a good idea. If that does not work, then my questions for Dino would apply:
If you do the test with your report as "saved data", do you get the same issue?
Also, can you do a quick test with your report in the win viewer?
- Ludek
IM so sorry ludek I got swepped up in other things at my company and then I wasnt in the country and I just completely forgot about this.
AS a possible solution (although im not sure if i ever solved this and am remembering a different problem if im being honest) I would ask if there is an issue with your formula. My problem was some bug in a formula I was using in the report (the grouping formula as a matter of fact). the formula was working fine in 2012 but in ca for 2013 problems arose even though it didn't tell me. It went through. I had to go into the formula editor and then when I tried to exit and save it said I had an error. and it was an error that I could only solve by downloading the standalone version of cs and then correcting and saving the report in there. I posted another post for that problem and I can give you a link if you find that some formula field is causing the error.
ONce again sorry for the lateness of the reply.
Great news Steve.
Please note that we are tracking one more issue with the WPF viewer;
If you use tabs and there is a viewer on each tab, tabbing back and forth looses focus on the viewer. See this Discussion for more details. At this time, we're hopeful for SP 9 (March) to address the remaining issues, though last note I got from R&D was a bit "lukewarm"...
- Ludek
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.