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

Suppress Printing If No Records System.DivideByZeroException.

$
0
0

With one of our customers, we've got a couple of problems.  The first is that if the user customizes their report and checks "Suppress Printing If No Records" in SAP Crystal Reports 2008 or 2011, when we go to print it using the SAP Crystal Reports 2011 run-time, we get a System.DivideByZeroException.

 

Interestingly enough, we can create a completely blank report, with no query, no parameters, and no data on the page and recreate the same problem.  If we check "Suppress Printing If No Records", then we get the DivideByZeroException.  If we uncheck it, then the completely blank report prints without the error.

 

We are using SAP Crystal Reports for Visual Studio (13.0.5 latest) to do this.  We can also duplicate the issue in prior versions.  If we print the report via the 2008 or 2011 standalone designer, there is no error and "Suppress Printing If No Records" works correctly.

 

I've seen the SAP Note  (1487765) on workarounds, however they are not acceptable workarounds for our situation.  We have 400 reports plus customers can customize their own.  We have customers who want to print blank reports, and some that do not, and performance is critical.  We can't be hard-coding workarounds into our printing that would jeopardize flexibility and performance when it is very clearly a deep, internal Crystal Reports bug.

 

Is there a way to get this reported as a critical bug and get it fixed?

 

Here's the stack trace:

 

System.DivideByZeroException: Attempted to divide by zero.

   at CrystalDecisions.Shared.PrintingHelper.PrintPage(PrintPageEventArgs e, PageObject page, PrintLayoutSettings layoutSettings, Int32& currentPageNumber, Int32& currentHorizontalPageNumber)

   at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintPageEventHandler(Object sender, PrintPageEventArgs e)

   at System.Drawing.Printing.PrintDocument.OnPrintPage(PrintPageEventArgs e)

   at System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs e)

   at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)

   at System.Drawing.Printing.PrintController.Print(PrintDocument document)

   at System.Drawing.Printing.PrintDocument.Print()

   at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, Boolean reformatReportPageSettings)

 

 

The second issue is that when we open the report in SAP Crystal Reports for Visual Studio designer in Visual Studio 2010 or 2012, the Report Options page is missing a group of options that appear in the SAP Crystal Reports 2008 and 2011 standalone report designers:

  • Save Data With Report
  • Suppress Printing If No Records
  • Perform Query Asynchronously
  • Show Preview Panel
  • Display Alerts on Refresh
  • Read-only

 

SAP Crystal Reports For Visual Studio:

SAP Crystal Reports for Visual Studio Report Options.jpg

SAP Crystal Reports 2008:

SAP Crystal Reports 2008 Report Options.jpg

Is there a way to get these options back?  The inconsistency between the two designers is concerning.

 

Thanks for the help!

 

Kyle


VS-2010 Interop.REPORTRENDERERLib Error w/ CRs 13.0.5 on Windows 7

$
0
0

Crystal Reports Version Installed: CRforVS_redist_install_32bit_13_0_5, CRforVS_mergemodules_13_0_5 

 

VS-2010 Error: System.SystemException - The type library importer encountered an error during type verification. Try importing without class members. : System.TypeLoadException - Method 'IToolbarRenderer_get_CommandPrefix' on type 'REPORTRENDERERLib.ToolbarRendererClass' from assembly 'Interop.REPORTRENDERERLib, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null' is overriding a method that has been overridden.
C:\WAVESSRC\Tools\LogReport\TlbImp 

 

This file "TlbImp" does not exist. 

 

All suggestions in how to resolve this issue are welcomed.

Problem with TWAIN scanners

$
0
0

Ever since we upgraded our application to use Crystal Reports v11, it does not recognize our TWAIN scanner drivers. I have narrowed it down to the ExportToDisk function. The scanners are all accessible in our application until that Crystal function is called.

 

Is this a known problem?

 

Is there a patch?

 

Is there a workaround?

 

Thanks,

Mike

No Luck on Crystal Reports After Installation!!

$
0
0

Hi,

 

I have installed SAP Crystal Reports Support Pack 5 for Visual Studio 2010 and set target framework 4.0 but Crystal Viewer control still not appear on the Toolbox. Also when I try to add Crystal Report to the project, it is still showing the download SAP Crystal Page.

Could you please help me on this? ...I am new to this site, so i don't see any option to post the question as public!!

 

Thanks....

Suman

Crystal Report does not load on page refresh (.Net 4.0, VS2010, CRVS2010)

$
0
0

I am in the process of upgrading my web application. Here's the new configuration that I intend to use:

