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

crystal reports

$
0
0

I need to print 2 copies on the same report automatically. the user will click print but they don't want too enter 2 for two copies crazy I know but urgent. Please advise>>>

 

i remember:

     gReportDoc.PrintToPrinter(2, True, 0, 0)

from a few years ago but I forgot where I put it in the report


crystal reports runtime engine for .net framework for development

$
0
0

Hi ,

 

Can someone advice where can i find sap crystal reports runtime engine for .net framework  for development.

which can i excute  this code succssfully ,

 

 

static void Main(string[] args)

        {

            RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\SAP BusinessObjects\Suite XI 4.0\Report Application Server\Server\LocalConnectionMgr");

            string tempFilePath = key.GetValue("ReportDirectoryPath").ToString();

            string tempFile = tempFilePath;

         

            tempFile = tempFilePath + "\\Agents Above or Below Standard- by Form.rpt";

            ReportClientDocument crystalReport = new ReportClientDocumentClass();

            object path = (object)tempFile;

            //write file to temp folder

           

            crystalReport.Open(ref path, 0);

            //WriteFileToDisk(rptFile.tblRptFile.FindByiRptID(templateData.tblTemplate[0].iRptID).imgReport, tempFile);

           

        }

 

 

Thanks

Fade ismaeel

How does a UFL function return a date range?

$
0
0

We have some very old UFLs that we're considering rewriting in C#. Some of the functions in the UFLs return a Date Range. Is this supported in the COM/.NET world? If so, what data type is used to return a Date Range?

 

Thanks

 

- rick cameron

Crystal reportsError in output window Visual Studio 2013

$
0
0

Hi, I am using Crystal Reports in Visual Studio 2013 (WPF MVVM pattern).

 

In my report viewer, the code that binds to the report viewer is -

 

<ContentControl Grid.Row ="1" Content="{Binding Path=ReportViewer}" >

 

In the view model, this is the code that creates the Report Viewer -

 

       
    public ReportViewerModel(ReportDocument report, string reportName)
    {
        ReportViewer = new CrystalReportsViewer();
        myReport = report;
        _reportName = reportName;      
        ReportViewer.ViewerCore.ReportSource = report;      
    }
       
               

 

I get the following errors in my output window every time the report viewer is loaded

 

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnOpen'); target element is 'Button' (Name='btnOpen'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnPrint'); target element is 'Button' (Name='btnPrint'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnRefresh'); target element is 'Button' (Name='btnRefresh'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnExport'); target element is 'Button' (Name='btnExport'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnCopy'); target element is 'Button' (Name='btnCopy'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='ToggleButton' (Name='btnToggleSidePanel'); target element is 'ToggleButton' (Name='btnToggleSidePanel'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnPrevPage'); target element is 'Button' (Name='btnPrevPage'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name='btnNextPage'); target element is 'Button' (Name='btnNextPage'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name=''); target element is 'Button' (Name=''); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=ToolTip; DataItem='Button' (Name=''); target element is 'Button' (Name=''); target property is 'Name' (type 'String')

 

What am I doing wrong? Appreciate any tips!

 

Thanks,
Sharon

Moved Servers - log4net could not be loaded error

$
0
0

My code programmatically creates crystal reports.

 

Everything was working fine until we moved servers (unfortunately don’t have access to the old server anymore)

 

Get the dreaded error about log4net 1.2.10 that could not be loaded.  (Other assemblies in my solution rely on 1.2.11, so can’t just take it out)

 

I installed (repeatedly uninstalling the other and restarting the server)  the CRforVS_clickonce_13_0_9 32bit and 64 bit versions.

 

My application pool is set to allow 32bit applications.

I checked an do have log4net 1.2.10 in the GAC

 

Really out of things to try here and need fix this urgently for a demo to important client tomorrow (it’s midnight..make it today!)

 

For what it matter:

 

Development Machine (all fine here)

Windows 7, 64 bit

Visual Studio 2012

Crystal Reports 2012

 

Production Machine

Windows Server 2008, 64 bit

 

Full error (but guess you know it well)

Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


Crystal Reports Basic for Visual Studio 2008 製品登録について

$
0
0

visual studio 2008 professional editionに付属している

Crystal Reports Basic for Visual Studio 2008

