Parameters Prompt on Export

I am using Crystal Reports 2008 to try to build an ASP.NET page that enables me to present reports we've written on the web, via Visual Studio 2008/IIS7/ASP.NET 3.5. The quick question is what event is fired when a user clicks on the export or print buttons in the CrystalReportViewer control?
The long question is that I am trying to build a custom interface for the report viewer, wherein that the user enters the parameters they need for the report in 'our' interface and then these values are added to the report using the ReportDocument.SetParameterValue method in the code-behind. However, the parameter values were lost when trying to do anything on the report. I have got search and page navigation working by using the much recommended technique of saving the report file into a Session variable, and rebinding the CrystalReportViewer to this session variable in the 'OnSearch' and 'OnNavigate' events. However, I can't work out how to do the same when trying to export or print the report.
I can't seem to find the answer elsewhere on the web - can anyone here help?
Many thanks.

Hello Adam. Thanks for your response.
I actually am resetting the report source in my Page_Load event as follows:
if (Session["report"] != null)
    crvReportViewer.ReportSource = Session["report"];
After the user has selected their parameters, they click a button which runs a function to create the ReportDocument, assign the parameters and add the ReportDocument to the session variable. That function is essentially as follows:
ReportDocument report = new ReportDocument();
string reportPath = strReportFilePath;
report.Load(reportPath);
String strReportDateFrom = txtReportDateFrom.Text;
String strReportDateTo = txtReportDateTo.Text;
report.SetParameterValue("ReportDateFrom", strReportDateFrom);
report.SetParameterValue("ReportDateTo", strReportDateTo);
Session.Add("report", report);
crvReportViewer.ReportSource = report;
Am I missing something here, as I can't get things like the Search to work unless I add the code at the top to the OnSearch event?
Many thanks.

