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

Finding the "primary" table in a report in an ASP.Net viewer application

$
0
0

Hi,

 

I have a web application that reads a list of existing Crystal Report files allowing the user to select the report they wish to run. I also allow the user to restrict the report data by appending a list of client Ids. To do this I check if the client table is present in the report and if so create a new selection criteria e.g. "AND {Client.id} in [ "1234", "2345", "3456"]" and append this to the selection criteria.

 

This all works nicely however I now wish to allow a list of a 2nd set of Ids which relate to a different table. I do the same check for this 2nd table and again if present allow the appending. I can identify the source of each list of ids so know whether I have client ids or not.

 

My problem is that there may be reports containing both tables and if I append the wrong list of ids the report will be incorrect.

 

Is there a way to identify the primary table in a report e.g. the first table in the SQL select statement ??

 

example SQL:

select * from client left outer join secondtable on secondtable.key = client.key

 

Client is the 'primary' table so allow the appending of a list of client ids but not ids from the 2nd table.


Database Login Failed and 'Value cannot be null. Parameter name: inputString'

$
0
0

Hi

 

I am hoping someone maybe able to give me some pointers on the following issue I am having:

 

Using Crystal Reports (in VS2010) I have created 2 reports that call stored procedures.  The first report calls a stored procedure that takes no parameters and is just a select, the second report calls a stored procedure that takes two date parameters.

 

When the reports are run within the VS201 environment they display and work exactly as I would expect in the Main Report Preview Tab.

 

Moving along to running these from the web application, I believe this is ASP based, unfortunately I have inherited this solution so dont have lots of information :-(

 

The following behaviour is observed:

 

For the report where parameters are passed:

     Input Box is displayed

     Parameter is entered

     Error is displayed 'Value cannot be null.  Parameter name: inputString'



For the report where no parameters are passed the following error(s) is displayed:

     Database logon Failed

     If I run this particular report again then the error is displayed 'Value cannot be null.  Parameter name: inputString'


I am no expert so any pointers are appreciated in how and where I should be looking to resolve this issue.


My understanding was that the database and all connection information was stored in the crystal report.  However it seems there is an extra layer of connection information that needs to be set somewhere?


web,config?

connection.config?

services.config?


Any help appreciated


Thanks

Kam


Export Crystal Report Crash Application from C# 4.0 App. Throw Unhandled exception

$
0
0

Using C# 4.0 Winform Application(32 bit) with Crystal Report 2011 with Crystal report .Net runtime "CRRuntime_32bit_13_0_16".

During exporting report into PDF. An unhandled win32 exception occurred.

 

A few time this works and next time throw unhandled error as below

Problem signature:

Problem Event Name: APPCRASH

Application Name: Application.vshost.exe

Application Version: 10.0.30319.1

Application Timestamp: 4ba2084b

**Fault Module Name: MSVCR80.dll**

Fault Module Version: 8.0.50727.6229

Fault Module Timestamp: 4ec352ab

Exception Code: c0000005

Exception Offset: 000173c1

OS Version: 6.1.7601.2.1.0.256.48

 

I am exporting this first then sending the file in mail as attachment.

Then I delete the file after export to pdf process end.

Once this process finished only then user is able to do another process.

 

The sample code is as below

 

    if (m_ReportDocument != null)

    m_ReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, fileName);

    if (!File.Exists(fileName))

    { if (m_ReportDocument != null)

    m_ReportDocument.Dispose();

    return false;

    }

Logon failed. Details: mscorlib : Could not find part of file.... XML

$
0
0

I am getting this error when I am moving a report to production.

 

Inner Exception: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.

Details: mscorlib : Could not find a part of the path 'E:\Development\Report\ConsoleApplication1\XML\Report.xml'.

Failed to export the report.

 

Note:

It works in Development Environment.  Because the folder path "E:\Development\Report\ConsoleApplication1\XML\" is available in Development Environment.  But in Production Server, the path is not present.