製品の登録を促すダイアログが表示されますが、

10桁の登録番号の取得方法がわかりません。

Crystal Reports

$
0
0

I need to print 2 copies on the same report automatically. the user will click print but they don't want too enter 2 for two copies crazy I know but urgent. Please advise>>>

 

i remember:

     gReportDoc.PrintToPrinter(2, True, 0, 0)

from a few years ago but I forgot where I put it in the report

Crystal report viewer 13 are displaying blank page after deploying in web server

$
0
0

Dear friends, i have designed crystal report (in VS2012 &  CRRuntime_32bit_13_0_8 installed in web server) it's working fine in machine VS2012, but when deploying in web server (Windows Server 2008 R2 64bit) it's getting blank page.

I have read the http://adilmca.wordpress.com/2013/04/08/visual-studio-2012-crystal-report-not-working-on-windows-server-2012-0x800a1391-javascript-runtime-error-bobj-is-undefined/. But this is not working for me.

I have copy the entire Crystal Report Support folder : C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13

Please suggest me some solutions to resolve this issues...

Regards, Stefano S.


The maximum report processing jobs limit configured by your system has been reached.

$
0
0

Hi,

We are using Crystal report in ASP.NET (Microsoft .NET 3.5) environment for a number of years but everything went quite well.

But recently, we have migrated to .NET 4.5 ,and started having this error.

"The maximum report processing jobs limit configured by your system has been reached."

 

As per internet search, some recommended to use the Object.dispose() approach. We have applied recently ,and it is still NOT working

 

Our JobLimit in the registry on production server is 75.

 

 

This is report display

ReportDisplay.PNG

 

This is report dispose

ReportDispose.PNG

 

Seeks your technical expertise here  thanks in advance.

What is the max Data size that can be converted to PDF using CR 2008 SP5

$
0
0

Hi All,

 

When I supply more data to convert to PDF using XML data source I get exception on converting the stream

 

Exception :

Error generating PDF. Exception:Object reference not set to an instance of an object.

   at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

   at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)

 

But it works with smaller size like 50-60K of data.

 

I searched about the exception and the results were mentioning about wrong placement of runtimes.

 

But my doubt is if the problem is with runtimes then why it works with less data?

 

Thanks.

Crystal Reports hangs indefinitely on refresh after export/print.

$
0
0

I'm using Crystal Reports for VS 13.09 on an IIS 7 server. The application works fine except for in this one scenario. I can print or export fine, and I can refresh fine, but if I print or export and then try to refresh the "Please wait while the document is being processed." box comes up and never goes away. After printing/exporting I can still use the breadcrumb links and forward/back buttons with no problems, it's just refresh that causes issues.

 

Here is the ASPX I'm using:

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ViewReport.aspx.cs" Inherits="Intranet.ViewReport" %>

 

<%@ Register Assembly="CrystalDecisions.Web, Version=14.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

 

<!DOCTYPE html>

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <meta http-equiv="X-UA-Compatible" content="IE=9,chrome=1" /> 

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

    <div>

        <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" Width="960px" HasRefreshButton="True" HyperlinkTarget="_blank" />

    </div>

    </form>

</body>

</html>

 

And here is the code:

 

using CrystalDecisions.Enterprise;

using CrystalDecisions.ReportAppServer.ClientDoc;

using IBM.Data.Informix;

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

 

 

namespace Intranet

{

    public partial class ViewReport : System.Web.UI.Page

    {

        protected Connections sqlObj = new Connections();

        EnterpriseSession myEnterpriseSession;

        ReportClientDocument myReportDocument;

 

 

        protected void Page_Load(object sender, EventArgs e)

        {

            if (IsPostBack)

            {

                CrystalReportViewer1.ReportSource = (ReportClientDocument)Session["myReportDocument"];

            }

            else

            {

                BindingUsingReportAppFactory();

            }

        }

 

        void BindingUsingReportAppFactory()

