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

Does Crystal Reports supports national digits (like Eastern Arabic numerals) on render time?

$
0
0

Hello.

Could anyone confirm that Crystal Reports can render reports using national digits like Eastern Arabic numerals?

 

According to our tests, CrystalDecisions.Windows.Forms.CrystalReportViewer from latest Crystal Reports for Microsoft Visual Studio (i.e. Support Pack 6) ignores national digits and always use standart set "0123456789" even if Windows system-wide settings guides programs to use not-default digit sets like "٠١٢٣٤٥٦٧٨۹".

 

This problem can be also observed in Microsoft Visual Studio 2012. To repro:

1. Setup Windows to use national digits. In "Control Panel" / "Region and Language" press "Additional settings..." on the "Formats" tab, choose some not-default digits set (for example - "٠١٢٣٤٥٦٧٨۹") in the "Standard digits" combobox, and choose "National" in the "Use native digits" combobox. Apply your changes.

2. In Microsoft Visual Studio 2012 create a new "Crystal Reports Application" project using a blank report. Put a text object on any report section and type some digits within. Note that national digits form a set choosen on step 1 are rendered in report designer - it is OK. Switch to report preview and note that common digits (0-9) are rendered - it is NOT OK. If you compile and run this test application, then you can observe the same problem - "0123456789" are used. If you add some data table with numeric data, then these data are also rendered using "0123456789".

 

In result it looks like national digits are supported by Crystal Reports in design time, but not supported on render time. Is there any way to force Crystal Reports to use national digits on render time? Is it necessary to design reports in some special way? Or may be there are some Windows registry setting which control this behavior?

 

Thanks in advance,
Gleb.


"Next Page" wont go beyond page 2 in Html Viewer (Crystal.NET for VS 2008)

$
0
0

I have some reports, originally created using the Crystal Reports for .NET bundled with Visual Studio 2005 and the .NET 2.0 framework. We've recently moved to Visual Studio 2008 and the .NET 3.5 framework.

 

Reports displayed in the Html Viewer do not paginate properly using the Next Page button on the toolbar. Specifically, going from page 1 to page 2 works, but the "next" button does not go beyond page 2.

 

It is possible to navigate to a specific page beyond page 2 using the page number input field. At that point, the "next" button takes me back to page 2, and the "previous" button takes me back to page 1.

 

The "last" and "first" button correctly navigates to the last and first page respectively.

 

Anyone seen anything like this? Ideas on correcting this problem?

SAP BI SDKs: The Next Wave

W3WP Crash - Oracle view in error.

$
0
0

Hello,

      When I do the following code(see below) on the line v_objRpt.VerifyDatabase() if one of the view of the report is in error the W3WP crash and I'm unable to trap the error.

 

     I am running in VS2010 using Crystal Reports for Visual Studio version 13.0.6.1027. Are you aware of this issue and is there any way to fix it?

 

PrivateFunction ChangeLocation(ByRef v_objRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument) AsBoolean

Try

Dim objConnectionInfo AsNew CrystalDecisions.Shared.ConnectionInfo

Dim objSubRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument = Nothing

Dim objCrTable As CrystalDecisions.CrystalReports.Engine.Table = Nothing

Dim objCrTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo

Dim objSubRptDoc As CrystalDecisions.ReportAppServer.Controllers.SubreportClientDocument

Dim objNewConnInfo AsNew CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo

Dim objConnPropBag AsNew CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag

Dim objLogPropBag AsNew CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag

Dim objTB As CrystalDecisions.ReportAppServer.DataDefModel.ISCRTable

 

Dim objRptDoc As CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument = v_objRpt.ReportClientDocument

 

 

objConnPropBag.Add(CONNINFO_DATABASE_DLL, "crdb_oracle.dll")

objConnPropBag.Add(QE_DATABASE_NAME, "")

objConnPropBag.Add("QE_DatabaseType", "Oracle Server")

objLogPropBag.Add("Server", "DB_SRV")

objLogPropBag.Add(LOGONPROP_TRUSTED_CONNECTION, False)

objConnPropBag.Add(QE_LOGON_PROPERTIES, objLogPropBag)

objConnPropBag.Add(QE_SERVER_DESCRIPTION, "SB_SRV")

objConnPropBag.Add("QE_SQLDB", True)

objConnPropBag.Add(CONNINFO_SSO_ENABLED, False)

 

objNewConnInfo.Attributes = objConnPropBag

      objNewConnInfo.UserName = "USR"

      objNewConnInfo.Password = "PWD"

objNewConnInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE

 

Dim objNewTB As CrystalDecisions.ReportAppServer.DataDefModel.ISCRTable

ForEach objTB In objRptDoc.DatabaseController.Database.Tables

objNewTB = objTB.Clone()