CRYSTAL REPORTS 2016 and VISUAL STUDIO 2015

$
0
0

Hi,

we updated Crystal Reports 9 with the new 2016 version.

In "Add References" what should we select to properly update the web.config
file?


In production we have to install a setup? If so, which one?

 

 

Antonio Lavecchia

UNIMEDIA SOFT SRL

Crystal Reports - Alignment

$
0
0

After upgrading the server from Crystal Reports 13 SP5 to  Crystal Reports 13 SP 16 ( i.e.: installed: CRRuntime_64bit_13_0_16.msi), the existing reports look fine except for the header text ( or date in header).

 

When running reports in our web application, the header text box is now showing Left Aligned instead of Centered.

 

Is there a web.config setting or something simple to fix this alignment?

How to change the default IIS Viewer install location for CRRuntime (64-bt) v13.0.3?

$
0
0

I have tried overriding the MSI kit values for INSTALLDIR, TARGETDIR, IISNET2VIEWERDIR, and IISNET4VIEWERDIR but they always use the Microsoft default folder of C:\inetpub\wwwroot. We do not have our web site at that file location.

 

Here is the most recent CMD line I have tried:


MSIEXEC /i "CRRuntime_64bit_13_0_3.msi" /log .\CRRuntime.log IISNET2VIEWERDIR="C:\inetpub\donordoc-test-healthcare\WWWRoot\aspnet_client\system_web\2_0_50727\" IISNET4VIEWERDIR="C:\inetpub\donordoc-test-healthcare\WWWRoot\aspnet_client\system_web\4_0_30319\"


From the log file, here are the PROPERTY values it used (note it ignored my values for the Viewers!):


Property(S): VersionNT = 601

Property(S): TARGETDIR = C:\

Property(S): DOTNETROOTDIR = C:\Windows\Microsoft.NET\Framework\

Property(S): NETFRAMEWORKDIR = C:\Program Files (x86)\SAP BusinessObjects\

Property(S): AnsiSystemFolder = C:\Windows\SysWOW64\

Property(S): SystemFolder = C:\Windows\SysWOW64\

Property(S): WindowsFolder = C:\Windows\

Property(S): AppDataFolder = C:\Users\DysonR-S\AppData\Roaming\

Property(S): ProfilesFolder = C:\Windows\

Property(S): DesktopFolder = C:\Users\Public\Desktop\

Property(S): ProgramMenuFolder = C:\ProgramData\Microsoft\Windows\Start Menu\Programs\

Property(S): StartMenuFolder = C:\ProgramData\Microsoft\Windows\Start Menu\

Property(S): FontsFolder = C:\Windows\Fonts\

Property(S): TempFolder = C:\Users\DysonR-S\AppData\Local\Temp\

Property(S): CommonAppDataFolder = C:\ProgramData\

Property(S): INSTALLDIR = C:\Program Files (x86)\SAP BusinessObjects\

Property(S): IISNET2VIEWERDIR = C:\inetpub\wwwroot\aspnet_client\system_web\2_0_50727\

Property(S): IISNET4VIEWERDIR = C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\

Property(S): NET2VIEWERDIR = C:\Windows\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles\

Property(S): NET4VIEWERDIR = C:\Windows\Microsoft.NET\Framework\ASP.NETClientFiles\

Property(S): ProgramFilesFolder = C:\Program Files (x86)\

Property(S): CommonFilesFolder = C:\Program Files (x86)\Common Files\

Property(S): SourceDir = C:\Patches\Install Kits\Crystal Reports\


I tried to attach the full log file, but it is too big.


Any suggestions on how to not use the "inetpub\wwwroot" folder.


Thanks,

Rick

Where is Crystal Reports for Visual Studio

$
0
0

Where is the latest version of Crystal Reports for Visual Studio?

 

Thanks,

 

Ralph         


Crystal Report Viewer format issue

$
0
0

