Quantcast
Channel: SCN : Unanswered Discussions - SAP Crystal Reports, version for Visual Studio
Viewing all 2556 articles
Browse latest View live

Export and Navigation Buttons of crystal report toolbar are creating conflict with each on deploying in any browser.

$
0
0

Hi all,

 

     I am new in using ajax controls along with crystal reports. I am using AJAX Update Panel to hold all website relevant controls, have also placed crystal report viewer in Update Panel. Crystal report was bound at Page_Init() function and on Button click function. When deployed this website navigation buttons are showing result properly but export and print buttons don't show any result. For Export and Printing purpose I bound the report at Page_Load() function. After this activity print & export buttons work fine but navigation buttons just show first two pages and no more pages appear.

 

     Without Ajax controls all buttons of Crystal Report toolbar are working properly. Please help me out that how can I resolve this issue using AJAX Controls.

 

Regards,
Saeeda


Load report failed when it opens in the outside of VS.

$
0
0

Hello, I'm new to this forum.

I'm having a problem and the deadline of this project is this week.

The problem is appears when the project is nearly done.

The report is loaded completely in my VS 2010 where I make the project, and I'm about to running in the built version before the application will be used for the other clients.

FYI, I built them with a setup wizard.

And when I was about to click the print doc. this unexpected problem was appeared.

 

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

 

 

************** Exception Text **************

CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.

   at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)

   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)

   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

   --- End of inner exception stack trace ---

   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)

   at WindowsApplication1.Form5.Form5_Load(Object sender, EventArgs e) in D:\FEBRIAN\Monthly Report\New folder\report\report\Form5.vb:line 32

   at System.Windows.Forms.Form.OnLoad(EventArgs e)

   at System.Windows.Forms.Form.OnCreateControl()

   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

   at System.Windows.Forms.Control.CreateControl()

   at System.Windows.Forms.Control.WmShowWindow(Message& m)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

   at System.Windows.Forms.ContainerControl.WndProc(Message& m)

   at System.Windows.Forms.Form.WmShowWindow(Message& m)

   at System.Windows.Forms.Form.WndProc(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

I did some codes in the preview to sort the report by date button. I think this is just the problem of the path report, but I have no idea how to fix it.

And here is the code I applied to the BtnPreview.

 

Dim ReportKu As New ReportDocument               ReportKu.Load("..\..\CrystalReport4.rpt")               ReportKu.SetParameterValue("Start", dtpTanggalMulai.Value)               ReportKu.SetParameterValue("End", dtpTanggalSelesai.Value)        CrystalReportViewer1.ReportSource = ReportKu        CrystalReportViewer1.Refresh()

 

Also I did a formula in the report too. Here it is.

DateTimeValue({Start}) <= DateTimeValue({wwt.tanggal}) and DateTimeValue({wwt.tanggal}) <= DateTimeValue ({?End})

Any suggestions? Thanks in advance!

CR Runtime 32bits on Terminal Server 2008 R2

$
0
0

Hi,

We have the same program ( .Net x86 ) running on TSE and Win 7x64 environment, All are shared on PrintServer 2008R2.

We got this error only on TSE and not all time, the CR runtime is 32bit 13.0.15

Any ideas about the reason of error ?

Regards,

 

 

Type d'exception : System.ComponentModel.Win32Exception

Method : Void OnStartPrint(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintEventArgs)

Message : Descripteur non valide

Source : System.Drawing

Stack : à System.Drawing.Printing.StandardPrintController.OnStartPrint(PrintDocument document, PrintEventArgs e)
à System.Drawing.Printing.PrintController.Print(PrintDocument document)
à System.Drawing.Printing.PrintDocument.Print()
à CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)
à CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)
à CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, Boolean reformatReportPageSettings)
à OptionsCrystal.CrystalReportHelper.Print(Int32 nbEx)



this.SetConnection(this, this.oParams.Server, this.oParams.DataBase, this.oParams.UserLogin, this.oParams.UserPass);

//

if (this.HasSavedData)

    this.Refresh();

//---------------------------------------------------------------

