Create Static Parameter in Crystal Report XI R2!
Hi Experts,
I created a Report using Universe and while creating Parameter it shows value field empty. Can you help me how to get Fields in it.
Thanks,
Vijay
hi,
If you are using Universe, then 'Value Field' will be empty for Static Parameters.
If you are using Database -> DSN, then try creating report using the DSN.
Now all the available columns will appear in 'Value Field' dropdown. You can choose required column.
Regards,
Vamsee
Similar Messages
-
Need to use DocNum as parameter in Crystal report
Dear All,
I am developing a report for our customer now. It is a invoice report. We need 2 parameters
1) Customer code (drop-down list. can only choose one each time)
Here is my token
Customer@ SELECT CardCode, CardName FROM OCRD WHERE CardType = 'C' ORDER BY CardCode
2) Then we need another parameter to display all invoice number for the specific customer. How can I create the parameter here?
Thanks in advance.
Regards,
YukaYou create two parameters in Crystal Reports. Try these
One for Cusomer (Customer@Select CardName from OCRD where CardType='C') - This would be String, Dynamic
One for DocNum - Type :Number , Static
Import the crystal report using Report Layout Manager to the app menu.
Then navigate to the patch and click on the report, when the report loads you should see a dropdown list for Customer Name and the DocNum will be blank.
Click on View-->System Information and findout field info
create a query : Select DocNum,CardCode,CardName,DocTotal,DocDueDate from OINV where CardCode=$[TableName.Field] -
How to use Dynamic cascading parameter in crystal Report XI ?
Hi,
I want to use Dynamic cascading parameter in crystal Report XI which is to be viewed through the infoview without using the Business View.Is it possible?
I could implemented Dynamic cascading parameter using the CR XI developer without using Business View, but cannot view the report when uploaded it to BOXI, through infoview.
Please suggest..
Thanks in advance..
RajneeshIn the crystal reports field explorer>right click on parameter field>create new-->name the parameter field and select the type as dynamic. Now in the value field click the row and add the database field also add another field below that by clicking on the next row so..on. The order should be like this parent field first and then child field next...... Also click on the last column to add parmater for each level.
Regards,
Raghavendra -
How to add/create additional page in Crystal Report Layout SAP B1
Hi,
I wanna ask about How to add/create additional page in Crystal Report Layout SAP B1 ?
I want when user print Purchase Order then on last page also print some page like Penalty Clause etc.
Pls help me to find the solution.
Br,
Thomas MarsetyoHi,
In your report footer, set it to create a new page before it is printed (In 'Section Expert', select the Report Footer -> 'Paging' tab -> Check 'New Page Before' checkbox). Throw your Terms & Conditions into the Report Footer section.
If you already have a Report Footer that you want to keep, just split the footer into two sections (Right-click the Report Footer section -> 'Insert Section Below') and follow the same procedure for the newly created section.
Check this Link
http://stackoverflow.com/questions/9232239/adding-an-additional-page-to-end-of-a-crystal-report
http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=18960
Regards,
Manish -
Optional Prompt for Date type parameter in Crystal Report.
Hi Every One,
I have a date type parameter in crystal report.When I am convert it to optional prompt it is showing following message.
But the Type field is gray out when I was selecting list of values Dynamic.
Please suggest.
Thanks and Regards
DEVHi,
Please check SAP note:
1710595 - CR_Defining "Optional Prompt" as True for SAP Crystal
Reports Does Not Work
Thanks & Regards,
Nagarajan -
Linking two parametes in Crystal Reports
Hi,
I'm creating a Crystal Report which contains 2 parameters. One dynamic (chosen from a list) and one static (date).
I can run the CR and get prompted for the two parameters, and the data is shown however the two parameters are not working together. eg I can see all the values from the list and not the specific one chosen.
Im not sure if the dynamic parameter is working properly (as all the values from the list are shown) or if it will work fully if linked with the date parameter.
Is there a way of linking the two parameters together to work as one?
I think my logic may be wrong here!
Edited by: Sols12 on Jan 12, 2011 12:13 PMHi,
Welcome you post on the forum.
What is your B1 version and PL?
Thanks,
Gordon -
Passing Parameter to Crystal Report
Hi Experts,
I have created and designed a Report in Crystal Report 2005. I am displaying the report in SAP B1 using Win Form . Here I want to pass 2 parameters to Report ---@FromDate and @ToDate . I have coded to pass these two parameters this way :
Dim RptDoc As New ReportDocument
Dim ParamValue As String = String.Empty
Dim crtableLogoninfos As New CrystalDecisions.Shared.TableLogOnInfos
Dim crtableLogoninfo As New CrystalDecisions.Shared.TableLogOnInfo
Dim crConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
Dim CrTables As CrystalDecisions.CrystalReports.Engine.Tables
Dim CrTable As CrystalDecisions.CrystalReports.Engine.Table
Try
RptDoc.Load(Application.StartupPath() & "\" & ReportName & ".rpt")
RptDoc.SetParameterValue("@FromDate", "01/01/2008")
RptDoc.SetParameterValue("@ToDate", "12/31/2008")
Dim oForm_ReportViewer As Frm_ReportViewer = New Frm_ReportViewer()
oForm_ReportViewer.CRViewer.ReportSource = RptDoc
With crConnectionInfo
.ServerName = oCompany.Server '"(local)"
.DatabaseName = oCompany.CompanyDB '"SBODemoIn"
.UserID = oCompany.DbUserName
.Password = "manager@123" 'oCompany.DbPassword
End With
CrTables = RptDoc.Database.Tables
'Loop through each table in the report and apply the
'LogonInfo information
For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
oForm_ReportViewer.Text = frmTitle
oForm_ReportViewer.WindowState = FormWindowState.Maximized
oForm_ReportViewer.ShowDialog()
Catch Ex As Exception
MessageBox.Show(Ex.ToString)
End Try
But When I view the report in B1 , it throws an Exception "Report or Procedure expects parameter @FromDate which is not supplied. "
Please help me where I am making mistake , what could be the cause of this exception..
Thanks and Regards,
Pooja Singh.Hi Pooja Singh,
You have only set Dim ParamValue As String = String.Empty. Where are two parameter @FromDate and @ToDate?
SetParameterValue will only work if you have defined the parameters already and the parameters have the right format.
You may check this thread:
Re: Crystal report open instead of PLD with same form reference.
Thanks,
Gordon -
Passing single/multiple values to stored proc parameter from crystal report
I tried below solution posted on this forum to pass either a single value or multi-value to a sql server stored procedure parameter (varchar datatype) from crystal report XI R2.
In my crystal report , I am displaying all the available parameter values to the user and the user will select either a single value or multi value.
This worked when I select single value and when I say show sql query in my subreport I see the following:
{CALL "XYZ"."dbo"."storedprocedurename";1('Product 1')}
But this did not worked when I selected multiple values and when I say show sql query in my subreport I see the following:
{CALL "XYZ"."dbo"."storedprocedurename";1('Product 1,Product 2')}
I think it might work if it is as below:*
For multiple values:
{CALL "xyz"."dbo"."storedprocedurename";1('Product 1', 'Product 2')}
Please advise.
Solution Posted on this forum is as follows:
Hi,
As you must be aware of that a crystal report created of a stored procedure will allow only a single value for inserting a multiple value as a parameter in your report and pass those values to your stored procedure please follow the below work around which will be helpful for you.
Symptom
In Crystal Reports, you want to pass a multi-value parameter to a stored procedure. The problem with doing so is that Crystal Reports considers the multi-value parameter to be an array.
How can you pass a multi-value parameter to a stored procedure?
Resolution
Here are the steps to pass a multi-value parameter to a stored procedure:
1. Create a Crystal report, and add a multi-value parameter.
2. Since the multi-value parameter is treated as an array, create a formula that uses the JOIN function. Create a formula as below:
//Formula: @JoinFormula
Join ({?Multi-value parameter array},";")
====================
NOTE:
In the formula above, a semi-colon (";") is the delimiter.
====================
3. Within the main report, create a subreport based on the stored procedure, and include the parameter to be populated with the multi-value list.
4. Link the Join formula in the main report to the stored procedure parameter in the subreport.
Doing so passes a multi-value parameter to the stored procedure.
Regards,
VinayHi Vinay,
First you need to make sure the stored procedure accepts multiple values in the fashion 'a','b','c'.
Then, create this formula in the Main Report:
numbervar i;
stringvar s;
for i:= 1 to ubound({?Parameter}) do
s := s + "'" + {?Parameter}<i> + "'" + ",";
left(s,len(s)-1);
Link this formula to the sub-report's parameter.
Hope this helps!
-Abhilash -
Setting VarChar Variable with String Parameter in Crystal Report Add Command
Setting a VarChar Variable with a String Parameter in a Crystal Report 2008 SP6.3 Add Command is causing an error with a SQL State of 42000. The Error Code depends on which value I select for the parameter. I created the @DateOpt string parameter in the Modify Command window, not in the report. If I comment out line 14 of the SQL the error does not occur.
I have attached the SQL Code and screen shots of the errors. Please tell me what I am doing wrong.Since your parameter is of type STRING, you need to enclose references to it within the Command inside single quotes.
For example, instead of
SET @BeginDate ={?BeginDate}
use
SET @BeginDate ='{?BeginDate}'
hth,
- ido -
Parameter in Crystal Report 8.8
Dear Experts,
I'm creating a stored procedures with few parameters. When I preview the report using Crystal Report 8.8, i can set parameters to NULL and the stored procedures will know to capture all information without any filtering.
But when i Preview External Crystal Report in SAP B1 8.8, I don't have the option to set the Parameters to NULL, and SAP B1 is expecting all Parameters must be filled up, it prompts me an error Paramenter [] is mandatory.
Is there any setting i can do to set parameter to NULL?
Thanks.
Regards,
Lay ChinHave you tried, the Optional Prompt, select True in the parameter field?
Hope this helps.
Edited by: Denisse Calaquian on Jun 29, 2011 11:58 AM -
SAP parameter token - Crystal Report 8.8
Hi,
When I want to create a parameter for selection of BPCode, myparameter@select * from OCRD works well. The idea of filtering with properties etc is fantastic.
However, what I need is to create a parameter with value in AddID in OCRD.
I have tried myparameter@select AddID from OCRD, but, it is not displaying the list for AddID capture in OCRD, instead, it display the same UI as myparameter@select * from OCRD.
How do I get by this?
I have tried, range, multiple value, does not work at all.
Did I miss something?Gordon,
Thanks for replying.
I want to create parameter, as simple as that. Parameter should not be restricted with key value.
In standard Crystal Report, you can create parameter, if you set it as Dynamic, set it to refer to any table field, and use it in report, when running the report, the parameter will be populated with value of the referred field.
How does this work with SAP 8.8?
Are we suppose to use syntax like myparameter@select AddID from OCRD or we just create dynamic parameter as normal?
I have tried both and it does not seems to work properly.
1. If i use myparameter@select AddID from OCRD, it comes out with selecting for OCRD will all those properties, which I am not interested.
2. If I create a dynamic parameter, when runnign the reprot within SAP, nothing has come out on the list for selection.
Has anyone tried that?
No, SQL Command is not what I am interestded, -
DateTime Parameter in Crystal Report
hi,
in one of my crystal reports i'm invoking a procedure which has begin date and end date as parameters.when trying to run the report it's prompting for both date and time. my requirement is just to prompt for date and time is not required. the option of editing the parameter at the report level has been disabled since the parameters dierctly get invoked form procedure , in which i've declared the datatype as
samp_proc(p_begin_date date,p_end_date date,p_ref_cursor in out).
can someone help me on this.
Thanks,
Sailaja.kHi Sailaja,
I'm not sure if this is a known issue or if this a bug, but there are workarounds.
Create a blank report and Insert the original report as a Subreport. Now in the Main report, create a Sttaic parameter of 'Date' type. Create a new Formula called 'Date_conv' and type this:
Datetime({?Date_parameter})
Place this formula on the Report Header and place the subreport on the Report Header too.
Right-click the subreport and select Change Subrpeort Links. Select the formula and move it to the Links to area. Next, from the drop-down on the bottom left select the datetime parameter of the subreport.
You may suppress all the other sections of the main report. The Report should now prompt for a 'Date' instead of the Date time.
Another workaround is by creating a registry key called useDateInsteadOfDateTime. Browse to HKEY_CURRENT_USER\Software\Business Objects\Suite 12.0\Crystal Reports\DatabaseOptions and create a string value called useDateInsteadOfDateTime. Set its value as the Database Server Name or the ODBC DSN name.
I would still recommend using the 1st workaround.
Hope this helps!
-Abhilash -
Inserting static image in crystal report now showing the image
Post Author: liezl
CA Forum: .NET
Hello to everyone,
I am creating a simple report using Crystal Report in .NET 2005. I try to insert a static picture in the report but when I browse it through the web it didn't show at all. When I get the address of the picture it says http://liezl:8080/CrystalImageHandler.aspx?dynamicimage=cr_tmp_image_c31338e7-14d2-45f5-a4f9-29866febb34d.png. The error is "The Resource cannot be found. /CrystalImageHandler.aspx"
Please help me!!!
Thank you.Post Author: eyalkz
CA Forum: .NET
I have the same problem.
The problem started after upgrading to CR XI Release 2, the image is not shown through crystal reports viewer in the browser.
However, I can see the image while printing, in preview mode and in export which means the general path is ok
the image is there but there is only an internal crystal report viewer issue that started in 11.5 version (in 11 version the same code worked)
If you find anything please let me know.
Thanks,
Josh -
Hi all!
Are there create parametter ways in crystal Report but display record of report as select this parametter ?
Thank you!Hello all,
I have a strange issue here. When I use dynamic parameters for my Date number Crystal Report takes forever to load . I mean load all record in report .But I have ran the report at 15 date and at this time it is load record of this date?
thank? -
Problem passing parameter to crystal report subreport from *.aspx page
Background:
I am developing a .NET web application using Visual Studio 2005. The code behind is in VB.net. One of my asp.net pages calls a report, which is invoked when the user clicks a Print button. I have developed this report using the Crystal Reports software that is bundled with Visual Studio 2005. I am passing one parameter from the asp.net page (utilizing the VB.net code-behind on the Print button) to the Crystal report. The report consists of a main report and 5 subreports. Both the main report and the subreports use the same parameter. Both the main report and the subreports are bound to stored procedures, each of which require a parameter.
Problem:
For some reason, the parameter is not being passed from the asp.net page to the report. I am receiving the following error: "CrystalDecisions.CrystalReports.Engine.ParameterField.CurrentValueException: Missing Parameter Values." However, when I remove the subreports, the parameter gets passed, and the report is invoked with no problem.
I have read in other forums that there may be an issue with the Crystal Reports software that is causing this problem. I have downloaded and run the suggested hotfix, but the problem remains unresolved. I have tried changing the linking of my main report to the subreport, but that doesn't help either. It is possible that I am doing something wrong with the linking, as this is the first time I have developed a report with Crystal Reports. I need a workaround or definitive solution. Below is the aspx code used to call the report:
Imports System
Imports System.Collections.Specialized
Imports System.Collections.ObjectModel
Imports System.Collections
Imports System.Text
Imports System.Configuration
Imports System.Data.SqlClient
Imports System.Data
Imports System.Data.SqlClient.SqlDataAdapter
Imports System.Web.Configuration
Imports Crystaldecisions.crystalreports.engine
Imports Crystaldecisions.reportsource
Imports Crystaldecisions.shared
Partial Class OACIS_Award_or_Deny_BudgetSummary_PrintRpt
Inherits System.Web.UI.Page
Dim paramFields As ParameterFieldDefinitions
Dim paramField As ParameterFieldDefinition
Dim paramValue As ParameterValues
Dim paramDiscreteValue As New ParameterDiscreteValue
Public Shared idCase, nameRpt As String
Private PrintRpt As ReportDocument
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
idCase = Request.QueryString("id")
nameRpt = Request.QueryString("prtName")
Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~/")
Dim settings As AppSettingsSection = DirectCast(config.GetSection("appSettings"), AppSettingsSection)
Dim file As String = settings.File
Dim dSource, iCatalog, userIs, passUser, appString As String
dSource = Nothing
iCatalog = Nothing
userIs = Nothing
passUser = Nothing
appString = config.ConnectionStrings.ConnectionStrings("OacisConn").ToString()
Dim AppArray() As String = Split(appString, ";")
Dim arrayLgth As Integer = AppArray.Length
Dim i As Integer
For i = 0 To arrayLgth - 1
Dim pairIs() As String = Split(AppArray(i), "=")
Dim firstItem As String = pairIs(0)
Dim secondItem As String = pairIs(1)
If firstItem = "Data Source" Then : dSource = secondItem : End If
If firstItem = "Initial Catalog" Then : iCatalog = secondItem : End If
If firstItem = "UID" Then : userIs = secondItem : End If
If firstItem = "PWD" Then : passUser = secondItem : End If
Next
Dim crReportDocument As ReportDocument
Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
Dim crconnectioninfo As ConnectionInfo
Dim crDatabase As Database
Dim crtables As Tables
Dim crtable As Table
Dim crtablelogoninfo As TableLogOnInfo
Dim Fname As String
Dim Prtname As String
Dim FPath As String
Dim crSection As Section
Dim crReportObject As ReportObject
Dim crSubreportObject As SubreportObject
Dim subRepDoc As New ReportDocument
FPath = Server.MapPath("") + "\"
Dim rptIs As String = nameRpt
crReportDocument = New ReportDocument
Prtname = FPath
Prtname = Prtname + rptIs
crReportDocument.Load(Prtname)
Fname = "C:\WINDOWS\TEMP\" & Session.SessionID.ToString & ".pdf"
crconnectioninfo = New ConnectionInfo
crconnectioninfo.ServerName = dSource
crconnectioninfo.DatabaseName = iCatalog
crconnectioninfo.UserID = userIs
crconnectioninfo.Password = passUser
crDatabase = crReportDocument.Database
crtables = crDatabase.Tables
For Each crtable In crtables
Try
crtablelogoninfo = crtable.LogOnInfo
crtablelogoninfo.ConnectionInfo = crconnectioninfo
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.SetDataSource(Prtname)
crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
crtablelogoninfo.ConnectionInfo.UserID = userIs
crtablelogoninfo.ConnectionInfo.Password = passUser
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.Location = iCatalog + ".dbo." + crtable.Name
Catch ex As Exception
Response.Write(ex)
Exit Sub
End Try
Next crtable
For Each crSection In crReportDocument.ReportDefinition.Sections
For Each crReportObject In crSection.ReportObjects
If crReportObject.Kind = ReportObjectKind.SubreportObject Then
crSubreportObject = CType(crReportObject, SubreportObject)
subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
For Each crtable In subRepDoc.Database.Tables
Try
crtablelogoninfo = crtable.LogOnInfo
crtablelogoninfo.ConnectionInfo = crconnectioninfo
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.SetDataSource(Prtname)
crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
crtablelogoninfo.ConnectionInfo.UserID = userIs
crtablelogoninfo.ConnectionInfo.Password = passUser
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.Location = iCatalog + ".dbo." + crtable.Name
Catch ex As Exception
End Try
Next
End If
Next
Next
crDiskFileDestinationOptions = New DiskFileDestinationOptions()
crDiskFileDestinationOptions.DiskFileName = Fname
crExportOptions = crReportDocument.ExportOptions
With crExportOptions
.DestinationOptions = crDiskFileDestinationOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.PortableDocFormat
End With
Dim parIDCase As ParameterValues = New ParameterValues
Dim disIDCase As ParameterDiscreteValue = New ParameterDiscreteValue
disIDCase.Value = idCase
parIDCase.Add(disIDCase)
crReportDocument.DataDefinition.ParameterFields("@ID_CASE_NMBR").ApplyCurrentValues(parIDCase)
crReportDocument.Export()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(Fname)
Response.Flush()
Response.Close()
System.IO.File.Delete(Fname)
Catch ex As Exception
lblMessage.Visible = True
lblMessage.Text = "Error Load
" & Convert.ToString(ex)
End Try
End Sub
End Class
Your help is greatly appreciated!Thanks for your help!
I've now gotten past the "missing parameter values" error, and the report renders fine in the report viewer. However, I've encounted another problem. The data in my main report displays correctly, but the data in my subreport does not display. Of course, when I view the report in the designer, both the main report and subreport display correctly. What am I doing wrong? Below is my vb.net code:
Try
idCase = Request.QueryString("id")
nameRpt = Request.QueryString("prtName")
Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~/")
Dim settings As AppSettingsSection = DirectCast(config.GetSection("appSettings"), AppSettingsSection)
Dim file As String = settings.File
Dim dSource, iCatalog, userIs, passUser, appString As String
dSource = Nothing
iCatalog = Nothing
userIs = Nothing
passUser = Nothing
appString = config.ConnectionStrings.ConnectionStrings("OacisConn").ToString()
Dim AppArray() As String = Split(appString, ";")
Dim arrayLgth As Integer = AppArray.Length
Dim i As Integer
For i = 0 To arrayLgth - 1
Dim pairIs() As String = Split(AppArray(i), "=")
Dim firstItem As String = pairIs(0)
Dim secondItem As String = pairIs(1)
If firstItem = "Data Source" Then : dSource = secondItem : End If
If firstItem = "Initial Catalog" Then : iCatalog = secondItem : End If
If firstItem = "UID" Then : userIs = secondItem : End If
If firstItem = "PWD" Then : passUser = secondItem : End If
Next
Dim crReportDocument As ReportDocument
Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
Dim crconnectioninfo As ConnectionInfo
Dim crDatabase As Database
Dim crtables As Tables
Dim crtable As Table
Dim crtablelogoninfo As TableLogOnInfo
Dim Fname As String
Dim Prtname As String
Dim FPath As String
Dim crSection As Section
Dim crReportObject As ReportObject
Dim crSubreportObject As SubreportObject
Dim subRepDoc As New ReportDocument
FPath = Server.MapPath("") + "\"
Dim rptIs As String = nameRpt
crReportDocument = New ReportDocument
Prtname = FPath
Prtname = Prtname + rptIs
crReportDocument.Load(Prtname)
Fname = "C:\WINDOWS\TEMP\" & Session.SessionID.ToString & ".pdf"
crconnectioninfo = New ConnectionInfo
crconnectioninfo.ServerName = dSource
crconnectioninfo.DatabaseName = iCatalog
crconnectioninfo.UserID = userIs
crconnectioninfo.Password = passUser
crDatabase = crReportDocument.Database
crtables = crDatabase.Tables
For Each crtable In crtables
Try
crtablelogoninfo = crtable.LogOnInfo
crtablelogoninfo.ConnectionInfo = crconnectioninfo
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.SetDataSource(Prtname)
crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
crtablelogoninfo.ConnectionInfo.UserID = userIs
crtablelogoninfo.ConnectionInfo.Password = passUser
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.Location = iCatalog + ".dbo." + crtable.Name
Catch ex As Exception
Response.Write(ex)
Exit Sub
End Try
Next crtable
For Each crSection In crReportDocument.ReportDefinition.Sections
For Each crReportObject In crSection.ReportObjects
If crReportObject.Kind = ReportObjectKind.SubreportObject Then
crSubreportObject = CType(crReportObject, SubreportObject)
subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
For Each crtable In subRepDoc.Database.Tables
Try
crtablelogoninfo = crtable.LogOnInfo
crtablelogoninfo.ConnectionInfo = crconnectioninfo
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.SetDataSource(Prtname)
crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
crtablelogoninfo.ConnectionInfo.UserID = userIs
crtablelogoninfo.ConnectionInfo.Password = passUser
crtable.ApplyLogOnInfo(crtablelogoninfo)
crtable.Location = iCatalog + ".dbo." + crtable.Name
Catch ex As Exception
End Try
Next
End If
Next
Next
crDiskFileDestinationOptions = New DiskFileDestinationOptions()
crDiskFileDestinationOptions.DiskFileName = Fname
crExportOptions = crReportDocument.ExportOptions
With crExportOptions
.DestinationOptions = crDiskFileDestinationOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.PortableDocFormat
End With
crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase)
crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase, "MemberName")
crReportDocument.Export()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(Fname)
Response.Flush()
Response.Close()
System.IO.File.Delete(Fname)
Catch ex As Exception
lblMessage.Visible = True
lblMessage.Text = "Error Load<br>" & Convert.ToString(ex)
End Try
Edited by: LaShandra Knox on Sep 17, 2008 7:59 PM
Maybe you are looking for
-
I have installed the update to fix Mail problems in Mavericks but still cannot do a search in Mail so cannot easily find specific messages.
-
Hello everybody, for a special mappging I use ABAP mapping -everything fine. But I need to split the message with ABAP mapping. Does anybody know if this is possible ? In the ABAP-class I use the interface IF_MAPPING. This has as a result parameter t
-
Setting component to recieve enter key presses?
Hi all, if I have a dialog with a number of buttons on it, is there anyway I can set one component (an OK button) to be activated when the enter button is pressed, and another one (cancel) to be activated when the escape button is pressed? I know I c
-
CS5 Hangs when editing photo from LR4
Group - I just got off the phone with Adobe support and they indicated this problem is a known problem in LR4 and suggested getting help from the experts at Adobe Labs. I was part of the LR4 beta test and never experienced this before. The problem oc
-
JOptionPane does not get destroyed
hi everyone, i am using jdk1.4.1 i am using a JOptionPane to show a confirm dialog and then depending on the response i am sending a response to servlet, which processes correctly , then i am redirecting to home page, but at this juncture the dialog