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

How do I set the Data Provider for an rpt at Run time?

$
0
0

I have a C#.Net web app that fronts just about 400 reports.  I'm moving it to a server that does not have the OLEDB provider that I used to design the reports with many years ago.  I'm setting all the connection info at runtime to support dev, testing and production environments.  I have yet to find a way to change the provider.  If I could pass a raw connection string like a do in my application that would be cool.  The only answers I've seen is grabbing the dataset from within my code, but I would rather be done with that binding after I've designed the report.  Any suggestions would be appreciated.  Until then I'm going one rpt at a time-I'd rather be developing, help!

 

-Tyson Smith


Changing report datasource at runtime

$
0
0

In advance, I've read all of the posts on here about dynamically changing the datasource for your report at runtime and none of it seems to work.

 

I developed a report against my development database using an ODBC connection. At runtime I want to pull the data from the production database. I've tried clearing the DataSourceConnections. I've tried the SetDatabaseLogon as well as Table.LogOnInfo, Table.ApplyLogOnInfo, SetConnection, everything. When I SetDataSource and feed in my DataSet, it's still the development database data. I've switched connection strings back and forth between the development and production databases and verified that the DataSet is being populated with the correct data.

 

Anyone have any ideas? I'm using Visual Studio 2010 and Crystal Reports 2011.

 

Thanks, in advance for any help you can give.

What to add to web.config for report viewer

$
0
0

I have a web application that allows users to run reports in a report viewer that is currently running on crystal 2008. I have installed service pack 8 of the runtime for crystal 2013 and changed all of version #'s in my web config to 13.0.8. Now the viewer only returns blank screen when I try to run a report threw the viewer on my app. I am thinking something is wrong in my web config. Is there a guide that explains what I have to have in my web config to get the 2013 viewer to run? My app runs on .net 4.0. Thanks!

Install of CRRuntime_32bit_13_0_7.msi gets 'failed to register' on Win Server 2003

$
0
0


I am trying to install the Crystal Reports Runtime (CRRuntime_32bit_13_0_7.msi) on a Windows Server 2003, and I get multiple messages like the following: 'Error 1904, Module M:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\commonobjmodel.dll failed to register. HRESULT -2147023898. Contact you support personnel.' I get the option to click on Abort, Retry, or Ignore. If I click on Ignore, the message repeats about 9 times for other DLLs'. If I keep selecting Ignore, the install does complete, but then when I try to launch my VB.Net application (which launches the Crystal Reports Viewer), it trys to start, but never launches. I saw in a SAP support thread this same error, and it said it could be cuased if the Full version of the Microsoft .Net Framework 4.0 (ie: not just the client) is not installed. It also said this error could be caused by using the .MSM files to install the Crytal Reports Runtime, so it recommended using the .msi install file. I have the full version of Microsoft .Net Framework 4.0 installed, and I am using the .msi install. What else do I need to do to get this install to work??? Note: I have installed this .msi on Windows 7 machines and on another Microsoft Windows 2003 server with no problems, and my VB.Net application launches the Crystal Reports Viewer with no problems. The only difference between the two Microsoft Windows 2003 servers, is the one where it works, the Operating system is Windows 2003 R2 Standard, and he one where it does not work is Windows 2003 R2 Standard x64.

Accessing individual elements of a textobject

$
0
0

Hi,

 

I'm using Crystal Reports 2008 in a .Net application.

 

I'm looping through each object in the report and applying colours at run time. We have certain text headings, fields, borders etc use use a single colour. We want to be able to change that colour without having to touch the individual reports.

 

So, the general approach is that if the object's font is not black then replace the colour with the new colour.

foreach (Crystal.ReportObject oO in oCurrentReport.ReportDefinition.ReportObjects)

{

if (oO is CrystalDecisions.CrystalReports.Engine.LineObject)

     {

          ...

     }

else if ((oO is CrystalDecisions.CrystalReports.Engine.TextObject))

     {

          ...

     }

}                      

 