Windows Server 2008 R2, IIS 7, Visual Studio 2010, IE 8, ASP.Net 4.0, Ajax for .Net 4.0, Crystal Reports for Visual Studio 2010

 

I have a Crystal Report inside an update panel of Ajax on an ASP.Net web page. The report loads fine the first time; but when I change the filter criteria, a page refresh happens and the page goes blank. All of this happens in VS2010 on my development machine.

I checked the View Source of the returned HTML and seems like the report is there; but is not shown.  I also checked the visibility of the report in my code and it is visible.

 

I checked this link and tried everything there too - http://scn.sap.com/community/crystal-reports-for-visual-studio/blog/2012/10/16/report-appears-blank-in-browser-after-deploying-a-crystal-reportsnet-web-application

 

Here's the code that I use to load the crystal report. This same code worked perfectly fine with .Net 2.0 and CR For VS2005.

 

 

====== HTML for Crystal Report Viewer =========

<!-- The below code is inside an Ajax TabContainer -->

 

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" HyperlinkTarget="_blank"
    ShowAllPageIds="True" Font-Bold="True" ToolbarStyle-CssClass="CRDisplayBar" EnableParameterPrompt="False"
    AutoDataBind="False" EnableDatabaseLogonPrompt="False" HasToggleGroupTreeButton="False"
    EnableDrillDown="False" ToolPanelView="None" ReuseParameterValuesOnRefresh="true" />

 

======= ASP.Net Code ========
protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
           scriptManager.RegisterPostBackControl(CrystalReportViewer1);
    SetReportViewerProperties(CrystalReportViewer1);
           
        }
        catch (Exception ex)
        {
            // Exception handling code
        }
    }


protected void SetReportViewerProperties(CrystalDecisions.Web.CrystalReportViewer crViewer)
    {
        ReportDocument rd = LoadReport(strReportName);

        if (rd.IsLoaded)
        {
            crViewer.Visible = true;
            crViewer.ReportSource = rd;
            Session["crViewer"] = crViewer;
        }
        else
        {
            crViewer.Visible = false;
        }

        crViewer.DisplayToolbar = true;
        crViewer.EnableParameterPrompt = false;
        crViewer.HasToggleGroupTreeButton = false;
        //crViewer.DisplayGroupTree = false;
        crViewer.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;
        crViewer.HasCrystalLogo = false;
        crViewer.HasDrillUpButton = false;
        crViewer.HasRefreshButton = false;
    }


protected ReportDocument LoadReport(string reportPath)
    {
        //rd = new ReportDocument();
        try
        {
            if (Session["rd"] == null)
            {
                rd = new ReportDocument();
                Session["rd"] = rd;
            }
            else
            {
                rd = (ReportDocument)Session["rd"];
            }

     // Some custom code...

            rd.Load(Server.MapPath(reportPath)); // reportPath contains the path of the Crystal Report
     rd.SetDataSource(myCustomDataSet);           

        }
        catch (Exception e)
        {
            // Exception handling code
        }
        return rd;
    }

 

 

================================

 

Am I missing something?

Please let me know if more information is required.

Crystal Reports redist and Windows 8

$
0
0

Hello

 

wie hava an Windows application project theh previews a report.

Aftert the  Installation is not possibly to display an previews,

 

Erro messaga is :

 

Der typen initialisierer for "CrystalDecisions,ReportSource.RepoertSourceFactory" hat eine Ausnahme verursacht.

 

Thetypeinitializerfor "CrystalDecisions,ReportSource.RepoertSourceFactory" hascausedan exception

 

Ther is not problem on Windows 7 and Windows XP just on Windows 8.

 

Wie hava try CRforVS_redist_install_64bit_13_0_3 and CRforVS_clickonce_13_0_5.

 

Is thereany solution for it.

Get Access to Special Field Values

$
0
0

I have an RPT file with saved data that I need to access.  I can access the majority of the data using the RowsetController however I am unable to access the Special Field value PageNumber or PageNofM.

 

Can anyone point me in the right direction?

 

I am using a rowsetMetadata that has all of the ResultFields, FormulaFields, RunningTotalFields, and a few DataFields

but I can not seem to get access to the Special Fields.

Date range in Cross Tab Reports

$
0
0

How to use date range fields in cross tab report.


CRVS 2010 - blank lines in report with paging disabled

$
0
0

Hello,

 

