Crystal report in wpf

hi i am new in WPF.
How to i can use crystal report in WPF?
is their any help..?

The documents tend to tell you to use odbc, this is a bad idea.
Don't just read the data in the report.
You want to get your data yourself and supply it to the report.
Build your report against a fixed table or stored procedure but don't use that directly when live.
If you have a datatable then that's probably the easiest option.
You want a source of data to design your report against and the simplest is a stored procedure or a table.
You can create a table temporarily for this, or even use xml but you need something concrete to design against.
A stored procedure should have only one output - use
Set Nocount on
Or you'll have two.
Build your report against that table or stored procedure ( the option to "see" stored procedures is a bit fiddly to find ).
You won't use that live though.
Print preview will involve the viewer, so you're going to put a crystal report viewer on a window or whatever.
And here's some code should give you an idea.
This is out an old asp.net application -  you will obviously not be using server mappath to find your report file.
protected void Page_Load(object sender, EventArgs e)
ReportDocument rd;
DataTable dt = (DataTable)Session["xxxData"];
// Tricky bit here is to make the name of the datatable match what the report expects
dt.TableName = "DataTable1";
rd = new ReportDocument();
rd.Load(Server.MapPath("Reports\\xxxReport.rpt"));
rd.SetDataSource(dt);
rd.Refresh();
CrystalReportViewer1.ReportSource = rd;
CrystalReportViewer1.RefreshReport();
CrystalReportViewer1.DisplayGroupTree = false;
I adapted someone's code for them to answer another question which ended up:
DataTable dt = new DataTable();
string connString = "data source=192.168.1.5; initial catalog=hrdata;uid=sa; password=1234";
using (SqlConnection con = new SqlConnection(connString))
con.Open();
SqlCommand cmd = new SqlCommand("ViewEmployeeNoR", con);
cmd.CommandType = CommandType.StoredProcedure; ..........
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
da.Fill(dt);
ReportDocument objRpt = new Reports.CrystalReportData1();
objRpt.SetDataSource(dt);
crystalReportViewer1.ReportSource = objRpt;
crystalReportViewer1.Refresh();
Please don't forget to upvote posts which you like and mark those which answer your question.
My latest Technet article - Dynamic XAML