This works fine for most objects but doesn't work for certain textobjects with multiple fonts:

[{@ReferenceHeading}: {@Ref}]

 

{@ReferenceHeading}: is specified to have a colour.

{@Ref}: is specified to be black

 

This results as one textobject - my question is how can I access each element of the textobject?

Crystal Reports itself can detect the difference because it does apply the different design time colouring.

 

I can't split out the objects from the textobject because {@ReferenceHeading} is a variable length and I want to maintain the look.

 

Any ideas?

CR 2010 prompt parameter appearing in my Application Web site

$
0
0

Good day to all...

 

My problem is regarding the prompt parameter always appears in the production server (64 bit server, OS: win server 2008r2, DB: sql server 2012, CR 2010) in my web application(asp.net 4.0).In my local machine, its working properly (win 7 professional 32 bit). How can i check if the setup is ok or not in the production server? What should i do to fix the problem?


Hope someone could help me.


Thank you and regards.



Yours truly

Christine

Cannot install on 64-bit Windows, why not?

$
0
0

(Since this forum refuses to allow me to copy and paste my question into the textbox, please see the attached .txt file, which contains my question and the data I was trying to display.)

Crystal report exported into PDF losses sort order

$
0
0

Background: the crystal report RPT file was created using Crystal reports 2008 SP1.

.Net application: framework 4.0, platform : Any CPU , Type: Console application.

System: 64 Bit machine, Crystal report runtime 13 SP8 , Installed Crystal reports 14 Sp1.

 

Problem: The application was written in visual studio 2012 on a 32 bit machine with Crystal report 2008 runtime everything works as planned.

I created this application on windows 7 64 bit machine with  crystal reports runtime 13 SP8.  it  only works partially.  the application first runs individual  records and exports them into pdf.  I have an open source  library called PDFSHARP that takes the page count of the individual PDF files

 

e.g.  customer A, pages:2

        customer B, pages:3

        customer C ,pages:1

 

I store this customer number and page information in a dataset.  So, lets assume this dataset has 10,000 records.  I then split this dataset into 1,000 records each and provide it to the same RPT file as a data source.  when it prints the 1,000 the order of record gets lost.  So , what ends up happening  is

 

        customer A, pages:2

        customer C, pages:3

        customer B ,pages:1

 

However, if I only split the records max up to 125 records per file then they work as expected.

 

        customer A, pages:2

        customer B, pages:3

        customer C ,pages:1

 

Attached is code Snippet Crystal_code.txt

 

 

I have tried almost everything under the sun but I cannot seem to find out why this application behaves differently on 64 bit environment.  where it looses the order or records on anything over 125 records.  Where as on a 32 bit machine with old runtime it works like a charm even for 1000 records at a time.

 

Any help is appreciated.

 

 


Issue with Report Viewer in WEB. VARCHAR2 Field Oveflowing (Not Truncated)

$
0
0

Dear Forum

 

Can someone tell me if there is an issue with the report viewer when viewing reports over the web

 

I have a report that displays an address. The field length is 305 chars long the field type is varchar2. Connection is to an Oracle Dbase

 

The field is naturally truncated so that not all the data is displayed (This is ok and by design. I know this is a bit strange)

 

If i display the report in using the report viewer where the report viewer is embeded on a page (winforms) teh report appears fine. Field is truncated as expected.

 

If i display the same report over the web using the report viewer the field overlays the adjacent field and the data is scrambled.

 

I have exported the report produced over the web back as a crystal report to see if there was any change to the reports design (there is not)

 

I would expect the behavior to be the same irrespective.

 

A customer is complaining about this issue. We would like to go back to them with an explination.

 

I enclose screen shots from 1) teh winforms version and 2) the version over the web.

 

And yes they are the same report

 

With Kind Regards

 

Paul