Similar Messages

  • How to handle the OK button of the parameters prompt of a crystal report

    Hi,
    how to handle the OK button of the parameters prompt of a crystal report in vba.NET?
    I want to use the parameter prompt from the crystal report itself and I want to know when the report is ready. I need to export programatically by sending email to a list of employees after the parameters has been set. The emails I send depends on the results of the report.
    Im using a CrystalReportViewer control  in VS2010 and Crystal Report for VS2010 v13.0.1.220.

    Right. But the parameter screen is driven by the viewer. Unless you create your own parameter screen and pass the parameters to the report via code.
    Another thing I am not sure about:
    "Then by code I want to read all the employees id from the report and send email to them with specified pages of the report. (1 page per employee)"
    How do you plan on reading the employee ID from the report? I am not aware of any API that will read a value in a report so that you can then decide what page to send to whom.
    I think you're approaching this kinda backwards. A question to ask is; can you do what you are trying to do in code in the CR designer? If not, using APIs will not work either. I suspect your approach should be a report that uses an employee filter. Run the report for employee x, get the report populated with the data for that employee and email it. Repeat for employee x1, employee x2, etc.
    - Ludek

  • Cascading Parameters prompting twice when scheduling report on CMC

    Hi all,
    I am having some difficulty with the Central Management Console (CMC) when scheduling a report I created.
    The report contains one sub-report with a stored procedure to generate the data. This stored procedure has 5 parameters including region and city. In the main report I implemented cascading parameters for region and city and passed their values to the parameters of the stored procedure for the sub-report. All of this works fine within Crystal Reports when I run the report and even when I use the "View" option in CMC. However when I use the "Schedule" option in CMC to schedule the report and I am setting the parameters for the report, there is some odd behavior. The first parameter shows two values, one for region and one for city (this is fine). The next parameter is a string variable. When I try to set this parameter, I am prompted again with the cascading parameters for the region and city. This messes up all the parameters and if I continue to set the other parameters, I am prompted to give a value for the previous parameter.
    Why am I being prompted twice to enter a value for the cascading parameters? How can I fix this?
    Thanks in advance for your help.
    P.S. I thought about using the cascading parameters as filters in the Crystal Report itself but this causes the report to be slow as a lot of data is brought back from the stored procedure before filtering.
    P.P.S. I am using Crystal Reports 2008

    Hi Jevon,
    What version of BO (Service Pack, Patch) are you using?
    Try upgrading the version to a higher Service Pack/Patch on a Test environment to see if that resolves the issue.
    -Abhilash

  • Binding parameters lost after exporting OWB

    Binding parameters lost in Process Flow after exporting.
    So each time when do the importing, I have to run a OMB scrits with OMBALTER as a patch to amend .
    Thanks,

    Binding parameters lost in Process Flow after exporting.
    So each time when do the importing, I have to run a OMB scrits with OMBALTER as a patch to amend .
    Thanks,

  • Parameters prompting while opening webpage

    i have created a crystal report in Crystal Reports 2008, and embedded this into a webpage using visual studio 2008. when i open the web page, it prompts for the parameters(start and end dates), but, by default it shows current date and time. i want this to show whatever date but time must be 12:00:00 or 00:00:00 by default. please help.

    This is more of a CR design query. Post your query to the [Crystal Reports Design|SAP Crystal Reports;. Once the report is working there as you want, see what it does in the app.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Prompt for export location

    Hello,
    I am creating a simple script to automate exporting a document as a pdf. How can I prompt the user for the export location with a file browser dialog? (Using javascript). Here is the script:
    // choose PDF preset
    var myPDFExportPreset = app.pdfExportPresets.item("PRESS");
    // get document name
    var myDocName = app.activeDocument.name;
    // remove .indd from filename
    var newDocName = myDocName.substring(0,myDocName.length-5);
    // create exported filename
    var myFile = File("/c/"+newDocName+" - PRESS.pdf");
    // export the PDF
    app.activeDocument.exportFile(ExportFormat.pdfType, myFile,false, myPDFExportPreset);
    Right now it exports the PDF to /c/ - but I'd like to be able to browse for the export location. Can this be done?

    You can select a folder with Folder.selectDialog()
    Try with below code:
    // choose PDF preset
    var myPDFExportPreset = app.pdfExportPresets.item("PRESS");
    // get document name
    var myDocName = app.activeDocument.name;
    // remove .indd from filename
    var newDocName = myDocName.substring(0,myDocName.length-5);
    //select output folder
    var myOutputFolder = Folder.selectDialog( 'Select output folder');
    // create exported filename
    var myFile = File(myOutputFolder + "/" + newDocName + " - PRESS.pdf");
    // export the PDF
    app.activeDocument.exportFile(ExportFormat.pdfType, myFile,false, myPDFExportPreset);
    Shonky

  • Search Help Parameters Import and Export??

    Hello,
    In my WDA View i have some <b>InputFields</b>, which are mapped to Context which is copied from a Dictionary Structure. For all Input Fields i have a corresponding Search Help assigned in the Dictionary Structure. Search Help for some of the InputFields require value of other InputFields.
    Now, in the WDA when i click on Search Help of any InputField the values for some of the parameters from Input Field which are already set are not being shown in the Search Help Restrictions window. I have already checked and made sure that the field name and data element types are maintained the same in Dictionary Structure and associated Search Help. I even checked for the import checkbox in search help and everything looks fine to me from Dictionary Search and Search Help.
    Can anybody please tell me what should i do to get the values in the Search Help Restriction window which have been already selected in the View InputFields?
    I hope i managed to explain my problem correctly, if not then please tell me so i could describe in more detail.

    I figured it out. I forgot to assign the Field Name in the Dictionary Structure. Thanks.

  • Business Objects Edge 3.1 - Dynamic Parameters prompting for password

    Hi,
    I installed BO Edge 3.1 and Crystal Reports 2008.
    Designed report which is using dynamic parameter. Then I deployed this report to BO Edge. In CMC I configured database parameters, so user doesnt have to input it everytime when viewing or refreshing report.
    The problem is that when there is dynamic parameter in CMC or InfoView it is asking for database credentials anyway.
    I found out on the couple forums that it is cause by dynamic parameter. And I found also solution using Business View Manager.
    The problem is that BO Edge 3.1 doesnt have in the Client Aplications Business View Manager.
    So my questions are :
    1. Is there possibility to get Business View Manager for BO Edge?
    2. Are there any other possibilities how to specify database credentials also for dynamic parameters so user doesnt have to do that anymore?
    Any help will be appreciated.
    Thank you.
    Viktor

    You can find it here:
    http://help.sap.com/businessobject/product_guides/
    You need to look for the SAP BusinessObjects Enterprise Integration for SAP Solutions Installation and Administration Guide*
    Edge is a reduced version of Enterprise... -
    Christian
    Edited by: Christian Krueger on May 25, 2011 11:43 AM

  • Parameterized SSRS report export to PDF automatically

    Hello,
    if in my case there are approx. 200 values that I can select via drop down list, does above mentioned applies for my case in which I need, somehow, to run all the reports automatically, one by one and to have them exported to PDF, automatically, too, with
    the names given automatically in a form parameter_name_value1.PDF, parameter_name_value2.PDF and so on...You are mentioning
    "using an expression or custom code"....
    How to get this job done?
    Note: Code that I provided bellow some times earlier does exactly that but, in ACCESS?

    For your case, you may want to look into data-driven subscription where you may be able to run individual report and export them to pdf and have them deliver via email if you have that email in a table. Good luck

  • Parameters - Prompt for additional parameter

    Hi Everyone,
    I have created a parameter with 2 values ( for example A and B).
    If A is selected the report will appear as normal based on a set value.
    If B is selected I would like another parameter to appear prompting the user to enter another value.
    Is this possible?
    i.e. Is it possible to make a second parameter appear only if the results of the first parameter = B?
    Thanks in advance for any help....
    Best regards to all
    Roger.

    I think it is not possible to hide the paraemter dynamically. As a workaround you can try considering the other parameter value depending on the value selected in first parameter. Try this
    if ="A" then
    condition 1
    else
    condition 2
    you can use the other parameter in condition 2. But you need to enter all the parameter values everytime and you can only consider the other parameter value when you select parameter value as B.
    If you are using CR2008 you can make the parameter as optional in which you can run the report without entering any value in the second parameter
    Regards,
    Raghavendra.G
    Edited by: Raghavendra Gadhamsetty on Jun 25, 2009 6:16 PM

  • Parameters prompts& default

    Hello all,
    Have 2 questions regarding parameter fields:
    (1) Regarding static parameter: Is it possible to import field values directly from the DB?
        After I select <Action>-->"Append all DB values" nothing is added to value field?
    (2) I have applied following condition in the query command
    BR.STATUS_NAME in {?P_BR_STATUS}
    . The parameter {?P_BR_STATUS} was defined as static and allow custom values.
    Now I would like to insert a default value for this parameter-which coincides with omitting the above condition. Unfortunately the following formula
    if(not HasValue({?P_BR_STATUS})) then
    {?P_BR_STATUS}={Command.STATUS_NAME}
    doesn't work
    thanks in advance for your help.
    regards
    Edited by: Herman Riegelhaupt on Jun 17, 2008 4:28 PM
    Edited by: Herman Riegelhaupt on Jun 17, 2008 4:29 PM

    Hello,
    Thanks for your reply.
    >
    R Coleman wrote:
    In regards to your second question I create the parameter with an * as the default selection and then a formula referencing the parameter for my record selection.
    >  If {?P_BR_STATUS} = "*"  then true else {BR.STATUS_NAME} like  {?P_BR_STATUS}
    Your solution works fine on report level. However I would like to apply the same on SQL
    level, to improve performance. So my query in the command clause contains the
    following condition 
    WHERE BR.STATUS_NAME in {?P_BR_STATUS}
    Now my default value would be when {?P_BR_STATUS} is null then I would like to
    ommit this condition. Is it possible to do so?
    many thanks,
    HR
    Edited by: Herman Riegelhaupt on Jun 18, 2008 9:50 AM

  • Batch Loader Command Execute Export Parameters() not in Documentation

    Hello,
    I'm trying to use the Batch Loader Command Execute Export Parameters() command to export my shared library into a text file and do not see the any detailed references in the epma doc, although the doc does mention Export. We're on 11.1.1.3.
    I tried to use something similar to the Import, but it is still not correct.
    Execute Import Parameters(importtype, profilename, filename,waitforcompletion) Values('flatfile', 'Comma', '.\AppFiles\CommaApp.ads','true');
    Has anyone any ideas on the required parameters to use? Many thanks.
    regards.
    Edited by: cg on Feb 29, 2012 6:14 AM

    John, thank you for your reply. Is there a way to automate the file generator to generate the ads file every night? Or by use of some other command?
    Also, Export is mentioned in the doc, but perhaps that was added but never implemented for this version.

  • Error while exporting to PDF document in OBIEE 11g

    Hi
    In OBIEE 11g we are facing an issue regarding exporting a few reports to pdf. It is resulting in following error: "Error generating PDF document".
    The reports are placed on a dashboard which has a prompt too. However, when we remove the prompts, the export is working fine.
    We will really appreciate any help in this regard.
    Thanks.

    Hi,
    Looks like this is a sort of known bug with PDF creator in 11g. Try implementing the below solution:
    To configure the Javahost service, edit the Javahost service configuration parameters in the
    instanceconfig.xml file. The parameters are
    identified by their relative path starting from the /WebConfig/ServerInstance node
    For example:
    <JavaHost>
    <PDF>
    <InputStreamLimitInKB>50000</InputStreamLimitInKB>
    </PDF>
    </JavaHost>
    After changes restart Siebel Analytics Java Host and Siebel Analytics Web services
    If it doesn't work try to create same report in xml publisher as presentations services in obiee has limited capacities in printing out reports.
    Refer to this thread for related useful information: Error in creating a PDF
    Hope it helps.
    Thanks,
    -Amith.

  • Exporting selected contacts from Outlook 2011 for Mac

    I've wanted to easily export a set of selected contacts from Outlook in Microsoft Office for Mac 2011.  I've been through many threads about synching to Address Book and then exporting, but I've found a host of troubles, including duplicate copies of contacts being created.
    So, I finally broke down and wrote an AppleScript script to export all of the currently selected contacts from Outlook to a file in either vcf (vcard) or csv (comma separated value) format.  The best use of this script is to:
    -- Install this as a script in Microsoft Outlook by saving the script below to Documents>Microsoft User Data>Outlook Script Menu Items
    -- Change to your Contacts in Outlook.  Use the Outlook search bar to find the contacts you want to export.  You might search by name, category, company, or anything else that identifies the contacts you want to export.  Or, you might just leave the view showing all contacts.
    -- Select the contacts you want to export
    -- Launch the script
    The script will have you select between vcard and csv and select a destination file.  This hasn't been optimized for speed, so if you're exporting 100's or 1,000's of contacts, be patient.  And there isn't a progress bar at present, so you have to wait.  It will display an alert when it's complete.
    Sorry not to have a download location for you.  You'll just have to copy the script text :-).  Keep in mind there's been some but limited testing.  Read the comments for details.  And enjoy.
    -- jsc
    --  Export Outlook Contacts
    --  (c) 2012 J. Scott Carr.  The script is made available for free use, with no
    --  warranty, under the Creative Commons license agreement.
    --  This script has only been tested on Mac OS X 10.6.8 with Micrsoft Outlook for
    --  Mac 2011 version 14.1.4.
    property byCategory : "By category"
    property byPattern : "Names matching pattern"
    property vcardFormat : "VCard"
    property csvFormat : "CSV"
    --  main
    set contactsToExport to {}
    -- Get the contact selection
    set contactsToExport to get_contacts_to_export()
    if (count of contactsToExport) is 0 then
              display alert "Please select contacts to export and rerun script" as warning
              return
    end if
    -- Shall we export to vcard or CSV?
    set theFormat to vcard_or_csv()
    if theFormat is "" then
              display alert "Error: Must select VCard or CSV format" as warning
              return
    end if
    -- Get and open the output file
    set oFile to open_output_file(theFormat)
    if (oFile is equal to -128) then
    display alert "Canceled"
              return
    else if (oFile < 0) then
              display alert "File open failed (" & oFile & ")" as warning
              return
    end if
    -- Export the contacts
    display dialog "About to export " & (count of contactsToExport) & " contacts in " & theFormat & " format.  Proceed?"
    if button returned of result is not "OK" then
              try
      close access oFile
              end try
              return
    end if
    if theFormat is vcardFormat then
    export_to_vcard(contactsToExport, oFile)
    else if theFormat is csvFormat then
    export_to_csv(contactsToExport, oFile)
    else
              display alert "Invalid format" as warning
    end if
    close access oFile
    display alert "Complete"
    return
    --  get_contacts_to_export()
    --  We're going to export the Contacts currently selected in Outlook.
    --  Check that the current selection is Contacts and not some other Outlook
    --  object.  Snag the selected Contacts and return them as a list.
    --  A side note.  When I started this, I built options to enter a matching
    --  name string or select a category.  And then it hit me that those features
    --  are much more robust in Outlook, and it would be easy to just use the
    --  current selection.
    --  There is some strange behavior that Outlook needs to have recently been
    --  the front, active window.
    on get_contacts_to_export()
              set selectedContacts to {}
              tell application "Microsoft Outlook"
                        set theSelection to selection
                        if class of theSelection is list then
                                  if class of the first item of theSelection is contact then
                                            copy theSelection to selectedContacts
                                  end if
                        else
                                  if class of theSelection is contact then
                                            copy theSelection to selectedContacts
                                  end if
                        end if
                        return selectedContacts
              end tell
    end get_contacts_to_export
    --  vcard_or_csv()
    --  Get the format to use when exporting contacts
    on vcard_or_csv()
              choose from list {vcardFormat, csvFormat} with prompt "Select export file format:"
              if result is false then
                        return ""
              else
                        return first item of result
              end if
    end vcard_or_csv
    --  open_output_file()
    --  Open the destination file for the export, returning the file descriptor or the error number
    --  if the operation fails
    on open_output_file(exportType)
    -- Get the filename, letting "choose file name" deal with existing files.
              set theDate to current date
              set theTime to time of theDate
              if exportType is csvFormat then
                        set fileName to "contacts.csv"
              else
                        set fileName to "contacts.vcf"
              end if
              try
                        set outputFile to choose file name with prompt "Select export destination file" default name fileName
              on error errText number errNum
                        return errNum
              end try
    -- Open the file
              try
      -- Open the file as writable and overwrite contents
                        set oFile to open for access outputFile with write permission
      set eof oFile to 0
              on error errText number errNum
                        display alert "Error opening file: " & errNum & return & errText as warning
                        try
      close access oFile
                        end try
                        return errNum
              end try
              return oFile
    end open_output_file
    --  export_to_vcard()
    --  Export each of theContacts to the open file outFile as a set of vcards.  Note that the
    --  vcard data is from the "vcard data" property of the theContacts.  This routine
    --  doesn't attempt to reformat an Outlook vcard, nor limit the fields included
    --  in the vcard.
    on export_to_vcard(theContacts, outFile)
              set vcards to {}
              tell application "Microsoft Outlook"
                        repeat with aContact in theContacts
                                  copy vcard data of aContact to the end of vcards
                        end repeat
              end tell
              repeat with aCard in vcards
      write (aCard & linefeed) to outFile
              end repeat
    end export_to_vcard
    --  export_to_csv()
    --  Export each of theContacts to the open file outFile in csv format
    on export_to_csv(theContacts, outFile)
              set csvFields to {}
    -- Get the fields of the contact to export
              set csvFields to init_csv()
    -- Write the header row
              set nFields to count csvFields
    write first item of csvFields to outFile
              repeat with i from 2 to nFields
      write "," & item i of csvFields to outFile
              end repeat
    write linefeed to outFile
    -- Export the fields of the contacts in CSV format, one per line
              repeat with aContact in theContacts
      write build_csv_line(csvFields, aContact) & linefeed to outFile
              end repeat
    end export_to_csv
    --  init_csv(): defines the fields to export when csv format is selected
    --  Each of the fields in the list must match a name used in the routine build_csv_line().
    --  The idea is to later create a a pick list so the user can select which contact properties
    --  to export.
    on init_csv()
              set csvFields to {"first name", "last name", "middle name", "title", "nickname", "suffix", "phone", "home phone number", "other home phone number", "home fax number", "business phone number", "other business phone number", "busines fax number", "pager number", "mobile number", "home email", "work email", "other email", "company", "job title", "department", "assistant phone number", "home street address", "home city", "home state", "home country", "home zip", "business street address", "business city", "business state", "business country", "business zip", "home web page", "business web page", "note"}
    end init_csv
    --  build_csv_line(): format one line for the csv file
    --  Parameter csvFields determins which fields to include in the export.
    --  Unfortunately I've not figured out how to use perl-style generation of
    --  indirect references.  If I could, this would have been much more elegant
    --  by simply using the field name to refer to a Contact properly.
    --  Note that email address are a special case as they're a list of objects in
    --  Outlook.  So these are handled specially in the export function and can only
    --  be selected by the column names "home email", "work email", and "other email". 
    --  Outlook allows a contact to have more than one of each type of email address
    --  but not all contact managers are the same.  This script takes the first of
    --  each type.  So if a contact has more than one "home" email address, you will
    --  only be able to export the first to a csv file.  Suggest you clean up your
    --  addresses in Outlook to adapt.  The alternative is to support multiple
    --  columns in the csv like "other email 1" and "other email 2", but that's not
    --  supported in this version.
    --  Another note.  In this version, any embedded "return" or "linefeed" characters
    --  found in a property of a contact are converted to a space.  That means that
    --  notes, in particular, will be reformated.  That said, this gets arond a problem
    --  with embedded carriage returns in address fields that throw off importing
    --  the csv file.
    --  Also note that at this time IM addresses aren't supported, but it's an easy add
    --  following the same logic as email addresses.
    on build_csv_line(csvFields, theContact)
              set aField to ""
              set csvLine to ""
              set homeEmail to ""
              set workEmail to ""
              set otherEmail to ""
              tell application "Microsoft Outlook"
                        set props to get properties of theContact
      -- Extract email addresses from address list of contact
                        set emailAddresses to email addresses of props
                        repeat with anAddress in emailAddresses
                                  if type of anAddress is home then
                                            set homeEmail to address of anAddress
                                  else if type of anAddress is work then
                                            set workEmail to address of anAddress
                                  else if type of anAddress is other then
                                            set otherEmail to address of anAddress
                                  end if
                        end repeat
      -- Export each desired fields of the contact
                        repeat with aFieldItem in csvFields
                                  set aField to aFieldItem as text
                                  set aValue to ""
                                  if aField is "first name" then
                                            set aValue to get first name of props
                                  else if aField is "last name" then
                                            set aValue to last name of props
                                  else if aField is "middle name" then
                                            set aValue to middle name of props
                                  else if aField is "display name" then
                                            set aValue to display name of props
                                  else if aField is "title" then
                                            set aValue to title of props
                                  else if aField is "nickname" then
                                            set aValue to nickname of props
                                  else if aField is "suffix" then
                                            set aValue to suffix of props
                                  else if aField is "phone" then
                                            set aValue to phone of props
                                  else if aField is "home phone number" then
                                            set aValue to home phone number of props
                                  else if aField is "other home phone number" then
                                            set aValue to other home phone number of props
                                  else if aField is "home fax number" then
                                            set aValue to home fax number of props
                                  else if aField is "business phone number" then
                                            set aValue to business phone number of props
                                  else if aField is "other bsiness phone number" then
                                            set aValue to other business phone number of props
                                  else if aField is "bsuiness fax number" then
                                            set aValue to business fax number of props
                                  else if aField is "pager number" then
                                            set aValue to pager number of props
                                  else if aField is "mobile number" then
                                            set aValue to mobile number of props
                                  else if aField is "home email" then
                                            set aValue to homeEmail
                                  else if aField is "work email" then
                                            set aValue to workEmail
                                  else if aField is "other email" then
                                            set aValue to otherEmail
                                  else if aField is "office" then
                                            set aValue to office of props
                                  else if aField is "company" then
                                            set aValue to company of props
                                  else if aField is "job title" then
                                            set aValue to job title of props
                                  else if aField is "department" then
                                            set aValue to department of props
                                  else if aField is "assistant phone number" then
                                            set aValue to assistant phone number of props
                                  else if aField is "age" then
                                            set aValue to age of props
                                  else if aField is "anniversary" then
                                            set aValue to anniversary of props
                                  else if aField is "astrololgy sign" then
                                            set aValue to astrology sign of props
                                  else if aField is "birthday" then
                                            set aValue to birthday of props
                                  else if aField is "blood type" then
                                            set aValue to blood type of props
                                  else if aField is "desription" then
                                            set aValue to description of props
                                  else if aField is "home street address" then
                                            set aValue to home street address of props
                                  else if aField is "home city" then
                                            set aValue to home city of props
                                  else if aField is "home state" then
                                            set aValue to home state of props
                                  else if aField is "home country" then
                                            set aValue to home country of props
                                  else if aField is "home zip" then
                                            set aValue to home zip of props
                                  else if aField is "home web page" then
                                            set aValue to home web page of props
                                  else if aField is "business web page" then
                                            set aValue to business web page of props
                                  else if aField is "spouse" then
                                            set aValue to spouse of props
                                  else if aField is "interests" then
                                            set aValue to interests of props
                                  else if aField is "custom field one" then
                                            set aValue to custom field one of props
                                  else if aField is "custom field two" then
                                            set aValue to custom field two of props
                                  else if aField is "custom field three" then
                                            set aValue to custom field three of props
                                  else if aField is "custom field four" then
                                            set aValue to custom field four of props
                                  else if aField is "custom field five" then
                                            set aValue to custom field five of props
                                  else if aField is "custom field six" then
                                            set aValue to custom field six of props
                                  else if aField is "custom field seven" then
                                            set aValue to custom field seven of props
                                  else if aField is "custom field eight" then
                                            set aValue to custom field eight of props
                                  else if aField is "custom phone 1" then
                                            set aValue to custom phone 1 of props
                                  else if aField is "custom phone 2" then
                                            set aValue to custom phone 2 of props
                                  else if aField is "custom phone 3" then
                                            set aValue to custom phone 3 of props
                                  else if aField is "custom phone 4" then
                                            set aValue to custom phone 4 of props
                                  else if aField is "custom date field one" then
                                            set aValue to custom date field one of props
                                  else if aField is "custom date field two" then
                                            set aValue to custom date field two of props
                                  else if aField is "note" then
                                            set aValue to plain text note of props
                                  end if
                                  if aValue is not false then
                                            if length of csvLine > 0 then
                                                      set csvLine to csvLine & ","
                                            end if
                                            if (aValue as text) is not "missing value" then
                                                      set csvLine to csvLine & "\"" & aValue & "\""
                                            end if
                                  end if
                        end repeat
              end tell
    -- Change all embeded "new lines" to spaces.  Does mess with the formatting
    -- of notes on contacts, but it makes it cleans the file for more reliable
    -- importing.  This could be changed to an option later.
              set csvLine to replace_text(csvLine, return, " ")
              set csvLine to replace_text(csvLine, linefeed, " ")
              return csvLine
    end build_csv_line
    --  replace_text()
    --  Replace all occurances of searchString with replaceString in sourceStr
    on replace_text(sourceStr, searchString, replaceString)
              set searchStr to (searchString as text)
              set replaceStr to (replaceString as text)
              set sourceStr to (sourceStr as text)
              set saveDelims to AppleScript's text item delimiters
              set AppleScript's text item delimiters to (searchString)
              set theList to (every text item of sourceStr)
              set AppleScript's text item delimiters to (replaceString)
              set theString to theList as string
              set AppleScript's text item delimiters to saveDelims
              return theString
    end replace_text

    Thank You, but this is a gong show. Why is something that is so important to us all so very, very difficult to do?

  • How can I set up dynamic parameters in a CMC schedule?

    Just need some help to set-up a month-end schedule in CMC (Central Management Console ).
    The schedule will contain a number on Crystal reports. These report should be run for the month just gone. eg If the schedule is run on 30.09.14, I'd like the FROM Date in my reports to be set to 01.09.14 and the TO Date set to 30.09.14.
    Can the CMC schedule update the report parameters (prompts) based on the run-date? Eg is there something like TO DATE = @TODAY ?
    If this is not provided within CMC, can you suggest how it could be handled?
    Thanks, Derek

    Hi Derek,
    This requirement is dependent to backend or universe.
    What is your backend database ?
    If it is SAP BW ,then in BEx we can create customer exits which makes report refresh for current month.
    If it is RDBMS  and you want to provide prompt in report ,then we need to create @Prompt in universe.
    Dave&amp;#8217;s Adventures in Business Intelligence &amp;raquo; Dynamic Dates Part III: Monthly Date Ranges
    if prompt is not required then create a condition in universe to run the report always for current month
    Ex: With SQL server , derive month from date
    upper(CONVERT(varchar(3),ADS_EVENT.Start_Time,7))
    condition
    @Select(Time\Month) = upper(convert(varchar(3),sysdatetime(),107))

Maybe you are looking for