Similar Messages

  • Crystal report (crystalReportsViewer) crash with null pointer exception

    Hi,
    My application are simple : m_crystalReportsViewer.ViewerCore.ReportSource = report; but in throw exception null pointer when I call showDialog.
    I see in code, we have method ShowTabHeader.
    private void ShowTabHeader(bool isShow)
        Grid child = VisualTreeHelper.GetChild(this.tabViews, 0) as Grid;
        TabPanel panel = child.FindName("HeaderPanel") as TabPanel;
        if (!isShow)
            panel.Visibility = Visibility.Collapsed;
        else
            panel.Visibility = Visibility.Visible;
    My problem :  child.FindName("HeaderPanel") as TabPanel return null
    =>  if (!isShow)
            panel.Visibility = Visibility.Collapsed;
        else
            panel.Visibility = Visibility.Visible;
    throws null pointer exception.
    Do you have any idea about this?
    Thanks.
    Here is stack trace :
    Unerwarteter Fehler im System ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at SAPBusinessObjects.WPF.Viewer.ReportAlbum.ShowTabHeader(Boolean isShow)
       at SAPBusinessObjects.WPF.Viewer.ReportAlbum.ItemsChangedEventHandler(Object sender, ItemsChangedEventArgs e)
       at System.Windows.Controls.Primitives.ItemsChangedEventHandler.Invoke(Object sender, ItemsChangedEventArgs e)
       at System.Windows.Controls.ItemContainerGenerator.OnItemAdded(Object item, Int32 index)
       at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
       at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
       at System.Collections.ObjectModel.Collection`1.Add(T item)
       at SAPBusinessObjects.WPF.Viewer.ReportAlbum.OnCreateNewDocumentViewComplete(CreateNewDocumentArgs args)
       at SAPBusinessObjects.WPF.Viewer.DelegateMarshaler.<>c__DisplayClass6`1.<Invoke>b__4(Object )
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       --- End of inner exception stack trace ---
    Edited by: duyhai707 on Jul 13, 2011 7:42 PM
    Edited by: duyhai707 on Jul 13, 2011 8:09 PM

    A lot I don't understand in here... actually, I don't understand anything in your post:
    When you call ShowDialog, what exactly are you trying to show?  The code is the decompiled showtabheader method of the viewer. So, are you trying to override the viewer control and reportalbum?  My guess is that the null reference is for the reportalbum's child object which is not the reportalbum object of the viewer.  I don't understand why the code since its all handled internally to the viewer anyhow.
    Perhaps searching the forum for code sample will help?
    Also, see the [WPF Demo|http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a09f7025-0629-2d10-d7ae-df006a51d1a8]
    Other good WPF resources to consult:
    http://www.redmondpie.com/incorporate-crystal-reports-in-a-c-wpf-application/
    http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a09f7025-0629-2d10-d7ae-df006a51d1a8
    http://www.codeproject.com/Tips/74499/Crystal-Report-in-WPF.aspx
    Re: Crystal Reports for Visual Studio 2010 - WPF Viewer for .Net 4.0
    http://codegain.com/articles/crystalreports/howto/incorporate-crystal-reports-in-wpf-using-c-sharp.aspx
    CRVS2010 Beta - WPF Viewer, how to hide the GroupTree control?
    Re: CRVS2010 Beta - WPF Viewer, how to hide the GroupTree control?
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Integration of Crystal Report Viewer in VS2010 WPF

    Hello,
    I google and research and founded that the viewer control is not attached with VS2010 so, we have to install it separately. I found it form here    [http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp].
    I installed "SAP Crystal Reports, version for Visual Studio 2010".
    Now, I want to add Crystal Report Viewer on my WPF Page. how can I do this ?
    I tried to find that control to add in toolbox but I didn't find it.
    Please can someone help me int this that how can I add that control and call the report to view in that and change the sql server dynamically for that crystal report.
    Bunch of thanks in advance, this would save me a lot....Appreciated any ones help.
    Thanks

    See [this|http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a09f7025-0629-2d10-d7ae-df006a51d1a8] demo and search these forums too.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Multiple instances of Crystal Reports Viewer possible in WPF?

    Hi, I've dragged and dropped three Crystal Reports Viewer controls on my WPF application. The goal is to be able to select up to 3 reports from a listbox and click run to generate the reports simultaneously. When I select just one report, it works fine. However when I select multiple reports it throws errors (object not found, etc). It seems there is a problem with multiple threads. Is it possible to have multiple instances of the Crystal Report Viewer display reports simultaneously? I am using version 13.0.9.1312 from the link below along with VS2013 C# WPF.
    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads
    Thanks,
    Syed

    I was able to quickly cobble together a two viewer app that looks like this:
    The code is like this:
    Public Sub New()
            ' This call is required by the designer.
            InitializeComponent()
            ' Add any initialization after the InitializeComponent() call.
            Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            crReportDocument.Load("C:\tests\formulas.rpt")
            CrystalReportsViewer1.ViewerCore.ReportSource = crReportDocument
            Dim crReportDocument2 As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            crReportDocument2.Load("C:\tests\report1.rpt")
            CrystalReportsViewer2.ViewerCore.ReportSource = crReportDocument2
        End Sub
    For more details see the document WPF Project Using the Crystal Reports WPF Viewer in 8 Easy Steps
    Now a couple of things to keep in mind;
    1) The report engine is based on 3 Concurrent Processor License (CPL) model. Meaning you can process at most three reports at the same time. In my test, doing the above code for four reports worked, but the reports are very, very simple - and with saved data. What a "real" world reports will do, I am not sure. I do know that in a web app, the reports are queued up until one report is done and thus a CPL is freed up. You will also need to keep in mind any database connection limits, etc.
    2) There is also a Print Job limit. This by default is set to 75. In a nutshell, almost anything done with a report is a Print Job. E.g.; paging, zooming, drilling, searching, etc., etc. In addition subreports are considered to be Print Jobs. Thus a report with one subreport in a detail section that returns a thousand rows of data and therefore running 1000 subreports will error out.
    You can read more about Print Job limits here:
    Crystal Reports Maximum Report Processing Jobs ... | SCN
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • WPF Styles and WPF Crystal Reports viewer

    Hi,
    We are currently developing a WPF application which will utilize Styles created with Expression Blend.
    Our environment is VS2010 SP1 and Crystal Reports for VS2010 SP2.
    We want to design our reports with Crystal Reports but we don't seem to find any documentation or topics about integrating WPF Styles with the current WPF Crystal Reports Viewer.
    So I was wondering if somebody here already tried to use WPF styles with the WPF CR Viewer.
    If so, how does it basically work?
    Thank you in advance.

    Hello Alan
    This morning I got a short note on the issue from Program Management. In a nut shell this is what they say:
    ..at this time the WPF viewer doesn't expose support for styles and the best thing will a post
    to the idea on [SAP IdeaPlace|SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]. Based on the interest level expressed there the PM group will make a decision on how best to proceed.
    Obviously, this is not going to be a swift process, but at least something...
    - Ludek

  • WPF Crystal report throws an exception when user tries to replace a file which is open during export of report.

    I am using the latest version of crystal report CRforVS_13_0_10 with Visual Studio 2013.
    I am working a WPF application and using the WPF crystalreportviewer control.
    The steps to reproduce the exception is ,
    1) Create a report.
    2) Export report with sample.xls  as file name
    3) Now open the sample.xls file in Excel
    4) Again export the report with sample.xls  as file name
    5) There is dialog which asks "Do you want to replace existing file sample.xls"
    6)Click "Yes"
    7) Now the exception will be thrown.
    This is System.IO.IOException which is thrown by crystal report  when user tries to save the file which is already opened by user. Also there is no event provided to handle Export_click for WPF CrystalReportViewer where I can handle this.

    I can replicate the issue. Not sure how we can hook into the System.IO process to capture the exception. I have not played with that part yet...
    I created my own export button and wrapped it in a try/catch and this is what I get:
    Which is what you would expect rather than a Null Exception error:
    We'll have to do more testing to see how or if System IO errors can caught outside of CR.
    Don

  • Error when startup WPF Application with Crystal Report !

    Hi!
    I have an error when build & run a WPF Application with Crystal Report. Can anyone help me ?
    First, I created 2 project, one is the WPF Application & one is Shell Start Up project (to show loading screen, then show main window when loaded, is WPF Application too)
    WPF Application:
    /// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window {
            public MainWindow() {
                InitializeComponent();
               // crViewer is SAPBusinessObjects.WPF.Viewer.CrystalReportsViewer
                crViewer.ViewerCore.ReportSource = new CrystalReport1(); // Assign report to viewer
    Shell Startup:
    [STAThread]
            public static void Main(string[] args) {
                AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
                Application app = new Application();
                ShowLoadingWindow(); // Show loading screen
                MainWindow mw = new MainWindow();
                mw.Show();
                app.Run();   
            static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
                // Exception was throw here
    And here is the exception & it's stack trace
    Message:  Object reference not set to an instance of an object.
    Stacktrace:
    at SAPBusinessObjects.WPF.Viewer.ViewerCore.<>c__DisplayClass1.<set_ReportSource>b__0()
       at SAPBusinessObjects.WPF.Viewer.DelegateMarshaler.<>c__DisplayClass29.<QueueOnThreadPoolThread>b__28(Object )
       at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

    As far as I know the error is typically due to the fact that I'm trying to address an object that has not been set. E.g.; this could be due to  bad scoping, bad inits/constructs, trying to access a member of a class without instance object and so on. I suspect this is a design \ code issue. You might be able to confirm this using [Process Monitor|http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx].
    Other than that, I'd recommend creating a phone case here:
    http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100?resid=S6I@hgoHAkEAAGsiyVkAAAAR&rests=1282226845369
    - Ludek

  • Crystal report Error for CRVS2010 sp2 using Push Method

    I am trying to pass a dataset to a crystal report viewer using SetDatabaseSource.
    I have defined in Crystal to used an ADO .Net Database XML Schema.
    I pass a Dataset to the Report By using SetDatbaseSourece and set the ReportSource for the CrystalViewer but I get the error that crdb_adoplus.dll does not exists.
    Note that Crystal is looking for crdb_adoplus.dll under subdirectory dotnet1.  It resides under win32_x86.
    Is this a Crystal Report Problem ?
    Is their any docuentation that show how to program for ADO xml dataset using crvs2010 ?
    The Error Reads
    System.IO.FileNotFoundException was unhandled
      Message=Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.
      Source=mscorlib
      FileName=file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll
      FusionLog==== Pre-bind state information ===
    LOG: User = WKST04\GARYB
    LOG: Where-ref bind. Location = C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll
    LOG: Appbase = file:///D:/S_and_G/LMS_DotNet/LMS_Solution/LMS/bin/Debug/
    LOG: Initial PrivatePath = NULL
    Calling assembly : (Unknown).
    ===
    LOG: This bind starts in LoadFrom load context.
    WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
    LOG: Using application configuration file: D:\S_and_G\LMS_DotNet\LMS_Solution\LMS\bin\Debug\LMS.vshost.exe.Config
    LOG: Using host configuration file:
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
    LOG: Attempting download of new URL file:///C:/Program Files (x86)/SAP BusinessObjects/Crystal Reports for .NET Framework 4.0/Common/SAP BusinessObjects Enterprise XI 4.0/win32_x86/dotnet1/crdb_adoplus.dll.
      StackTrace:
           at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
           at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
           at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
           at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
           at System.Reflection.Assembly.LoadFrom(String assemblyFile)
           at CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.DataSetProcessingDelegate(IntPtr arg)
      InnerException:

    Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel
    Crystal Reports for .NET Framework 4.0 (CRforVS_13_0_2)
    project WPF net 4.0
    crReport = new Reports.Buh.Cma.cr_balances_cma_move();
    using (DataTable tbl = new DataTable())
       using (SqlConnection cn = new SqlConnection(ConnectToDataBase.GetSqlConnectionString()))
             using (SqlCommand cmd = cn.CreateCommand())
                    cmd.CommandText = "proc_name";
                    cmd.CommandType = CommandType.StoredProcedure;
                    using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                            cn.Open();
                            da.Fill(tbl);
      crReport.SetDataSource(tbl);
      crReport.SetParameterValue(4, param["report_name"]);
      myDateTime.GetServerDate();
      crReport.SummaryInfo.ReportAuthor = App.GetPrintInfo();
      e.Result = crReport;
    erorr_message - Could not load file or assembly 'file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. Не удается найти указанный файл.
    help plz

  • Crystal Report 2008 export to text problem

    Hello,
    I am using Crystal Reports 2008 for generating reports in our WPF application. In this application, we are exporting the report to txt file on a button click. Now the application contains a form called u2018Print Manageru2019, through which the user can print the exported report(text files). Now the issue, when we try to the any of the exported report file through the application, the printer leaves alternate blank pages. The printer used in this case is DOT MATRIX EPSON LQ-1150II ESC/P2. We even tried printing the text file on HP Laser jet 4600, but the same issue is faced.
    Also, please note that when I try to read the exported txt file, a formfeed(u2018\fu2019 page break) character  can be seen  at the place where the printer leaves a blank page. Hence, my concern is, Is there any property of crystal report that I am missing on or is this a printer driver issue? But if it would have been a driver issue, then changing the printer might have solved the issue.
    I also  tried  doing u2018Keep Togetheru2019 property = false of all the sections of the report. Also, I found that the u2018New Page Afteru2019 property = true and disabled for the u2018Page Footeru2019 section. So I set u2018New Page Afteru2019 property = false programmatically as
    rdTest.ReportDefinition.Sections["Section5"].SectionFormat.EnableNewPageAfter = false;
    but no luck.
    If anyone has faced similar problem or have any clues, please help!
    Any kind of help in solving this issue will be highly appreciated.
    Thanks in anticipation!

    Good morning.
    We've got something to get straight first
    When you say "...from the Report Viewer. The report printed as expected on HP printer...", do you mean the viewer of the .NET app, or the viewer of the CR designer?
    And version 12.0.0.683, is very old (well as far as CR is concerned anyhow   ). That version is SP 1, we are now on SP 2. So that will be the place to start. Get to SP 2 which can be downloaded from here;
    https://smpdl.sap-ag.de/~sapidp/012002523100009038092009E/cr2008win_sp2.exe
    Ludek

  • Sub report parameter prompt appears when running Visual Studio 2008 with Crystal Reports 2008

    Post Author: relliott
    CA Forum: .NET
    If I build a simple Crystal Report that contains another simple Crystal Sub Report, the report will print preview fine in Crystal 2008.  The problem happens when add this report to a Visual Studio 2008 Web Application Project and I build and debug the application, the Crystal Viewer is prompting the user for the parameter used to link the sub report to the main report.  This should never happen as the user is not supposed to see this parameter.  If I type in some value for this sub-report parameter prompt, the Crystal Report Viewer gives an error message about not finding the field.
    I was having the same problem in Vs2005 with Crystal 10 which is why I upgraded.  Business Object's official fix for this problem was published under their KB article number c2018840 and c2019047.  These hot fixes ended up causing general exception errors in Visual Studio so I scrapped these solutions.
    Support had me install SP0 for Crystal 2008 (which did not fix it).
    Any ideas?
    Any help is greatly appreciated.
    Thanks,
    Rich Elliott

    Hi Bontrager,
    Thank you for posting in MSDN forum.
    According to your description, I agree with pvdg42's suggestion, so I suggest you can try pvdg42's suggestion to install the version of
    Crystal Reports 10.5 to check this issue again.
    Reference:
    http://forums.asp.net/t/1236730.aspx?Which+CR+version+is+in+Visual+Studio+2008+
    In addition, since this forum is
    to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. So if you have any issue about the
    Crystal Reports, I suggest you can ask the issue to the
    SAP Crystal Reports website:
    http://scn.sap.com/community/crystal-reports/content?filterID=contentstatus%5bpublished%5d~objecttype~objecttype%255bthread
    as pvdg42 pervious suggestion, it will be better support.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • VS2013 and Crystal Report Layout printing

    <p>Hi,</p><p></p><p>I use VS2013 and Crystal reports.&nbsp; In my program i also use direct print from the form (not by crystal reports).</p><p></p><p>When I first print a documten from a form,
    and then I take a printpreview from a crystal report, the lay-out is not correct.</p><p></p><p>As example I put 2 screenshots:</p><p>first correct - second after printing from form</p><p></p><p>I
    hope somebody can help me.</p><p></p><p>Thx</p><p><img alt="right" src="https://social.msdn.microsoft.com/Forums/getfile/564644" /></p><p><img alt="wrong" src="https://social.msdn.microsoft.com/Forums/getfile/564645"
    /></p>

    Hi Detleff,
    Thank you for posting in MSDN forum.
    Since this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio
    Editor. Based on your Crystal Reports printing issue, I’m afraid that it is not the correct forum for this issue. Therefore,
    I suggest you can ask your issue directly on SAP Crystal Reports:
    http://scn.sap.com/community/crystal-reports/content?filterID=content~objecttype~objecttype[thread]
    for better solution and support.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Crystal report not working when setup is made in VS 2010

    Hi, i am new to SAP Business objetcts as well as in this forum.
    I have made an application in VS 2010 (C# /WPF) and made its .exe file too.
    The Crystal reports are working fine when i am running from Visual Studio.
    But it gives error message while i am running the .exe.
    I have made the .exe as normally we do.
    Please help me out.
    Regards.

    Adam assumed you were using Enterprise as the thread was posted to the ".NET - SAP BusinessObjects Enterprise, SAP BusinessObjects Edge, SAP Crystal Reports Server" forum.
    Since you are using WPF viewer, I'm pretty sure this is not the case.
    I am not sure how you are loading the report, so a code snippet from your app will help. Also, in your code as a test, hard code the path to the report. Does that work?
    Looking at the [WPF|http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a09f7025-0629-2d10-d7ae-df006a51d1a8] demo is going to be worthwhile also.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Visual basic with crystal report 8.5 error on reporting

    i am dvelping a program base on accounting
    Connection Using ADODB through record set...
    when view the report through compiler using run vb project method the data show is ok but when run application through MDi form the crystal report show blank data...
    my code in mention below
    plz help
    Dim Ac2 As String
    mDATE1 = Format(DTP.Value, "MM/dd/yy")
    mDate2 = Format(DTP1.Value, "MM/dd/yy")
    Ac2 = TxtCode.Text
    Set Rs = New ADODB.Recordset
    Rs.Open "delete * FROM tmp1", Con, adOpenKeyset, adLockPessimistic
    Set Rs1 = New ADODB.Recordset
    Rs1.Open "select  (opdr),(opcr) FROM acoding where acode= '" & TxtCode.Text & "'", Con, adOpenKeyset, adLockPessimistic
    Set Rs2 = New ADODB.Recordset
    Rs2.Open "SELECT Sum(dr)-sum(cr) as opening from ledger where date < # " & mDATE1 & "# and pcode = '" & TxtCode.Text & "'", Con, adOpenKeyset, adLockPessimistic
    Set Rs3 = New ADODB.Recordset
    Rs3.Open "select* FROM ledger WHERE DATE BETWEEN #" & mDATE1 & "# AND # " & mDate2 & " # AND pcode between '" & TxtCode.Text & "' AND '" & Ac2 & "'", Con, adOpenKeyset, adLockPessimistic
    Set Rs = New ADODB.Recordset
    Rs.Open "select * FROM tmp1", Con, adOpenKeyset, adLockPessimistic
        If Rs2.RecordCount <> 0 Then
            DR1 = IIf(IsNull(Rs2!opening), 0, Rs2!opening) + IIf(IsNull(Rs1!OpDR), 0, Rs1!OpDR) - IIf(IsNull(Rs1!OpCR), 0, Rs1!OpCR)
            Rs.AddNew
            Rs!Des = "OPENING BALANCE"
            Rs!pcode = TxtCode.Text
            Rs!DR = IIf(DR1 > 0, DR1, 0)
            Rs!cr = IIf(DR1 < 0, DR1 * -1, 0)
            Rs.Update
        Else
            Rs.AddNew
            Rs!Des = "OPENING BALANCE"
            Rs!pcode = Rs2!pcode
            Rs!DR = IIf(IsNull(Rs1!OpenDR), 0, Rs1!OpenDR)
            Rs!cr = IIf(IsNull(Rs1!OpenCR), 0, Rs1!OpenCR)
            Rs.Update
            End If
    If Rs3.RecordCount > 0 Then
        While Not Rs3.EOF
                Rs.AddNew
                Rs!pcode = Rs3!pcode
                Rs!vtype = Rs3!vtype
                Rs!VNO = Rs3!VNO
                Rs!DR = IIf(IsNull(Rs3!DR), 0, Rs3!DR)
                Rs!cr = IIf(IsNull(Rs3!cr), 0, Rs3!cr)
                Rs!Date = Rs3!Date
                Rs!Des = Rs3!Des
                Rs.Update
        Rs3.MoveNext
        Wend
        End If
    cr.ReportFileName = App.Path & "\reports\latif.rpt"
    cr.WindowState = crptMaximized
    cr.Action = 1
    end sub
    through Debug mod data all data is show but
    when run without debug mod  crystal report show data blank..
    proceed is that
    vb6 delete tem1 table from access
    opening sum from ledger table
    opening sum form A/C coding table
    first add opening in tem1 table
    then add all sepsfic data from ledger table to temp table
    after that data show in crystal report
    kindly Help

    Hello,
    Thank you for your post.
    Based on your description, I am afraid that the issue is out of support of VS General Question forum which mainly discusses
    WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    I suggest that you can consult your issue directly on SAP Crystal Reports:
    http://scn.sap.com/community/crystal-reports/content?filterID=content~objecttype~objecttype[thread]
      for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Where is the parameter panel on the embedded Crystal Report preview in Visu

    Where is the parameter panel on the embedded Crystal Report preview in Visual Studio?
    I found a tweet on google about this.. but the link is invalid.. and I could not find the article on SDN.
    KB #1486469 - Where is the parameter panel on the embedded Crystal Report preview in Visual Studio? http://tinyurl.com/22thlcg
    How do I the show parameter dialog in either WPF or Winforms viewer of Visual Studio 2010.
    Parameters are not even visible in the Parameters Side panel. It is empty too..
    I see two classes ParameterPrompting and ParameterPrompt both, on initialization throws exception.. even to manually invoke them...
    Is it permanently removed?

    Hello,
    Seems like a reported Bug.
    Please check:
    Re: CRVS2010 - Hide Group Tree and Parameter Panel
    A possible woraround but you need to change as per your need:
    CRVS 2010 BETA - WPF Viewer - How to hide SidePanel?
    Hope it helps.
    Thanks.

  • Crystal Reports Visual Studio 2010 SP2 Fixed issues

    Hi All,
    Here is the list with fixed issues in Crystal Reports Visual Studio 2010 SP2
    http://www.crystaladvice.com/crystalreports/crystal-reports-2010-sp2
    The following list with issues is fixed:
    1566763 - CRVS2010 WPF Viewer error; "System.NullReferenceException was unhandled" PageControl.OnMouseMove
    1540637 - Error: External component has thrown an exception. Launching the Database Expert in the embedded Crystal Reports designer in Visual Studio
    1544675 - Error; 'Object reference not set to an instance of an object' when using the CR WPF viewer in VS2010
    1578823 - CRVS2010; "Load Report Failed" error when Report is open in any full version of the CR Designer
    1638191 - Using RTL language (Arabic) the CR viewer Group Tree Panel does not display RTL
    1631283 - Error; 'Failed to load database information' when reporting off of file system data
    1553469 - How to enable Database logging in Crystal Reports for Visual Studio 2010
    1299185 - Error: Operation not yet implemented or Failed to Export, when exporting a Crystal Reports to Text format
    1451960 - Null or empty values are not surrounded with delimiter when exported to CSV format
    1659185 - The special Crystal Reports field, 'File Name and Path' shows temp path and temp name when viewing a report
    1452648 - Dynamic Cascading Parameter prompts two times when using the Crystal Reports in VS .NET
    1580338 - When refreshing a report that contains a linked subreport report takes long time to execute
    1659111 - GCHandle left in memory for each open and close of a Crystal Report in VS2010 application
    1356672 - Crystal Reports special field "File Path and Name" displays incorrect information in a Visual Studio .NET application
    1593658 - Impersonation of database Log On credentials failure in report generation when set at runtime in a .NET application
    1661239 - Summary fields are converted to String fields
    1661276 - Using the Crystal Reports SetTableLocation method in VS .NET causes long report processing delays
    1661200 - Not able to copy text from report objects using the Crystal Reports WinForm viewer for VS .NET
    1631722 - Date function in a Selection Formula is removed when running a report in a VS .NET application
    1525822 - Exception "Object reference not set to an instance of an object." thrown when clicking on Parameter Panel button in Crystal Report .NET Windows Form Viewer
    1603082 - Cross-tab background colors not retained when exporting a report to PDF format
    1603154 - Shared variable display the incorrect value in Crystal Reports
    1427747 - Why does a CR .NET SDK web app have problems running on IIS 7 in integrated pipeline mode?
    1545536 - Alignment set to Justify causes broken underline
    Source: Resolved Issues in Service Pack 2 for Crystal Reports for Visual Studio 2010
    With kind regards,
    Pieter Jong
    Crystal Advice
    http://www.crystaladvice.com

    Many thanks for the link Pieter.
    I recently created a wiki that lists all of the fixes, their tracking numbers, associated Kbase numbers, Kbase titles and links to the kbases:
    http://wiki.sdn.sap.com/wiki/x/tgK3Dw
    It's 90% complete. I think I have a few Kbases to do to complete it.
    Now that I think about it, I'll also add the link to the [sticky thread|SP 2 for Crystal Reports for Visual Studio 2010 released!; re. SP2 release.
    - Ludek

Maybe you are looking for