objNewTB.ConnectionInfo = objNewConnInfo

         objNewTB.QualifiedName = "OWNER."& objTB.Name

objRptDoc.DatabaseController.SetTableLocation(objTB, objNewTB)

Next

 

ForEach objSubRpt In v_objRpt.Subreports

objSubRptDoc = objRptDoc.SubreportController.GetSubreport(objSubRpt.Name)

ForEach objTB In objSubRptDoc.DatabaseController.Database.Tables

objNewTB = objTB.Clone()

objNewTB.ConnectionInfo = objNewConnInfo

            objNewTB.QualifiedName = "OWNER."& objTB.Name

objSubRptDoc.DatabaseController.SetTableLocation(objTB, objNewTB)

Next

Next

      Try

      If chkRedoVerify.Checked Then

         v_objRpt.VerifyDatabase()

      EndIf

 

      Catch ex As System.Exception

      'TODO Trace Error

         Throw ex

      EndTry

 

objConnectionInfo = Nothing

If objSubRpt IsNotNothingThen

objSubRpt.Dispose()

EndIf

objSubRpt = Nothing

If objCrTable IsNotNothingThen

objCrTable.Dispose()

EndIf

objCrTable = Nothing

objCrTableLogonInfo = Nothing

Exit Function

Catch ex AsException

Throw ex

EndTry

EndFunction

 

Thank you.

Charles

What export formats will be supported going forward?

$
0
0

We are a long time CR user and recently starting using the SAPBusinessObjects.WPF.Viewer. The list of supported export formats seemed to drop a lot of the formats we (and our customers) have come to depend on from the earier CR versions we had used (going back 15 years :-) ). Formats such as .txt or .tbs (tab separated) are very impportant to our customers. What is the product dirction for these types of formats? Are you going to add them into the 'new' viewer?

 

thanks

How to get Crystal Reports Editor in Visual Studio 2013 Preview?

$
0
0

In Visual Studio 2005, if I double-click a *.RPT file in Solution Explorer, the file opens in the Crystal Reports editor.
In Visual Studio 2013 Preview, if I double-click a *.RPT file, it opens in Notepad.  How do I get it to use the Crystal Reports editor again, please?

There must be at least part of Crystal Reports in Visual Studio 2013 Preview, because when I run the program it is able to view Crystal Reports, I just can't edit them!

Thanks and RICKgards
Rick Raubenheimer

Embed Crystal Reports into Website

$
0
0

Hello,

 

After googling and reading forum posts, I realize that I am still stuck on the my question. I want to build a web app that can embed existing Crystal Reports (made in Crystal Reports 2013). What would I need to do this? I looked into .NET CR SDK (RAS version) [I also tried inProc but it didn't actually work, but that's for next time] and Crystal Server 2013 but I am not really sure what my next steps should be.

 

Thank you!

error 692 up from 2nd call when using cr runtime 13

$
0
0

Base is a crystal report using a connection to oracle with a tool that uses cr runtime. In crystal reports designer it seems to work.

Some reports work and some throw this error when reopen them.


redirect to another page after opening up Crystal Report

$
0
0

hi,

 

How is it possible for me to redirect to another page after the report opens? I have a button that saves and then opens up the report. However, I want it to redirect to another page . When I configured the button to save and redirect it didn't open the report so I have to stay on the page.

 

My question is, is there a way I can save the data and open the report and once the report opens redirect to another page? I have attached my code below. HELP!!

Print Button - intermittent functionality

$
0
0

I'm running Crystal reports V13 in Studio 2010 on Windows 7 with IE 9. I've got a report that is like an order/item output. So there are lots of orders and each order can have many items. For some orders, when I run the report and click the print button some time will pass, about 15 to 20 seconds and then I get a print dialog. For other orders I can click the print button all day and nothing happens. What might be causing this behavior?

Get Parameters properties so I can dynamically build a parameters entry screen

$
0
0

Hi

I want to dynamically build an ASP.NET page to allow the user to select values for parameters on a report.

 

I could keep details of all the parameters in a DB table so I would then know what controls and values to program for on the parameters entry page.

 

But I would prefer to be able to interrogate the parameters of the selected report direct form the report object itself.

 

Can you tell me how I can get the details and all properties of parameters on a report pls. If indeed it is possible to do that.

 

I would need details like name, type, permissible values, single/multiple/range of values etc.

 

Thanks

Mark

Application Hard Crashes on Client Machine when ReportSource Assigned

$
0
0

I'm having an issue when I deploy my application to a client machine - when I load a report it hard crashes.  I have it all encased in a Try...Catch but that doesn't even trap the error.  I'll try and provide as much detail as I can - if anyone needs any further clarification, just let me know.

 