PrinterSettings printerSettings = new PrinterSettings();

PageSettings pageSettings = new PageSettings(printerSettings);

 

 

if (!string.IsNullOrEmpty(this.printer))

{

    PaperSource ps = new PaperSource();

    ps.RawKind = this.bin;

    //                   

    pageSettings.PaperSource = ps;

    if (specialPage != null)

        pageSettings.PaperSize = specialPage;

    //

    printerSettings.PrinterName = this.printer;

    printerSettings.DefaultPageSettings.PaperSource = ps;

    //

    PrintDocument pDoc = new PrintDocument();

    ISCDReportClientDocument rcd = this.ReportClientDocument;

    this.PrintOptions.DissociatePageSizeAndPrinterPaperSize = true;

    if (pDoc.DefaultPageSettings.PaperSize.Height > pDoc.DefaultPageSettings.PaperSize.Width)

    {

        rcd.PrintOutputController.ModifyPaperOrientation(CrPaperOrientationEnum.crPaperOrientationPortrait);

    }

    else

    {

        rcd.PrintOutputController.ModifyPaperOrientation(CrPaperOrientationEnum.crPaperOrientationLandscape);

    }

}

printerSettings.Copies = (short)nbEx;

// ajout try catch arround reel Print 18/11/2015

try

{

    this.PrintToPrinter(printerSettings, pageSettings, false);

}

catch (InvalidPrinterException exc)

{

    OIError.ShowDialog(string.Format("Report :{0} sur :{1}", this.FileName, string.IsNullOrEmpty(this.printer) ? "Default" : this.printer), exc);

}

catch (Exception ex)

{

    OIError.ShowDialog(string.Format("Report :{0} sur :{1}", this.FileName, string.IsNullOrEmpty(this.printer) ? "Default" : this.printer), ex);

}

 

 

this.CloseConnection(this);










Does CRforVS_13_0_15.exe support Visual Studio 2015?

$
0
0

Hi,

 

I have VS 2015 Professional version installed on 64-bit Windows 8. I also have VS 2012 installed to support some legacy applications.

 

On install of the executable it hangs at the end (after cleaning up). I use task manager to kill it then when I run VS2012 I can see the editor is working (after all the 15 update supposedly uninstalls the previous version).

 

But I do not see the CR integration when clicking a *.rpt report in the VS2015 IDE.

 

That could be a result of the installer hanging and not completing the integration with VS2015. A bug. Is it something that can be fixed by a workaround or will it be addressed in the next update?

 

Thanks

Failed to load database information when connecting to SAP Cluster, Table

$
0
0

Hi,

 

We are using the .NET SDK and the SAP Crystal runtime for .Net v13.0.9.1312.

 

We are connecting to an SAP Cluster, Table or Function data source. The report works properly in the Crystal Report Designer.

 

When attempting to execute the report through the .NET runtime, we get the error:

 

"Failed to load database information"

 

The application is a .NET Web application running on ASP.NET 4.0.

 

We have used Process Monitor to capture traces but there was nothing to indicate any problem. Are there any specific security settings or permissions issues related to the database drivers for this data source that we need to be aware of?

 

Has anyone run into this issue before?

 

We are planning to upgrade to the latest service pack of the runtime but I am not sure this will resolve our problem.

 

Any help would be appreciated.

The document has not been opened.

$
0
0

Hi,

 

I get the following exception:

 

The document has not been opened.

 

when i initialize

 

ReportDocument reportDocument = new ReportDocument();

 

It worked in the test environment with no problems, however the error occurs on the live server where SAP Crystal Reports 2013 SP6 is installed.

 

I installed SAP Crystal Reports 2013 SP6 on the test environment and the error is replicated. Is there a way the get this to work without uninstalling SAP Crystal Reports 2013 SP6?



Refernces:

 

CrystalDecisions.CrystalReports.Engine version:14.0.3500.0

CrystalDecisions.Shared version:14.0.3500.0

 

Thanks.

Variable declaration

$
0
0

Hi,