After successfully importing web package into iis 8, when executing the report the crystal report viewer displays the report displays but with bad formatting of fields in  IE version 10.  The display fields are crystal report parameters fields positions on the report.  This same report looks fine when sending as a pdf in an email from the server.  And the report renders well on the development pc.  The Web application is installed on a windows 2012 Server.  The Crystal report viewers (v13) folder is installed within C:\inetpub\wwwroot\aspnet_client\crystalreportviewers13 On the Server, with My Web application having Crystal report viewers (v13) folder C:\inetpub\wwwroot\myappliocation\aspnet_client\.  Also tried to copy the Crystal report viewers folder into the web application root but received same format issue C:\inetpub\wwwroot\myappliocation\aspnet_client\crystalreportviewers13. Any ideas why the view is not rendering the report properly? see attachment for report image....

Migrate VB6 Crystal Report to VB.Net

$
0
0

Hi.

 

I have some crystal reports that was created in VB6. I need to migrate all old crystal report in new solution/technology (VB.net). I have exported those reports in VB.net but everything is not migrated properly.

 

e.g., there are some custom public properties defied in old report files but it is not available in exported report file. Also I am not able to map public properties object to report object.

 

May be I am doing some wrong step. Can anyone help me on this?

Crystal Reports prompting for login details when accessing

$
0
0

Hi,

 

We are migrating our application from 2003 server to 2012 servers. All the application works fine but we have an issue in generating crystal reports.

 

It prompts for DB login credentials when i am trying to access the reports.  we are using SAP Crystal reports run time engine for .NET Framework(64- bit) .

 

We are making connectivity through ODBC connection form oracle. Database version is 11g.

 

 

Do we a have solution for it.?

 

Response is highly appreciated.

 

Regards,

Nagesh.

Edit Parameters data type through programatically

$
0
0

Hi , I am working on to edit / modify parameters data type in SQL command programmatically using c#? Can please anybody let me know how to edit parameters data type which are there in the command through code. currently I can find Command like this foreach (CrystalDecisions.ReportAppServer.DataDefModel.Table tmpTbl in reportClientDocMtf.DatabaseController.Database.Tables)                 { if (tmpTbl is CommandTable)                         {                             CommandTable cmdTbl = (CommandTable)tmpTbl; } }

Stuck trying to get Crystal Reports to run out of Visual Studio on 64 bit computer

$
0
0

I have two projects that have embedded Crystal Reports. Department is getting new 64 bit computers for employees. Have tried everything to get the reports to run out of Visual Studio.net on a 64 bit computer. Every time it prompts the user for database login when they try and run report. These projects have been running fine for years on 32 bit computers. They are currently in both Visual Studio 2012 and 2015. Have researched all over the internet with no luck.

 

Any help would be appreciated.

 

Thanks,

 

David

System.IO.FileNotFoundException was unhandled

$
0
0

Hello,

 

I am using CRforVS_13_0_16 with VS 2012. I have written a simple Winform application that is to display a simple report (all it does is display the first and last name of people in the tblNames)

 

Attached is the error page I'm getting. I get the error in the IDE.For references, I have:

 

CrystalDecisions.CrystalReports.Engine

CrystalDecisions.ReportSource

CrystalDecisions.Shared

CrystalDecisions.Windows.Forms

 

The code:

 

    Dim rpt As New rptNames
    Dim da As New SqlCeDataAdapter
    Dim dsNames As New DataSet("tblNames")
    Dim con As New SqlCeConnection
    Dim cmd As New SqlCeCommand

 

    con.ConnectionString = "Data Source=|DataDirectory|\NamesNumbers.sdf"
    con.Open()
    cmd.Connection = con
    cmd.CommandText = "select FirstName,LastName from tblNames"
    da.SelectCommand = cmd
    da.Fill(dsNames, "tblNames") 
    rpt.SetDataSource(dsNames)  ' This line generates the error
    CrystalReportViewer1.ReportSource = rpt

  End Sub

 

Why am I getting this error?

Linking a subreport using a data field causes "Missing Parameter Values"

$
0
0