Font shrinking problem with barcode

$
0
0

Hello,

 

I am having a problem with a barcode font. One of our customers uses a barcode font on a report and it shows correct in Crystal Reports.

The problem is when they export it to PDF using the .NET Crystal Viewer (RunTime 13, not sure which SP). The barcode is shrunk significantly. When exporting using the Crystal Reports editor (version 11.5) everything works fine.

I've noticed I am not the only one who is experiencing this problem, yet I have not been able to find a solution that works for me.

I have tried adding all kinds of registry values (found in different articles on the internet, including SAP forums).

I currently have the following code to try and make it work.

 

Dim rvk As Microsoft.Win32.RegistryValueKind = Microsoft.Win32.RegistryValueKind.DWord

Dim forceLargerFonts As String = "ForceLargerFonts"

If Environment.Is64BitOperatingSystem Then

      rvk = Microsoft.Win32.RegistryValueKind.QWord

      Microsoft.Win32.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Export\Pdf", forceLargerFonts, 1, rvk)

      Microsoft.Win32.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Business Objects\Suite 12.0\Crystal Reports\Export\Pdf", forceLargerFonts, 1, rvk)

      Microsoft.Win32.Registry.SetValue("HKEY_CURRENT_USER\Software\Wow6432Node\Business Objects\Suite 12.0\Crystal Reports\Export\Pdf", forceLargerFonts, 1, rvk)

Else

      Microsoft.Win32.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Crystal Reports\Export\PDF", forceLargerFonts, 1, rvk)

      Microsoft.Win32.Registry.SetValue("HKEY_CURRENT_USER\Software\Business Objects\Suite 12.0\Crystal Reports\Export\Pdf", forceLargerFonts, 1, rvk)

End If

Microsoft.Win32.Registry.SetValue("HKEY_CLASSES_ROOT\Software\Business Objects\Suite 11.5\Crystal Reports\Export\PDF", forceLargerFonts, 1, rvk)

Microsoft.Win32.Registry.SetValue("HKEY_LOCAL_MACHINE\Software\Business Objects\Suite 11.5\Crystal Reports\Export\PDF", forceLargerFonts, 1, rvk)

Microsoft.Win32.Registry.SetValue("HKEY_CURRENT_USER\Software\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Export\PDF", forceLargerFonts, 1, rvk)

 

Unfortunately it doesn't work.

Any idea's?

Thanks.

Crystal Report (10.5.3700.0) not working in windows 7 x64

$
0
0


Hello there

 

Please note we are using the above runtime dll for our users for crystal report in VS2010. We noticed that some our reports not working to the users machine who has windows 7 x64 bit. Same report works fine in the windows xp 32 bit machine. Those reports have grouping and sorting.

 

I would to know what patch we need to apply so the reports work fine to the users machine? or is there any proper solution.? We use windows click once application.

 

 

Thanks

Fawad

Crystal Reports For Visual Studio 2013 x Visual Studio 2013

$
0
0

I have just licenced and installed Visual Studio 2013 (version 12.0.21005.1 REL) and also licenced and installed Crystal Reports Developer 2013, Crystal Reports Viewer 2013 AND Crystal Reports For Visual Studio 2013 (CRForVS_13_0_7.exe), but it did'nt work. Are those systems still incompatible? What do I have to do to call a report from a C# program in VS 2013?

Crystal Reports Basic (VS 2008) and windows server 2008 R2

$
0
0

http://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports+v.+9.1+to+SAP+Crystal+Reports%2C+developer+version+for+Microsoft+Visual+Studio+Runtime+Distribution++and+Supported+Operating+SystemsI read a previous post with a similar discussion but I was not able to resolve my issue.  It referenced the link that has many versions of CR and OS's but it wasn't clear whether Server 2008 R2 was included.  Here is the link I was looking at:

 

 

 