In my report I've to declare lot of variables, initialize them and use them in report in text object. I don't want to create a formula for each variable declaration. I s there  a way, I can declare variables in one place?

 

Thanks in advance

Export report definition to text using the SDK

$
0
0

Hello:

 

In CR 11.0.0.895 there is an option to export a report to a text Report Definition, via: File -> Export -> Export Report, then select Format: Report Definition (TXT) as Destination: Disk file.

 

Is it possible to get the same functionality but programmatically using the .Net SDK? I couldn't find the export option corresponding to the Report Definition (TXT) format.

 

Thanks


Silent installation of CRRuntime_32bit_13_0_15.msi fails

$
0
0

Hi all, I am trying to deploy CRRuntime_32bit_13_0_15.msi silently to end users who use a third party applicaiton requiring the runtime.

 

When I try and run msiexec.exe /i CRRuntime_32bit_13_0_15.msi /qb /norestart the isntallation fails with "Installer terminated prematurely" and then "The Windows Installer Service cannot be accessed.  This can occur if the Windows Isntaller is not correctly installed.  Contact your support personnel for assistance",

 

But when I manully double click and next, next my way through the installation on the same machine all installs fine.

 

I know the Windows Installer Service is working fine as I can install any number of other applications to the same machine with similar command line calls.

 

For reference, the target computer is a Hyper-V based Windows 8.1 Enterprise 64-bit client.

 

I really need to be able to silently script the installation and ideally deploy through a GPO.

 

Please advise.  Kind regards,

Craig

Passing a parameter to Crystal Report in Visual Studio

$
0
0

I have a crystal report that I created outside of visual studio that I'm now trying to integrate into visual studio.

 

I added a new item to my project, and I chose a crystal report. I then selected the report to be an existing one.

CrystalReportImage.JPG

CrystalReportExistingReport.JPG

 

That created an item called CrystalReport1.rpt  to my project.

 

 

I then created a window form(frmview.cs) and added a CrystalReportViewer control and set it up so it uses my crystal report

SelectCrystalReport.JPG

 

The report works just fine, but I don't know how to pass a parameter to the report. The parameter is received utilizing a 3rd parties API and is in a class I created called SupplierContactInfo.cs.

 

Inside this class I can open the windows form that has the report using the following code:

CallingtheCrystalReportForm.JPG

 

But I don't know how to take the value in the string parameter SupplierID and pass it to the crystal report that's in my FrmViewer window form.

 

Any help would be greatly appreciated.

Are subreports stored in the parent report?

$
0
0

Hello:

 

I have a report (created by someone else) that uses a subreport. I have both rpt files, for the report and the subreport. I had to make some minor changes in the subreport - field sizes changes - and I did it by modifying the rpt file that contained the subreport. However, the changes were nowhere to be found when I ran Preview for the main report. I then used 'Edit Subreport' and it worked.

 

My question is this. Once a report is used as a subreport, is it embedded in the parent report and does it lose its "umbilical cord" :-) from the rpt file it was inserted from? Somehow my expectation was that the parent report references the subreport and at runtime it reads the subreport from the rpt file. I now think this is incorrect.

 

Thanks

32-bit MSI redistributable not installing all dlls referenced by Visual Studio project

$
0
0

I have a C# Console Application that I built in Visual Studio 2013 using the 64-bit Visual Studio Runtime Engine sp 15.  I am building the project in x86 meaning that the project is building in 32-bit.

 

 

My project is referencing the following Crystal Report libraries located in my win32_x86 directory

 

CrystalDecisions.CrystalReports.Engine

CrystalDecisions.ReportSource

CrystalDecisions.Shared

 

 

I installed the 32-bit MSI redistibutable on the client's machine. Afterwards, when I navigated to his win32_x86 directory, the only .dll file was:

 

CrystalDecisions.Data.AdoDotNetInterop.dll

 

I have the feeling that I will need to install Visual Studio 2013 as well as full Visual Studio Crystal Report Runtime Engine on the client's machine to get the libraries installed that my program references. Thoughts?

The report filename was empty

$
0
0