I have a number of reports that are being called from C#. Many of the reports have subreports. For subreports that appear at the end of the report, in the footer for example, I have no issues. I create parameters in the main report, and link them to the subreport, and it works fine.

 

I have now run into a situation where the subreport is part of a group footer. I need to link this subreport based on one of the fields in my dataset, RecKey. When I do this, a parameter called "?PM-ibinvoice.reckey" is created (ibInvoice is the name of the dataset). It looks a little different than the others, which I assume is because it is being used to filter the data in the subreport.

 

parameter.JPG

 

So far, so good. I believe this is the right way to do this. However, when I attempt to export the report, I get "Missing Parameter Values".

 

I've done enough experimenting to know for certain that the "PM" parameter is the one that is missing. Even if it were possible to set a parameter on a subreport, which it isn't, that wouldn't be correct. The subreport data needs to be filtered on the reckey.

 

This seems like a fairly common case, so I must just be missing something. Any ideas would be appreciated.

 

Thanks,

 

Geoff Callaghan


Crystal report Run time DLL

$
0
0

Hi,

 

I am using Visual Studio 13 for my one of the project in C#. What are the DLL I can include so I do not have to install Crystal report at set up time.

 

 

Thanks

 

Kamal

How to change Datasource Dynamically

$
0
0

Hi Guys,

From last 3 days I am stuck with one issue ,dont know whether Crystal reports works like this or I am missing something but ultimately I am struggling from last 3 days .here is the problem :

 

I have 1 common report which I want to run for 3 different instance of application (with 3 different DBs but same schema) .

I have designed this report on  DB_1 (SERVER1) so with 2nd (DB_2) and 3rd (DB_3) it doesn't work if i try upload this report on different server.


Why ? because when we design a report it will save that DB details  and will not run for other DB & Server.



Tried this code to set DB details dynamically but doesnt work :


        ReportDocument myReportDocument;

        myReportDocument = new ReportDocument();

        string reportPath = Server.MapPath("~Test.rpt");

 

 

        myReportDocument.Load(reportPath);

       

 

        myReportDocument.SetDatabaseLogon("Username1", "password1", "Server1", "database1");   ( Used this while designing report )

        

        //myReportDocument.SetDatabaseLogon("Username2", "password2", "Server2", "database2");   ( want to run on this but gives error  as Database login failed )

 

 

Please assist.

 

Thanks,

Ankit

How to access Format event in .rpt files in .Net

$
0
0

Hi folks,

 

I'm converting over a number of reports from VB6 which used code in DSR files to conditionally format the report in various ways by examining data at runtime in the detail section's Format event. I found a reference to a similar capability in the Crystal Reports XI Technical Implementation Guide, but I've been unable to locate any examples showing how a similar capability to the VB6 DSR code execution for report events can be accessed in .Net.

 

Browsing the available events in the code view of the Report's.vb file only yields a FormatSection event, which seems not to be quite right (and for which I can find no documentation whatsoever).

 

How does one place code or otherwise act when a section's Format event occurs?

SAP Crystal Report stuck on "Please wait while the document is processing" but not hang

$
0
0

My Sub Report works until I add stored video parameters and linked it to my Main, It got stuck on "Please wait while the document is processing".

 

 

The Main Report Preview Works but if I run the report it doesn't

 

Here's my stored procedure for both reports:

 

ALTER PROCEDURE[dbo].[usp_MainReport]            (                                      @StartDate DATETIME,               @EndDate DATETIME            )            AS  BEGIN
select * from users
END
ALTER PROCEDURE[dbo].[usp_SubReport]            (                               @StartDate    DATETIME,            @EndDate      DATETIME            )            AS  BEGIN
select * from users
END

Is there a problem with my SAP Crystal Report?

Error while loading crystal report

$
0
0

I get the following error while opening a report.

Also please note that, i have already installed the cr runtime environment (version 13) in the target machine.

 

System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.

   at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()

 

 

Kindly help

Viewing all 2556 articles
Browse latest View live


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