I have developed a product with VS2008 using C# targeting .net 3.5 and using the native Crystal Reports product in VS2008 (Crystal Reports Basic?).  We have deployed it to nearly 100 sites and have had no issues until recently when a customer tried to run it on Server 2008 R2.  The deployment code I use installs the msi (CRRedist2008_X86.msi) which has been working fine on XP, Vista, W7, W8, W8.1 and Server 2003 systems, even if they are 64 bit operating systems.

 

Is there a combination of Compile & CR Runtime that will run on Server 2008 R2?

 

Thanks for your help.

 

Peter

Unable to export Report as PDF from Visual Studio 2010 / C#

$
0
0

Dear all

 

I am trying to create a simple console-based C# application that opens crystal reports and exports them as PDF files. I've found many examples for this on the web but I just can't get it to work. It compiles without errors/warnings but crashes at runtime.

 

I'm using Crystal Report 11.0.0.1282 and Visual Studio 2010 with .Net framework 4.5 on Windows 7, 64bit.

 

cryRpt = newReportDocument();

cryRpt.Load("test.rpt");

 

Then I get:

System exception: 'COMM_FAILURE'

Reason: error number WSAEINVAL

Completed: no

Minor code: 1330577413 (socket() failed)

 

If I then try to export the report:

cryRpt.ExportToDisk(ExportFormatType.PortableDocFormat,  "test.pdf");

The program crashes:

 

System.TypeLoadException: Method 'ISCREditableRTFExportFormatOptions_reserved5' on type 'CrystalDecisions.ReportAppServer.ReportDefModel.EditableRTFExportFormatOptionsClass' from assembly 'CrystalDecisions.ReportAppServer.ReportDefModel, Version=11.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' is overriding a method that has been overridden.

   at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.DotNetExportOptionsToEromExportOptions(ExportOptions exportOptions)

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

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

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

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)

   at Crystal_to_PDF.Program.Main(String[] args) in \\zrh-s107\usersb$\vbfaw\daten\visual studio 2010\Projects\Crystal\Crystal_to_PDF\Program.cs:line 41

 

Any ideas what might be the problem?

 

regards

lukas

Report Grouping Issue on 64 Bit runtime

$
0
0

The report grouping appears to be incorrect on 64 bit runtime. The report displays as expected when run as 32 bit process. It appears to be a regression of a bug fixed on SP5 from this thread http://scn.sap.com/thread/3288217. I am using ADO.NET dataset to bind the data to the report. If there is a private upload link, I have a VS solution with the report and data, that I can upload.

 

Environment:

Crystal Reports Version: 13.0.7.1136

Operating System: Windows 7 x64

NET Framework: .NET Framework 3.5 SP1

Visual Studio 2012

 

Update:

Installed support pack 8 (13.0.8.1216). The issue is reproducible on support pack 8.


VB.NET2010, MySQL and Crystal Report XML Datasource Deployment Problem

$
0
0

Hi, everyone

Im using VB.NET 2010 and MySQL. I have created reports using XML as datasource. I didn't have problems during the development, all seems to work fine.
My problem is whenever I copy the exe file from the "bin" folder of my project and try to run it outside(ex: desktop), it can no longer generate the exact report.

The same is true when I create a deployment setup and try to install it.
This doesn't works even though I'm still using the DEV pc.

I think it cannot generate an exact report when it is not in the "bin" or project location.

 

Here is the code I got from youtube in creating xml file to be used in creating reports. The code creates an xml file where the reports based its data/content. The xml files are created just where the exe file is located.

 

Dim ds As New DataSet

Dim cs As New MySqlConnection(connStr)

Dim da As New MySqlDataAdapter

    sql = "SELECT * . . . . "

    Try

        cs.Open()

        da.SelectCommand = New MySqlCommand(sql, cs)

        da.Fill(ds)

        ds.WriteXml(CurDir() & "\reportFile.xml", XmlWriteMode.WriteSchema)

    Catch ex As Exception

        MsgBox(ex.Message)

    End Try

 