The application is set to compile as 32-bit.  I have the 32-but runtime of CR 13.0.6 installed on the client machine.  I have verified that the GAC has the same version as what I have on my development machine.  I have narrowed the problem down to when I bind the ReportDocument to the ReportSource.  Here is similar code to what I have implemented:

 

Dim CReportDocument As New ReportDocument
CReportDocument.Load(My.Application.Info.DirectoryPath & "\Reports\Report.rpt"
CReportDocument.SetDataSource(New ReportList(Code, Classification, Id))
CrystalReportViewer.ReportSource = CReportDocument

Now here is where it gets me ... If I create a "test" report with no datasource and simply a text string, the report viewer loads and displays the report file as expected.  However, I bind my reports to a .NET Object dataset (which works 100% as expected on my development machine) and it crashes at the line "CrystalReportViewer.ReportSource = CReportDocument".

 

As I mentioned above, I have encased the above code in a Try...Catch but it never catches an error and I get the "application has stopped responding".  I have spent countless hours trying to figure out why it would crash and searched Google for potential solutions but couldn't find any.  I've also tried disabling a bunch of things like the ability to print, export, etc. to see if that makes any difference - which it doesn't.

 

I'm stumped so I'm hoping someone from the community can point me in the right direction.

 

Many thanks in advance.

 

Mark

Exception: Printer handle is invalid with HP Universal PCL 6 Driver

$
0
0

We are using the latest Crystal Reports redistributable for .NET (VS 2010).  The problem is happening on both 32 & 64 bit machines.

 

We are experiencing a problem & have exhausted every possible solution we can think of.  I have searched your community forums & tried every solution offered.  The problem is with the HP Universal Printing PCL 6 driver, yet whether the driver itself it the issue is part of the debate. The problem only occurs when a printer using this driver is set as the default printer on a workstation (if it's not the default, the exception is never thrown, and we can print to the printer using this driver without an issue).  In our vb.net code, we set another printer to use, as follows:

 

Dim CrReport As CrystalDecisions.CrystalReports.Engine. ReportDocument

CrReport.PrintOptions.PrinterName = “<printer name>”

 

CrReport.PrintToPrinter(printerSettings, defaultPageSettings, False )

 

 

The exception is raise when the PrintToPrinter method is called.  Any advice?

 

Thanks in advance..

Problem printing to 64-bit print server

$
0
0

I have a windows application using CR 13.0.2 that does a simple PrintToPrinter to print an invoice for us.  The server that the application is installed is running Windows XP

 

invoiceReport.PrintOptions.PrinterName = " \\bp-dc2\HP4200LaserIT"

invoiceReport.PrintOptions.PrintToPrinter(1, True, 0,0)

 

everything worked fine until we upgraded our print server to Windows 2008 .  The 32 bit stations stopped printing, generating a "operation completed successfully" error on the PrintToPrinter method. 

 

64-bit workstations are fine, just the 32 bit server that cannot print now

prompted for username & password when opening a report

$
0
0

Hello,

 

I was wondering if anyone could help me with the issue I am having.  I am using a Winform application using Crystal Report Viewer for VS2010.  When I execute the report, I get prompted for the username and password every time.

 

I am running it on a Windows 7, SQL Server 2005 Express, .NET 4.0.  I didn't have this issue when I was running it on Windows XP, SQL Server 2000, .NET 2.0.

 

Any help would be appreciated...

 

Thanks,

 

Bryan


CR 2008 Verify on first refresh not working as expected

$
0
0

I am using CR 2008 sp 4 using ASP.Net Viewer and programmatically setting the datasource.

The report has the verify on first refresh (and Verify Stored Procedures ... etc.) unchecked, however when the report is moved to the production environment it runs very slowly.  Further investigation via some network tracing shows that CR is attempting to contact the database which the report was originally developed on (the development database) even though the datasource is being changed programmatically. I have proved this by adding a tnsnames entry (on the prod machine) that matches the development server name that points to the production server and the performance problem goes away.

 

So my question is, which setting must be configured to stop CR attempting to contact the original datasource.

 

Many Thanks

How to reliably set default printer for ReportViewer

$
0
0

We are using CR4VS2010 as part of a WinForms project. The project includes a form that uses the CrystalDecisions.Windows.Forms.CrystalReportViewer control. Our users asked for the viewer to have the viewer default to the last printer used in our application, so we added some code to set the printer name. This allows them to click the "Print" button in the viewer and have the printer automatically set to the specific printer, which may not be their default printer.

 

The code accesses a CrystalDecisions.CrystalReports.Engine.ReportDocument object. From that, we access the CrystalDecisions.CrystalReports.Engine.PrintOptions object, and from that we set the PrinterName property. This worked well in house. When we made the release available to our user base, our support team has been swamped with users who are getting InvalidSpecifiedPrinter exceptions on the line where we set the PrinterName property.

 

For some users, the problem is temporarily fixed by logging off and then logging back in their computer. For other users, the problem happens 100% of the time, but only for particular printers. We have tested SP4 and SP6, with the same symptoms on both versions.

 

I created a very simple test project that easily recreates the symptoms. It has a button that uses the "simple" technique we tried. It has a button that tries to set the printer by using CopyFrom with PrinterSettings and PageSettings classes. It also has a button to print directly to the printer, without involving the print preview control.

 

The simple button recreates the "invalid printer" error. This test project catches it (something I will be adding to our code as an interim fix).

 

The "printer settings" button is even less reliable than the simple set of the printer name. It constantly gets "not supported" and "index out of bounds" exceptions when referencing Duplex mode or Collation properties.

 

The "direct print" button seems to work 100% of the time. This is just there for demonstration, as our users don't always want to print directly to the printer. They want the preview option...

 

Can anybody offer advice on what I should be doing differently to get the preview control to default to the specific printer? I have attached the sample project source. It's actually a zip file, so you'll have to rename it after downloading it.

 

Thanks,

- Don Benson -

Tribute Inc.

Store & Retrieve rpt files in database

$
0
0

Hi

At present we are storing the .rpt files in local disk and saving the report path in datbase and load the report.

 

But now, i need to know how to store the .rpt file in MYSQL database as BLOB field and load it at run time. (client wants to store the file in database)

 

can anyone help me out with the vb.net code on how to store & retrieve the rpt files in MYSQL database.

how can i add RecordSelectionFormulato my report

$
0
0

my case is i have old report (crystal 9)

i upgraded it to (crystal 13)

then i want to filter it'data at the runtime using RecordSelectionFormula

i did it and the report got the numbers of pages  but the viewer does not appear any data

 

the problem is here

when i remove the RecordSelectionFormula it works

is that any way to resolve this issue

i use vs 2010 and this is my code:

      ReportDocument reportDocument = new ReportDocument();

            CrystalDecisions.Windows.Forms.CrystalReportViewer crystalReportViewer1 = new CrystalDecisions.Windows.Forms.CrystalReportViewer();

            crystalReportViewer1.ShowGroupTreeButton = false;

            TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();

            TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();

            ConnectionInfo crConnectionInfo = new ConnectionInfo();

            Tables CrTables;

            // load report

            reportDocument.Load(AppDomain.CurrentDomain.BaseDirectory.ToString() + "\\Reports\\" + reportName);

            // set report Parameter

            if (Param_Values != null)

            {

                foreach (KeyValuePair<string, object> Param_Value in Param_Values)

                {

                    reportDocument.SetParameterValue(Param_Value.Key, Param_Value.Value);

                }

            }

 

 

            // set report Connection info

            string[] LoginData = PerfectPos.Properties.Settings.Default.ConnectionString.Split(';');

 

 

            if (!string.IsNullOrEmpty(LoginData[4].ToString()))

            {

 

 

                crConnectionInfo.Password = LoginData[4].Split('=')[1].ToString();

            }

            crConnectionInfo.UserID = LoginData[3].Split('=')[1].ToString();

            crConnectionInfo.DatabaseName = LoginData[1].Split('=')[1];

            crConnectionInfo.ServerName = LoginData[0].Split('=')[1];

            CrTables = reportDocument.Database.Tables;

            foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)

            {

                crtableLogoninfo = CrTable.LogOnInfo;

                crtableLogoninfo.ConnectionInfo = crConnectionInfo;

                CrTable.ApplyLogOnInfo(crtableLogoninfo);

 

 

            }

 

 

 

 

            DateTime dt = DateTime.Parse("08/26/2013");

            string d = "{vuREPChequeDetails.IsClosed}=true and {vuREPChequeDetails.IsVoid}=false and {vuREPChequeDetails.PaymentTypeID}=1";

            reportDocument.RecordSelectionFormula = d;

            crystalReportViewer1.ReportSource = reportDocument;

 

 

 

 

            WindowsFormsHost host = new WindowsFormsHost();

            host.Child = crystalReportViewer1;

            grd_layout.Children.Add(host);

How to get Crystal Reports Editor in Visual Studio 2013 Preview?

$
0
0

In Visual Studio 2005, if I double-click a *.RPT file in Solution Explorer, the file opens in the Crystal Reports editor.
In Visual Studio 2013 Preview, if I double-click a *.RPT file, it opens in Notepad.  How do I get it to use the Crystal Reports editor again, please?

There must be at least part of Crystal Reports in Visual Studio 2013 Preview, because when I run the program it is able to view Crystal Reports, I just can't edit them!

Thanks and RICKgards
Rick Raubenheimer

Viewing all 3636 articles
Browse latest View live


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