I am working on a .Net 4.0 web application which uses Crystal Reports 13 (CRVS 2010). Actually this has been migrated from .Net 1.1 which was using Crystal Reports 11. Now one of my requirement is to generate few reports in which paging is disabled (of course when exported to PDF it does come out in multiple pages) such that the entire report content is shown in a single view on the web page (with a vertical scroll bar). Now to achieve this I set a few properties as shown below -

  • Set DisplayToolbar to false on the crystal report viewer control
  • Set the SeparatePages property to false on crystal report viewer control
  • In the report (rpt file) I enabled/set Keep Together on all sections and also set Suppress Blank Section property
  • As I did not have much in page footer I set the Reserve Minimum Page footer property. I also set Clamp Page footer property

However when my report is displayed in the page, I observe blank lines in between the content (shown in the attached jpeg). A deeper look suggests that these blanks appear right at the point where I would have had the page break if I had enabled paging. This makes my report look odd on the web page. With the old application which used previous version of CR this was not the case. Is there a way wherein I can ensure that the report when displayed on the web page concatenates the content properly without any gaps considering that I disabled paging?

 

Any help would be highly appreciated.

 

Thanks,

GowriShanker.

 

P. S: Also attached is the report file with extension changed to txt.

problem with CRforVS_13_0_5.exe

$
0
0

hey !

i download the CRforVS_13_0_5.exe , then installed it succesfully ! but when i want use it on my vs2010 ,my visualstudio will end suddenly!

in my vs2010 ,when i choose add item, i see the crystalreport item has been changed to a magic wood istead of green diamond! addtionally its summary dnt show!

i searched many websites and users ,but its a rare issue! hope someone help me!

thanks

Export to pdf causing a crash after upgrading to version 13.0.5

$
0
0

Hi,

 

I've upgraded to the latest version of SAP Crystal Reports, version for Visual Studio, using CRforVS_13_0_5.exe from version 13.0.4.

Right after the upgrade, I've run the same code that used to work on the last version and suddenly it crashes when I use the following code:

ReportDocument crystalReport = new ReportDocument();
crystalReport.Load(reportPath);
crystalReport.SetDataSource(dtData);
try
{     crystalReport.Export();  //Crashes here
}
catch (Exception e)
{
}

 

crystal crash.png

Problem signature:

  Problem Event Name:          APPCRASH

  Application Name:          ReportsMailer.vshost.exe

  Application Version:          10.0.30319.1

  Application Timestamp:          4ba2084b

  Fault Module Name:          crxf_pdf.dll

  Fault Module Version:          13.0.5.891

  Fault Module Timestamp:          50e9684c

  Exception Code:          c00000fd

  Exception Offset:          00060c37

  OS Version:          6.1.7601.2.1.0.272.7

  Locale ID:          1033

  Additional Information 1:          dbcc

  Additional Information 2:          dbcccc288555cd9c867bb7543f79ff62

  Additional Information 3:          9576

  Additional Information 4:          95762008e7f9a6425b6ab9ab5943492e

 

 

Read our privacy statement online:

  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

 

 

If the online privacy statement is not available, please read our privacy statement offline:

  C:\Windows\system32\en-US\erofflps.txt

 

One more important thing to mention - the code is running with different datatables as input and only crashes when the data exceeds a certain amount.

SetDataSource Property is Changing my TableName

$
0
0

** Please Pardon if this duplicates.  It was posted last night and then appears missing this morning. **

 

I have a crystal report that uses two table adapters as inputs.  These inputs are intended to vary between client and need to be changed at runtime in VB.NET.  Using the "networked" code to ensure consistency, my code used to work just fine on my old PC (with XP Pro as operating system).  Since upgrading to a new PC (Windows 7 32 bit) and with no program changes, the code is no longer working.  It appears that the SetDataSource execution is changing the TableName.

 

       

Dim Name1 AsString, Name2 AsString, Name3 AsString, Name4 AsString, Name5 as String

       

Dim _db AsNewSqlDatabase(GetConnectionString(_dbName))

Dim ds AsDataSet = _db.ExecuteDataSet(CommandType.Text, "select * from LossData")

       

Dim oldDatabase AsNewSqlDatabase(GetConnectionString(_oldDbName))

Dim oldDs AsDataSet = oldDatabase.ExecuteDataSet(CommandType.Text, "select * from Test")

       

Dim cr AsNew CrystalDecisions.CrystalReports.Engine.ReportDocument

 

cr.Load(Path.Combine(My.Settings.ReportPath, "ClaimGroups.rpt"))

Name1 = cr.Database.Tables(0).Name              'RETURNS LossData AS Name1 (Name of first alias in ClaimGroups report)

Name2 = cr.Database.Tables(1).Name               'RETURNS OldLossData AS Name2 (Name of second alias in ClaimGroups report)