I hope I can get any help or suggestions.

 

Thank you so much.

CR-Viewer parameter prompt does not show all parameters

$
0
0

Hi,

 

i have a problem with a report, edited in Visual Studio 2012 and the latest Support Package 8.

This Report will be loaded in a project with C# 5.0,.NET 4 x86.

After loading the report from the filesystem, all the database connections will be updated.

Finally the manipulated report will be assigned to the integrated Crystal Reports Viewer from the latest SDK.

 

The Problem:

This report has got 3 parameters. 2 for makeup (bool) and 1 for result filter (int).

The really relevant parameter to filter the datasource is not prompted. The parameter-prompt shows only 2 of 3 parameters.

 

I have tried several approaches with no luck.

 

Report-Link

CSharp Form for manipulation

 

What is wrong with this report?

 

Kind regards

Steven

Report+ReportViewer SetDataSource exception on Windows 8

$
0
0

Hello,


I have a .NET-application that references Crystal Reports Development Version for Visual Studio 13.0.8 and utilizes the WinForms ReportViewer. When run on Windows 8, it'll occasionally crash with an uncatchable exception when I try to update the set datasource for a loaded report in the ReportViewer from a locally created DataTable. No connection to a database is used. This happen in the development environment, when run through Visual Studio and in a production environment when deployed together with the corresponding MergeModules. The application is built as a x86-executable with .NET 4.5.


I cannot reproduce the crashes when I run the application with compatibility mode set for Windows 7 or lower.


The crashes are not constant and I can sometime update the datasource multiple times in a row before one occurs.

I receive the following two error reports from Windows:


Event Name: BEX

Response: Not available

Cab Id: 0

Problem signature:

P1: CRTest01.exe

P2: 1.0.0.0

P3: 53032f3f

P4: StackHash_5861

P5: 0.0.0.0

P6: 00000000

P7: PCH_26_FROM_ntdll+0x0002E1A4

P8: c0000005

P9: 00000008

 

Event Name: APPCRASH

Response: Not available

Cab Id: 0

Problem signature:

P1: CRTest01.exe

P2: 1.0.0.0

P3: 5303516b

P4: datadefmodel.dll

P5: 13.0.8.1216

P6: 52a9a8db

P7: c0000005

P8: 00040e99


A simple test application that I use to reproduce the crash is a WinForm with a ReportViewer and two buttons:


protected void bStep1_Click(object sender, EventArgs e)

{

    mReport = new ReportDocument();

    mReport.Load(msFilePath, OpenReportMethod.OpenReportByTempCopy);

    crvViewer.ReportSource = mReport;

}

 

protected void bStep2_Click(object sender, EventArgs e)

{

    DataTable dtData = new DataTable();

    dtData.TableName = mReport.Database.Tables[0].Name;

 

    //Populate the DataTable according to the report.

    //...

 

    mReport.Database.Tables[0].SetDataSource(dtData); //<-- Crash occurs here.

    crvViewer.RefreshReport();

}


Please feel free to respond with any idea of what might be causing this.

 

Thank you very much in advance!

 

Victor Lundberg

What to add to web.config for report viewer

$
0
0

I have a web application that allows users to run reports in a report viewer that is currently running on crystal 2008. I have installed service pack 8 of the runtime for crystal 2013 and changed all of version #'s in my web config to 13.0.8. Now the viewer only returns blank screen when I try to run a report threw the viewer on my app. I am thinking something is wrong in my web config. Is there a guide that explains what I have to have in my web config to get the 2013 viewer to run? My app runs on .net 4.0. Thanks!

group tree is not hiding in crystal report

$
0
0

Followed the instructions here Redirecting...

 

 

And the group tree is still showing. I have just upgraded to the 2013 runtime. Any ideas?

Viewing all 3636 articles
Browse latest View live


Latest Images