        {

            try

            {

                Session["ReportPath"] = Request["ReportPath"];

                Session["Logon"] = Request["Logon"];

 

                myReportDocument = LoadReport(Session["ReportPath"].ToString());

                if (Request.UrlReferrer.ToString().Contains("/salesintranet.aspx"))

                {

                    string selectionText;

                    selectionText = myReportDocument.DataDefController.RecordFilterController.GetFormulaText();

 

                    if (selectionText != null)

                    {

                        int asteriskPos = selectionText.IndexOf('*');

                        if (asteriskPos > 0)

                        {

                            selectionText = selectionText.Substring(0, asteriskPos) + Session["Logon"] + selectionText.Substring(asteriskPos, selectionText.Length - asteriskPos);

                            myReportDocument.DataDefController.RecordFilterController.SetFormulaText(selectionText);

                        }

                    }

                }

 

                Session["myReportDocument"] = myReportDocument;

                CrystalReportViewer1.ReportSource = (ReportClientDocument)Session["myReportDocument"];

                LogReport('Y');

            }

            catch (Exception ex)

            {

                LogError(ex);

                LogReport('N');

                Response.Write("<html><body><h3>Request failed.</h3>");

                Response.Write("The document could not be loaded.<br />Please hit back to try again.<br />");

                Response.Write("If you are still unable to load the report, please contact IT.</body></html>");

                Response.End();

            }

        }

 

 

        ReportClientDocument LoadReport(string reportPath)