cr.Database.Tables("LossData").SetDataSource(ds.Tables(0))

Name3 = cr.Database.Tables(0).Name               'RETURNS LossData as Name3              

oldDs.Tables(0).TableName = "OldLossData"

Name4 = oldDs.Tables(0).TableName                'RETURNS OldLossData as Name4

cr.Database.Tables("OldLossData").SetDataSource(oldDs.Tables(0))

Name5 = cr.Database.Tables(1).Name              'RETURNS LossData_1 as Name 5

cr.VerifyDatabase()


The problem is that Name5 should be assigned OldLossData instead of LossData_1.  I'm not sure why it is happening and I can still run the exact same code on my XP Pro machine and Name 5 is correctly assigned OldLossData.

 

The report is counting on OldLossData being the alias and has tons of formulas.

 

Can anyone help as to why this is happening?  And how to work around it?  Thanks very much for any help you can provide.

 

Dan

Can't see MySQL views in Crystal Reports in VS2010

$
0
0

I am creating a report in VS2010. I have used Database Expert to create a new ODBC connection and I can see my database and its tables but I can't see the views that are there. In Options for the connection I have both Tables and Views ticked. Can anyone help?

The report you requested requires further information

$
0
0

ello Experts,

 

we facing database log in issue "report you requested require further information" while executing the report in the Crystal BI Inbox.  we are using following procedure to broadcast the report.

 

Go to CMC application

Select your report

Right Click

Select Database configuration

Select the first radio button

Use original database log on information from the report

Provide, user id and password

 

Go to last step

When viewing the report
use radio button - use same database log on as when report is run

Update and save

 

Kindly help us with the solution and also go through the attached error screen shot.

 

Regards

 



Sreenivas

Visual Studios 2010 - Graphing - Web Site Deployment

$
0
0

I am using Visual Studios 2010.  I have a crystal report in my application that has a graph in it.  When I run my application from my desktop, the graph is displayed on screen.  But, when I deploy my application and run it through a web browser, my graph is not showing.  If I print or export the report, the graph is there but it just doesn't display it on the screen.  What am I missing?  Any ideas?

 

Also, If i have parameters that aren't used based upon how other parameters are answered, I still have to enter value in them when running this way.  When I run it in Crystal Reports, it does not make me answer these other parameters.  Thoughts?


Problem in the deployment of CR for Visual Studio 2010

$
0
0

Hello,

 

We are 3 students who works on an IT project for our degree. We would like to deploy an application to a client (the client do not pay the app). But we meet many problems.

 

We try to create a setup with Inno setup, in our scripts we called CRforVS_redist_install_64bit_13_0.msi to run and install on client pc. That don’t work, the print of report doesn’t work, and this error appear:


*****************************************Exception Text************************* **************
System.TypeInitializationException: An exception was thrown by the type initializer for 'CrystalDecisions.Shared.SharedUtils'. ---> System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version = 1.2.10.0, Culture = neutral, PublicKeyToken = 692fbea5521e1304' or one of its dependencies. The specified file was not found.
to CrystalDecisions.Shared.SharedUtils .. cctor ()
--- End of stack trace --- inner exception
CrystalDecisions.Shared.SharedUtils.get_CurrentControl to ()
CrystalDecisions.Shared.SharedUtils.GetEffectiveCulture to ()
to CrystalDecisions.Shared.LocaleManager .. ctor ()
CrystalDecisions.Windows.Forms.CrystalReportViewer.InitReportViewer to ()
to CrystalDecisions.Windows.Forms.CrystalReportViewer .. ctor ()
IHM.FrmRapport.InitializeComponent to ()
to IHM.FrmRapport .. ctor (String strNomFichier)
to IHM.FrmPrincipale.creerRapport (Boolean prints)
to IHM.FrmPrincipale.printPreviewToolStripButton_Click (Object sender, EventArgs e)
to System.Windows.Forms.ToolStripItem.RaiseEvent (Object key, EventArgs e)
to System.Windows.Forms.ToolStripButton.OnClick (EventArgs e)
to System.Windows.Forms.ToolStripItem.HandleClick (EventArgs e)
to System.Windows.Forms.ToolStripItem.HandleMouseUp (MouseEventArgs e)
to System.Windows.Forms.ToolStripItem.FireEventInteractive (EventArgs e ToolStripItemEventType met)
to System.Windows.Forms.ToolStripItem.FireEvent (EventArgs e ToolStripItemEventType met)
to System.Windows.Forms.ToolStrip.OnMouseUp (MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp (Message & m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc (Message & m)
to System.Windows.Forms.ScrollableControl.WndProc (Message & m)
to System.Windows.Forms.ToolStrip.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).

 

 

1/ We thinks that errors provides from the license, is that right ? In our case the deployment is free ?

 

2/ It is possible to import dll necessary to the deployment of crystal report in our inno setup script to install the dll in a subfolder in the main folder of the application.

 

Ps: We tried to create a setup with the visual assistant, to use this merge module: 13_0_5.msm the result is the same.

How can I obtain a .pdb file for cslibu-3-0.dll?

$
0
0

We are experiencing a crash on one of our servers. We are running a Windows service that uses Crystal Reports for Visual Studio 2010 to generate reports. We have captured a dump when this crash occured and sent it to Microsoft for analysis. They have requested that we provide them with the .pdb file for cslibu-3-0.dll so they can analyze the dump. How can we obtain this file?

set report name and content type

$
0
0

Using Crystal Reports 2011

Visual Studio 2012 with CR for VS 13.0.5 in C#

 

issuing the following:

 

m = (System.IO.MemoryStream)theReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
this.Response.ContentType = "Application/pdf";
this.Response.BinaryWrite(m.ToArray());

 

auto opens the report in PDF format in the browser..

but if the user clicks save the report name is the name of the aspx file..

 

so that I can specify the report name I added a header:

 

m = (System.IO.MemoryStream)theReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
this.Response.ContentType = "Application/pdf";
this.Response.AddHeader("Content-Disposition", "attachment; filename=" + sAttachment + ".pdf");
this.Response.BinaryWrite(m.ToArray());

 

this does set the reportname to what I want, however, the PDF no longer opens automatically, the user is prompted to OPEN or SAVE..

 

is it possible to set the report name and have it auto open in the browser.

Text Overlapping Issue May Be Due to Cell Alignment

$
0
0

I thought I'd share a solution we found while working with the crystal reports 2010 web application.

Our CrystalReportViewer object was located in a TableCell.  We happened to set the align property of the tablecell to "Center". 

 

It was discovered that 2 things occurred as a result of this alignment.

 

1.)  Users who were using Internet Explorer 7 and below (or users using the compatibility View turned on for IE8 and up) were presented with a "shifted" view of the report.  The report was pushed to the right (almost cutting the report in half) and the group tree was overlapping the report itself.

 

2.)  Some of our text areas that were using justification or center justification on the area would occasionally have text that overlapped on top of each other.

 

Both instances would not show up if a user printed the report (just in the viewing of the report).

 

After we changed the align property to "Left" both problems were resolved instantly.

 

Thought I'd share since this took us awhile to discover the culprit.

 

Enjoy!

 

Lawrence

How to implement Custom formula in Cross Tab Report

$
0
0

Hi,

 

I have used Cross tab on my report form to display Grades in columnwise. All works well except last column Total.. I want to use my own formula for calculation instead of crosstab like Sum of Column name.

 

We have requirement in our project to design report file which will looks give below (ref Image-1) using Crystal report functionality.

I have tried to design such kind of report file using cross tab feature of Crystal report and it almost works well except for last column TOTAL.

Cross tab functionality is used to display grades in column wise as they can be vary too.

 

Cross Tab Working :

Let’s say if we have column name as tag.Maths and Tag.Stat then crosstab by default do arithmetic calculation in Total field.. I mean it show sum of Tag.Maths and sum of Tag.Stat and display value

Mathematics Total = 30

Statistics Total = 45

 

KG-11

KG-12

TOTAL

MATHEMATICS

10

20

30

STATISTICS

20

25

45

Image -1

Report Requirement:

  1.   Display all grades KG-1 to KGn in column wise. And subjects in row manner.
  2.   Use custom formula for Total instead of Sum of()

Refer Image-2  for requirement of Total

I do not want to reliable on Crystal report arithmetic’s operation. I have separate formula to do calculation..

Example of Custom formula:

Mathematics Total = Column1 value * 1.1 + column2 value * 1.1 ….

Statistics Total = Column1 value * 1.2 + Column2 value * 1.2 …

Maths Total = 10*1.1 + 20*1.1 = 33

Stat Total =  20 * 1.2 + 25*1.2 =  54

 

KG-11

KG-12

TOTAL

MATHEMATICS

10

20

33

STATISTICS

20

25

54

Image-2

 

 

Can any one suggest way to handle calculation? Or way around to handle this? I can statically display columns as columns vary thats why used cross tab feature.

 

Thanks in advance,

 

Vaibhav

Viewing all 3636 articles
Browse latest View live


Latest Images

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