Sorry if this has already been answered. I checked other threads and I didn't really see a definitive answer to the problem.

 

When running my application and attempting to view a report I am receiving the error "the report filename was empty". I am using  VS 2010 SP1 with SAP Crystal Reports, version for Microsoft Visual Studio version 13.0.15.1840. My Crystal Reports used to be an older version (13.0.2000.000), recently upgraded it.

 

The reports have always worked but at some point something changed and now I'm getting this error both on my local machine and my development server. Not sure if this happened when i updated the CR for VS or not.

 

When I run the application it always breaks at the .load() method.

 

 

override protected void OnInit(EventArgs e)

    {

        base.OnInit(e);

        String rootPath = Server.MapPath("~");

        if (Session[FCCConstants.SESSION_FCC_ID] == null)

        {

            Response.Redirect("~/NeedYouthInfo.aspx");

            return;

        }

        String fccnum = Session[FCCConstants.SESSION_FCC_ID].ToString();

        int fccNumber = Int32.Parse(Session[FCCConstants.SESSION_FCC_ID].ToString());

        string reporttype = Request.QueryString["Reporttype"].ToString();

        DataTable dt = null;

 

        DataSet dsTablesBirthHistoryRpt = null;

 

       

        int noteType;

        switch (reporttype)

        {

          case "Birthhistory":

                dsTablesBirthHistoryRpt = Passport.GetYouthBirthHistoryInfo(fccNumber);

                dsTablesBirthHistoryRpt.Tables[0].TableName = "MPBirthDT";

 

 

                CrystalReportSource1.ReportDocument.Load(rootPath + "\\" + "Reports\\MP_Reports\\MPBirthThruEarlyChildhood.rpt"); <--FAILS HERE

                CrystalReportSource1.ReportDocument.Subreports[0].SetDataSource(dsTablesBirthHistoryRpt);

 

 

               

                Utils.ExportToPDF(CrystalReportSource1, Response);

                break;

 

 

}

 

The path is correct to the report. All the reports in the application fail at the same location. CrystalReportSource1.ReportDocument.Load(rootPath)

 

Any suggestions?

How to pass Date Parameter to SubReport

$
0
0

Hi,

 

In my VB.NET database, I am recording exam results for a class and print a report using Crystal Reports filtered by term periods.

There can be two or more exams per year.

 

Problem is that I cannot find a method to pass date range filter to sub report using report viewer

 

Main report contains the student info selected by StudentID that is passed as a parameter

Sub report contains the exam date and results information.


The exam dates are in tblClassEvent on subreport.


rptViewer.SetParameterValue("theID", m_theID)

 

DateRange is also passed into text fields

 

            Dim sTermPeriod As Object

            Dim sTermDays As Object

            sTermPeriod = rptViewer.ReportDefinition.ReportObjects("txtTermPeriod")

            sTermPeriod.Text = m_strTermStart & "   To: " & m_strTermEnd

            sTermDays = rptViewer.ReportDefinition.ReportObjects("txtTermDays")

            sTermDays.Text = m_iPosAtt

 

 

Please advise on either improving on this approach or provide an alternative more sensible approach

 

All help is appreciated.

RecordSelectionFormula not working after upgrade to Crystal Reports 2013

$
0
0

I am upgrading an application from CR v10 Developer in VS 2005 to CR 2013 in VS 2015.  My reports are running great with the exception of the RecordSelectionFormula.  It appears to be getting ignored.  The selection formula is working fine while in the designer. 

 

I downloaded CR 2013 and installed it.  I've downloaded and installed the CRforVS_13_0_15.exe from the download page.  The references in my project look like this:

 

screen1.jpg

After searching through other posts trying to find a solution, I've added a Refresh to my report which I wasn't doing before.  That didn't help.

I've tried hard-coding the selection string in the code to take my variables out of the equation.  That didn't help.

 

Any suggestions would be greatly appreciated!

Thanks

Terry


Change reports Datasource (sproc) at runtime

$
0
0

Hi folks,

 

I was advised to move this thread to this forum....

 

My report is designed to get the data from a stored procedure (sproc1) via the database fields from the field explorer. This has obviously been done at design time where the fields on the report match those that the sproc1 returns.

 

My question is can I change the report at runtime so that its gets its data from sproc2 instead of sproc1 ?

 

Both sprocs return exactly the same fieldnames / datatypes etc

 

I am using Visual Studio C# Win Forms with e mySQL back end.

 

 

 

J

C++ 2005 Redistributable Requirement

$
0
0

Back in Jul 2014, I asked the question about the C++ 2005 Redistributable and if a new Crystal Reports; Version for Visual Studio not requiring this redistributable; and the answer was hopefully by the end of 2015.

 

See my original discussion, same title on Jul 2015.

 

Do you know where this issue stands?

 

I need to know if I need to move from Visual Studio 2012, to a newer version of Visual Studio.

 

Thanks so much for any assistance you can provide.

 

V/r

 

Ray

report takes forever to load

$
0
0

when i show the report form using button,the form is show and it says "please wait while the document is processing"(this is take forever) there is nothing happen and it keep like that and the report is never shown

if i use the report form as startupForm(first form).the report is show


at first,if i show the report with button(no use the report form as startup form).everything is fine and the report is show.

but after one week not open the project the problem happen

 

sorry for my bad english

Issue With CRRuntime Prerequisites

$
0
0

Hello all,

 

     Using Visual Studio 2015 - CRRuntime Service Pack 15.    

     I used a Crystal Reports viewer in my project in Visual Studio. In the Publish tab for my project, I have setup CRRuntime as a Prerequisite, along with .NET 4.0 and Windows Installer 4.5. I then Published my project on my computer. I copied the three folders with the Packages information, included of course the product.xml file for each. I have done many other times with SKDs and had no issues. The application is set to "The application is available offline as well."

    

     When it's taken and the published installer is setup and run on a computer without CRRuntime, the program goes to try and download the MSI and automate the install, per usual. Once download, an error occurs stating "Setup has detected that the file %TEMPFOLDER%\Crystal Reports For .NET Framework 4.0\CRRuntime_32bit_13_0_15.msi has changed since it was initially published. Click OK to retry the download, or Cancel to exit setup."

 

     Now I realize, I could download and install the CRRuntime independently, but my program's installer should be able get it's Prereqs from online, like all of my other programs. I also could download both the CRRuntimes for 32-bit and for 64-bit, but I'd also then require .NET Framework 4.0, .NET Framework 2.0, Microsoft Data Access Components 2.8 and Windows Installer 4.5 in both 32-bit and 64-bit plus in the Server vs Workstation editions. To be in the Packages folder along with the installer. I know because I tried this and it works in all environments, but it takes my 8MB installer and turns it into 3.2GB installer, which is not really what I wanted.

 

     Isn't there an easy way to do this?

 

     I have even tried removing all installer checks from the product.xml and only allowing 64-bit install, but this gave the same error as before.

 

     Any and all help would be highly appreciated to save me from the Prereq hell, thank you in advance.

Impersonation, with web services and load report

$
0
0

Hello all,

I have this problem, I have a work around but I don’t like it. I’m a crystal reports user a long time ago.

I use web services to print reports from “same services in the web”. I have my report file in the database, if I don’t have the rpt file in the report folder under iis dir I extract the file from de database then open the report, change the database connection in runtime and print the reports. This works fine, but I have an issue that I can’t solve.

Sometimes I need to impersonate (in code) the user to the admin (normally in windows server 2008 or 2012, for example to get the installed printers in the system) and when I open the reports with the impersonate option have the “failed open the report”, “don’t have permission”… don’t have permission? Why ? What I do so solve the problem: undo impersonation then use load then impersonation again. Can anyone explain why ?


 

Dim oRpt1 AsNewReportDocument


oRpt1.Load(Nome_Mapa, OpenReportMethod.OpenReportByDefault)

 

This behavior is since crystal report for visual studio 2003 to now ….

Thanks in advance.

 

Jorge Rocha

Viewing all 2556 articles
Browse latest View live


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