        {

            SessionMgr mySessionMgr = new SessionMgr();

            myEnterpriseSession = mySessionMgr.Logon("XXXX", "XXXX", "XXXX", "XXXX");

            EnterpriseService myEnterpriseService = myEnterpriseSession.GetService("InfoStore");

            InfoStore myInfoStore = new InfoStore(myEnterpriseService);

            myEnterpriseService = myEnterpriseSession.GetService("RASReportFactory");

            Object rrfObject = myEnterpriseService.Interface;

            ReportAppFactory myReportAppFactory = (ReportAppFactory)rrfObject;

 

            string query = "Select SI_ID from CI_INFOOBJECTS WHERE SI_NAME LIKE '" + reportPath + "'";

            InfoObjects myInfoObjects = myInfoStore.Query(query);

            InfoObject myInfoObject = myInfoObjects[1];

 

            return myReportAppFactory.OpenDocument(myInfoObject.ID, 0);

        }

 

Any suggestions on what might be the problem here?

Getting CR to display fields from stored procedure

$
0
0

So I have a simple crystal report, that basically has headings for the data.   The data is based upon a stored procedure.  Initially my stored procedure was simple, just consisted of a basic query returning data.  Thus i was able to drag fields from my stored procedure onto my Crystal report, to place where I wanted the data displayed.  However, I have modified my stored proc and made it a bit more complex.  The stored procedure now has an input parameter.  So when i re-added the store procedure, CR created the input parameter, that I then used in an 'record selection formula'.  However, I can no longer see the individual field names, that the stored procedure will return.  How do I get them to show up, so I can place them on my report?

 

thanks

Export to PDF change default "Save As" file name

$
0
0

Hello,

 

I have an asp.net application where I use a CrystalReportViewer. The user runs the report via the application.  They then click on on the the Export button in the viewer with PDF as the format.  This launches the PDF file.  When I click the Save icon, the Save As dialog box comes up.  The default name in this window is the name of the .aspx file.  I want to be able to specify what this file name should be instead of it defaulting to the name of the asp page in which the report was launched.

 

I do not want to recreate the Export button, I am trying to find a way to do this with existing crystal functionality.  Can anyone please help??  Thank you!!

Crystal Reports Editor and Visual Studio Professional 2013

$
0
0

Hello,

 

We recently purchased Visual Studio 2013 Professional to perform some updates on a desktop application for one of our clients. This particular desktop application has a number of Crystal Reports inside of it and we need to be able to edit them.

 

We were previously using Visual Studio 2012 Premium on a trial basis with Crystal Reports for Visual Studio SP7 and everything worked fine, but when we upgraded to 2013 we lost the ability to edit the reports.

 

Crystal Reports - VS2013.jpg

I read across a number of articles that Crystal Reports for Visual Studio 2013 is unavailable until March 2014 but then I came across this post: Re: Is SAP Crystal Reports, dev version for VS2013 Available?.

 

As per that form post, Service Pack 8 should support Visual Studio 2013 but even after we installed SP8 we still get the screen above.

 

Are we missing something while setting this up? Or is Visual Studio 2013 still unsupported? If it is still unsupported, when will support come?

 

Thank you for your help,

 

 

Wes H.

Crystal needs user and password.

$
0
0

When I run my program in the same laptop that I have devoloped my application I dont have problems, but when I try run the application in another laptop I have problems with user and password.

In my application, into load event of my report I have read this sentence.

report.SetDatabaseLogon(UsuarioSQL, ClaveSQL, MaquinaSQL, BaseDatosSQL, True)


Any idea, please?


Thanks in advance.


Setting the sql statement

$
0
0

http://www.egbolig.dk/drift_bo_syd.rpt (HERE IS THE REPORT)

 

We are using SAP Crystal Report .NET Runtime files (http://scn.sap.com/docs/DOC-7824 newest version 13.0.9.1312) in our web asp.net application. Everything have been working fine, but we have can into problems when showing the certain kinda reports.

In our code get the reports sql statement using getSQLStatement.

Dim gp As New GroupPath() Dim sql As String = report.ReportClientDocument.RowsetController.GetSQLStatement(gp)

This will get the sql, and we use this sql (getSqlStatement) and attach a sql WHERE clause from the code to only get a certain number of records.

The report Drift_bo_syd.rpt has 5 tables, and the following sql statement. 

Database/Show Sql Statement

SELECT "rekvstam"."Sel", "rekvstam"."Afd", "rekvstam"."Levadresse", "rekvstam"."Rekvisition", "rekvstam"."Lejemaal", "rekvstam"."Lejer", "rekvstam"."Udfoertaf", "rekvstam"."Udfoertdato", "rekvstam"."Krit", "Selskab"."Adresse", "Selskab"."Postby", "Selskab"."Tlf", "Selskab"."Fax", "rekvstam"."Kontor", "rekvstam"."Hjemme", "rekvstam"."Rekvdato", "rekvstam"."Aftale", "rekvstam"."InitialRet", "rekvstam"."Arbejde", "kreditor"."Att", "rekvstam"."Konto", "Selskab"."Navn", "Selskab"."Email", "Interessentadresse"."Navn", "Interessentadresse"."Adresse", "Interessentadresse"."Postby", "Interessentadresse"."Email1", "Interessentadresse"."Telefon_Fax", "Interessentadresse"."Type", "Interessentadresse"."Tlf1", "rekvstam"."tlfLejer", "kreditor"."Kred", "Interessentadresse"."Interessentnr" FROM  (("Rekvstam" "rekvstam" INNER JOIN "Selskab" "Selskab" ON "rekvstam"."Sel"="Selskab"."Sel") LEFT OUTER JOIN "Kreditor" "kreditor" ON "rekvstam"."Kred"="kreditor"."Kred") INNER JOIN "Interessentadresse" "Interessentadresse" ON "kreditor"."Interessentnr"="Interessentadresse"."Interessentnr" WHERE  "Interessentadresse"."Type"='K' 

But if we run the report from our asp.net code, we get the following error: 

Cannot determine the queries necessary to get data for this report. Failed to retrieve data from the database. Error in File Drift_Bo_Syd {97FED382-1BAC-4DB1-970F-9E098ECE28F1}.rpt: Failed to retrieve data from the database.

 

After a long time searching for a solution, we found out that if we place the column kred from the kreditor table on the report, the report will work. (field explorer / database fields / kreditor (table) / kred (column)

 

Very important is that the field "kreditor.kred" is a primary key of the table kreditor, and also used in the linking.!

 

(We can get the report to work if we call the sql statement with the "kreditor"."kred" in the SELECT statement.

 

SELECT "kreditor"."kred", "rekvstam"."Sel", "rekvstam"."Afd", "rekvstam"."Levadresse", "rekvstam"."Rekvisition", "rekvstam"."Lejemaal", "rekvstam"."Lejer", "rekvstam"."Udfoertaf", "rekvstam"."Udfoertdato", "rekvstam"."Krit", "Selskab"."Adresse", "Selskab"."Postby", "Selskab"."Tlf", "Selskab"."Fax", "rekvstam"."Kontor", "rekvstam"."Hjemme", "rekvstam"."Rekvdato", "rekvstam"."Aftale", "rekvstam"."InitialRet", "rekvstam"."Arbejde", "kreditor"."Att", "rekvstam"."Konto", "Selskab"."Navn", "Selskab"."Email", "Interessentadresse"."Navn", "Interessentadresse"."Adresse", "Interessentadresse"."Postby", "Interessentadresse"."Email1", "Interessentadresse"."Telefon_Fax", "Interessentadresse"."Type", "Interessentadresse"."Tlf1", "rekvstam"."tlfLejer", "kreditor"."Kred", "Interessentadresse"."Interessentnr" FROM  (("Rekvstam" "rekvstam" INNER JOIN "Selskab" "Selskab" ON "rekvstam"."Sel"="Selskab"."Sel") LEFT OUTER JOIN "Kreditor" "kreditor" ON "rekvstam"."Kred"="kreditor"."Kred") INNER JOIN "Interessentadresse" "Interessentadresse" ON "kreditor"."Interessentnr"="Interessentadresse"."Interessentnr" WHERE  "Interessentadresse"."Type"='K'

 

But it should not be necessary to include this field (which is the primary key and used in linking the report) in the sql statement,
BECAUSE it is not used in the report. So maybe this is a bug?

 

It has not been necessary in RDC Crystal Report or RAS Crystal Report in a classic asp envoriment.

 

Here is the code we use to set the reports SQL Statement)

 

Try
Dim conn As New SqlConnection(connString)
conn.Open()
Dim sd As New SqlDataAdapter(New SqlCommand(nySQL, conn))
Dim ds As New Data.DataSet()

 


Dim navn As String = report.Database.Tables.Item(0).Name
sd.Fill(ds, navn)
report.SetDataSource(ds)
conn.Close()
Catch ex As Exception
Throw
End Try

Designing column wise report

$
0
0

Hi,

 

I am newbie in Crystal report. I stuck into a design problem of crystal report. I would like to design a report as per the desired-report.png (attached).

My dataset is like report2.xml and relationship specified in relationship-diagram.png (attached)

 

The problem is crystal report make the Cartesian product of these two table which result in several rows. I am using .Net windows application to build this report.

 

Could anyone please suggest how to design this type of report ?

 

Existing thread for complete detail Multi Column report

 

Could anyone please help ?

ThreadAbortException when using ExportToHttpResponse

$
0
0

I'm trying to export a report to a PDF using ExportToHttpResponse.  It is throwing the ThreadAbortException.  I can catch the error, and keep trucking and it works in debug mode.

 

When I publish to production that error ends the response, hangs the window and the report does not show.

 

I've found lots of info stating that ExportToHttpResponse causes the error, but no information about getting around it...

CrystalReportViewer not displaying in ASP.NET webform, (v13.0.9 & VS2013)

$
0
0

I previously had Crystal Reports 2011 and Crystal Reports v13.0.2 installed on my PC.

 

I then installed Visual Studio 2013, uninstalled Crystal Reports v13.0.2 and installed Crystal Reports v13.0.9.

 

Inside the Visual Studio environment I can see the Crystal Reports template and I can create and edit new reports from within the environment.

 

I have created a web page and placed a CrystalReportViewer control on the .aspx page and used the CrystalReportViewer designer to select the ReportSource and I can see the report appear in design view, however when I run the webpage neither the report or even the CrystalReportViewer control is displayed.

 

At the very least I would expect to see a blank CrystalReportViewer frame in the page but I'm not even seeing that.

 

When I check the project references I can see:

CrystalDecisions.CrystalReports.Engine

CrystalDecisions.ReportSource

CrystalDecisions.Shared

CrystalDecisions.Web

 

all have version as 13.0.2000.0

 

Also when I check the toolbox, I can see that the CrystalReportViewer component has version 13.0.2000.0

 

Is this related to why I'm not seeing the CrystalReportViewer control at runtime?

IE9 Print button does not work from CR

$
0
0

Hi.

I am fairly new to crystal reports so forgive my knowledge level and understanding

 

I have a customer who makes crystal reports. When the report is shown on his own helpdesk program it shows perfectly.
Except the button print and export to pdf does not work.

You are allowed to push the buttons but no reaction is initiated.

He runs IE9 and has Crystal reports runtime engine for .Net versjon 13.09.1312

 

Any ideas why it is not functioning properly there?

I cannot manage to replicate the problem on my end with same versjon of IE and CR.

Viewing all 3636 articles
Browse latest View live


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