Sub-reports displaying parameter prompt

I have a CR XI r2  application using the JRC that displays a list of reports and allows a user to select the desired report. I then programatically determine the paramaters needed and set the values required. This works fine except when I use a report containing a sub-report. Although I loop thru the report heirarchy including the sub report and set all the parameters it still prompts for the sub-report parameter in the viewer before displaying the report. I tried setting the enable prompting to false but that didn't help.

Hi,
It may help you.
Try to link the subreports with the main report Using Change Subreport Link.
And map the parameters to the main Report.
Thanks,
Saravanakumar..

Similar Messages

  • Main/Sub Report Passing Parameter

    This is a twist on the general passing parameter question:
    1. The main report is a detail report based on a stored procedure.
    2. The sub report is also based on a stored procedure. This SP calculates the values that will be introduced into a 'table' drawn on the report canvas. The SP consists of a CTE which is a 'reduced' version of the Detail SP used in the main report - to ensure that all the same records are being retrieved between the main and sub reports. Another select, following the CTE, sums the values and makes them available to the Sub Report.
    The client has requested the availability to view records where an Activity Date falls within the last full week, the last month, this month, and YTD. The report is available both through Infoview as well as a scheduled version. The client wants to make a selection as to time period through Infoview.
    Most other users will be using a printed copy of the 'general' report.
    I thought to use the SAVED DATA in SELECTION REPORTS and use Crystal functions to handle this. The SAVED DATA and an optional parameter allowed the user (in Infoview) to change the parameters. This works fine in the main report.
    HOWEVER, the sub report needs to update the totals for the groups of properties that are aggregated in the sub report's summary Stored Procedure. Since the time range will, on changing in the Main Report, reflect different counts,  I need to be able to tell the sub report what the main report is doing.
    The Main report has an Optional Parm ({?Account Open}) which allows the selection of a data range
    The SAVED DATA selection uses the values from the parm:
    if not hasvalue({?Account Open}) then 1=1
        else if hasvalue({?Account Open}) and {?Account Open}=0 then 1=1
        else if hasvalue({?Account Open}) and {?Account Open}=1 then {Account_open_date_newest}in LastFullWeek
        else if hasvalue({?Account Open}) and {?Account Open}=2 then {Account_open_date_newest}in LastFullMonth
        else if hasvalue({?Account Open}) and {?Account Open}=3 then {Account_open_date_newest}in Yeartodate
        else if hasvalue({?Account Open}) and {?Account Open}=4 then {Account_open_date_newest}in CDateTime (CurrentDate-(DayOfWeek(CurrentDate)+1),CTime(00,00,00)) to CDateTime (CurrentDate+(7-(DayOfWeek(CurrentDate))),CTime(23,59,59))
        else 1=0;
    My problem in passing the optional param selection made by the user down to the sub report in order to update the counts.
    Any help would be gratefully appreciated! I have included a snap of the Table from tyhe subreport and a snap of the optional parm from the Main Report

    Jamie -
    Thank you for your reply. I've spent the morning working on the two directions you had provided me with.
    Cross tabs: I took one report, created a cross tab for it, and, as expected, it worked as desired. The issue I'm having is where to place it on the report canvas. If I'm correct, the only place where it can be placed is in a header or footer - the sub report is currently residing in Page Header D (there's a lot of suppression and reveals in these reports). The cross tab does not want to be placed there. It's currently living in the Report Header... further, the cross tab occupies page 1; the remainder of the report starts on page two. Not what needs to happen. The current business specification for the report is: Page 1 includes a page header which includes (through iterations a-e) logo, print date info, the sub report showing the summary a series of group headers which in effect creates an index into the various business units. By clicking on a business unit, any groups under it are exposed. By clicking on the sub group, customer data is exposed. As you go to the 'next page', the Summary sub-report is eliminated and the groups under the Business Unit are shown. All of these dynamics are based on section suppression and unhiding based on the user's interaction, which why the placement of the Summary data is important. If you have any hints on managing the cross tab and its placement, I would be eager to hear them.... (btw - the number of rows in the cross-tab can range from 0 to 12. That dynamism is not a problem with the sub report - would it be for the cross tab?)
    Parameter Passing: I took one of the reports and (1) ensured that the sub report had the exact  same parameter (called Account Open) as the Main Report. (2) ensured that the Saved Data filters in both reports were the same. (In order to do that I had to update the stored proc for the sub report to include an account date field). (3) I then went to link the two reports selecting the Account Open parameter in both the containing and the Fields to Link To list boxes (see the graphic LINK.JOG. This produced no useful result - the Summary showed ALL records- the container report properly showed the count for last full month (see SUMMARY.JPG) (4) I then tried to link a field from the sub report to the Parameter, but only 4 of the six fields from the stored proc's select were displayed. (Prior to this Select there is a CTE which collects the data with a ROW OVER.. PARTITION function):
    SELECT
    customer_business_unit_name,
    account_open_date_newest,
    sum (CASE WHEN currentrisk =1 THEN 1 Else 0 End) lowcount ,
    sum (CASE WHEN currentrisk =2  THEN 1 Else 0 End) midcount ,
    sum (CASE WHEN currentrisk =3 THEN 1 Else 0 End) highcount,
    sum (CASE WHEN currentrisk =0 THEN 1 Else 0 End) unknown
    FROM    records
    WHERE   rn = 1
    group by customer_business_unit_name,account_open_date_newest
    Only the COUNT fields show up in the Fields box (see the graphic LINKS CHECKED.JPG).
    Where have I gone wrong??
    Again, thank you for your earlier reply.

  • Print Report and Parameter Prompt

    I am using Crystal 2008 and .Net 2005.  I have a report viewer on a windows form.  When I preview a report, the Crystal based dialog for the report parameters comes up and the users can enter the parameters.  When I call PrintToPrinter, this dialog does not come up and I get an error saying that there are Missing Parameter Values.  I can't pass the parameters directly to the report at runtime during "silent" printing because the user needs to select them on the Crystal based dialog.  How can I do this?  I thought the code with the comment  "//parameter not found, popup dialog for user to enter" would accomplish this.
    Thanks
    public override void PrintReport()
                ReportDocument report = this.CreateReportDocument();
                System.Drawing.Printing.PrinterSettings settings = new System.Drawing.Printing.PrinterSettings();
                if (this.Config.ReportOutput.Print != null)
                    if (this.Config.ReportOutput.Print.PrinterName != string.Empty)
                        settings.PrinterName = Config.ReportOutput.Print.PrinterName;
                System.Drawing.Printing.PageSettings pageSettings = new System.Drawing.Printing.PageSettings();
                report.PrintToPrinter(settings, pageSettings, false);
                report.Close();
                report.Dispose();
                report = null;
    private ReportDocument CreateReportDocument()
                ReportDocument report = new ReportDocument();
                report.Load(this.Config.CrystalSettings.ReportFileName);
                while (!report.IsLoaded)
                    System.Threading.Thread.Sleep(1);
                ConnectionInfo ci = this.CreateConnectionInfo();
                this.UpdateReportDocumentTables(ref report, ref ci);
                this.UpdateReportDocumentSubReportTables(ref report, ref ci);
                this.UpdateParamFields(ref report);
                return report;
    private void UpdateParamFields(ref ReportDocument ReportDoc)
                ParameterField field = null;
                ParameterFields fields = ReportDoc.ParameterFields;
                ParameterDiscreteValue paramValue = null;
                for (int i = 0; i < fields.Count; i++)
                    field = fields<i>;
                    if (field.Name.ToLower() == "office")
                        paramValue = new ParameterDiscreteValue();
                        paramValue.Value = this.Config.Office;
                        field.CurrentValues.Add(paramValue);
                        field.HasCurrentValue = true;
                    else if (field.Name.ToLower() == "casekey")
                        paramValue = new ParameterDiscreteValue();
                        paramValue.Value = this.Config.CaseKey;
                        field.CurrentValues.Add(paramValue);
                        field.HasCurrentValue = true;
                    else if (field.Name.ToLower() == "user")
                        paramValue = new ParameterDiscreteValue();
                        paramValue.Value = this.Config.User;
                        field.CurrentValues.Add(paramValue);
                        field.HasCurrentValue = true;
                    else
                        //try to get parameter from passed in values
                        ReportParameter param = GetParameterByName(field.Name);
                        if (param != null)
                            paramValue = new ParameterDiscreteValue();
                            paramValue.Value = param.Value;
                            field.CurrentValues.Add(paramValue);
                            field.HasCurrentValue = true;
                        else //parameter not found, popup dialog for user to enter
                            field.CurrentValues.Clear();
                            field.HasCurrentValue = false;
                            field.IsOptionalPrompt = false;
    Edited by: rmwade on Mar 18, 2010 4:31 PM

    There are a number of sample apps that should server as examples:
    csharp_web_discreteparams.zip
    csharp_web_rangeparams.zip
    csharp_web_sub_daterange_param.zip
    vbnet_web_discreteparams.zip
    vbnet_web_multirangeparams.zip
    vbnet_web_rangeparams.zip
    vbnet_web_sub_daterange_param.zip
    and more. The samples can be found on [here|https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples].
    And don't forget to consult the developer help file for your version of CR.
    Ludek

  • Dynamic Command Parameter Prompts twice for Value

    I am having trouble in CR 2008 with command parameters.  Whenever I make the command parameter dynamic, I am prompted twice for the value: first I'm prompted to enter the value freehand, then the second prompt is a dropdown list with just the freehand value (or an error if the freehand value does not exist in the db).
    I need to use dynamic command parameters for two reasons: 1) to allow users to select the value from a dropdown list rather than a free-text value, and 2) to limit the record set returned from my initial command query.
    Any help on how to get dynamic command parameters to display all values in a dropdown list, and in one prompt, is appreciated!

    Hi
    If you create a parameter in your command it will be always static.  You can't make this as dynamic because, once your command get executed only you will get values in your report or in your list of values (dynamic parameter).
    There is a work around for this :
    --Create a report with command without any parameters at command level
    --Create a dynamic parameter at report level and do not place any fields in your report.
    --Now insert your orginal report as sub report in Report footer.
    --Right click on your sub report and go in change sub report links and link Main report dynamic parameter to your sub report command parameter.
    --Suppress all other section in your main report.
    Now when you refresh, it will execute your main report dynamic parameter with pick list.  Once user selects a value it will be passed to your command parameter.
    Thanks,
    Sastry

  • How can I have Main report with a sub-report with in a sub-report??

    I have a main report that has about 5 subreports, almost like a dashboard.  I need to make one of those subreports contain another subreport.
    I don't have the option to add a sub-report with in my sub-report, so what I thought would work is remove my sub-report from my main report, then add my new sub-report, then add that report back to my main report.
    Everytime I add the sub-report that has a sub-report to my main report I lose the second sub.
    From what I've read on the internet is you can't have a sub-report contain another sub-report.  What some say is you can hyperlink that second sub report.
    When I setup my hyper link to open the second sub-report I'm prompted to re-enter my report parameters.
    Can some help me link a sub-report to a sub-report or show me how to pass a date range parameter in my hyper link so the reports just opens up?
    I'm using CR IX R2
    Thanks

    Nate,
    You are dealing with a product limitation.  Crystal cannot have nested subreports within a sub report. 
    You can generally use shared variables between sub reports to achieve your desired result

  • Looping thru sub report based on dataset in main report.

    Hello all,
    I have a report which has few parameters and I scheduled  it to run and export in excel. This report run multiple time based on parameter value and then export the data into different excel file. 
    Here is what I'm looking for:
    1. Create a main report with temporary data set with all the parameter values.
    2. Run sub report with parameter values from main report and then export it to excel file, I assume it will help to create one single excel file with multiple tabs.
    Questions are:
    1. How I can create s dataset in main report (may be use XML as a data source) and write a query? Since I don't have access to database I cannot add a table for parameters values so I need to know how I can create a dataset with all the values
    2. Is this a right approach or there is a another way to handle it?
    Look forward for expert advice.
    Thanks,
    P

    Hi Parry2k,
    According to your description, you want to create a report with several parameters and configure subscription to send delivery the report to users, but you haven’t permission to access database.
    According to my knowledge, as long as a user can connect to a SQL Server instance, the user is able to create temporary tables, there are no special permissions. To use XML as data source, we can select XML from type drop-down list, then embed xml in dataset
    query text box.
    To set parameter values, we can create Available values and Default Values manually or create datasets for the parameter, then get values from the datasets.
    In this case, I would recommend you asking database administrator to grant permission to access database to you. Creating temporary tables is not a good approach to solve the problem.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Blank First Page in Sub Report

    Hi,
    My sub report display the first page blank with data starting from the second page. The first page just displays the Report Header. How can I fix this?
    Thanks.
    Reena

    Is it possible that there is a group in the subreport and you have Keep Group Together set in the Group Options?
    Fuskie
    Who would bet the group data is larger than what fits on a single page and Crystal reacts to that by pushing the whole thing to the second page...

  • Sub Reports and drilldown

    I have a sub report displayed in the report footer section.  In both the main report and in the sub report I have intentionally unchecked the box for "create group tree".
    Is there a way to prevent, disable or suppress the ability to drilldown to that sub report?  A mouse click on the sub report brings the sub report up in its own viewer and as expected the drilldown to any detail in the sub report is disabled.  What I am being asked to do is prevent the sub report from being displayed seperately from the main report.

    Hello,
    Right click on the Report Footer --> Select Suppress(No Drill-Down).
    Does that help?
    Thanks.

  • How to Avoid Printing the data twice when the sub report has drill down?

    Hello,
    I have a sub report that has drill down which is placed in report footer.When i run the report sub report displays the data but when i tried to drill down it displays the same data again.After that i can able to drill down on sub report.Is there any way to avoid
    printing the same data twice.
    Thanks in advance.

    Hi,
    If the subreport you're referring to does not grow in size and it does not span multiple pages and you know the size of it, here's what you can do to stop drilling into subreports :
    1) Create a text object as large as the subreport (perhaps bigger than it) and fill it with spaces or new lines
    2) Place it 'over' the subreport such that it covers the entire area occupied by the subreport
    3) The subreport at all times should be smaller than the text object in all dimensions
    Now, when you hover the mouse over the subreport, there isn't any magnifying glass for you to drill down into.
    If the subreport has further drill-down functionality, then this isn't for you! Because, it just wouldn't allow you click on any objects in the subreport because of the text object eclipsing it. This is the only workaround I know at this point in time and I know a lot of users are looking for this.
    I would suggest that you log this as an Enhancement Request at http://ideas.sap.com for our developers to have a look into this.
    And finally, I also found an old forum post where Jamie has suggested a way to get this working on the Business Objects Environment. Give it a shot, if that's where the reports are eventually run.
    How to disable subreport view
    Hope this helps!
    -Abhilash

  • Sub report parameter prompt appears when running Visual Studio 2008 with Crystal Reports 2008

    Post Author: relliott
    CA Forum: .NET
    If I build a simple Crystal Report that contains another simple Crystal Sub Report, the report will print preview fine in Crystal 2008.  The problem happens when add this report to a Visual Studio 2008 Web Application Project and I build and debug the application, the Crystal Viewer is prompting the user for the parameter used to link the sub report to the main report.  This should never happen as the user is not supposed to see this parameter.  If I type in some value for this sub-report parameter prompt, the Crystal Report Viewer gives an error message about not finding the field.
    I was having the same problem in Vs2005 with Crystal 10 which is why I upgraded.  Business Object's official fix for this problem was published under their KB article number c2018840 and c2019047.  These hot fixes ended up causing general exception errors in Visual Studio so I scrapped these solutions.
    Support had me install SP0 for Crystal 2008 (which did not fix it).
    Any ideas?
    Any help is greatly appreciated.
    Thanks,
    Rich Elliott

    Hi Bontrager,
    Thank you for posting in MSDN forum.
    According to your description, I agree with pvdg42's suggestion, so I suggest you can try pvdg42's suggestion to install the version of
    Crystal Reports 10.5 to check this issue again.
    Reference:
    http://forums.asp.net/t/1236730.aspx?Which+CR+version+is+in+Visual+Studio+2008+
    In addition, since this forum is
    to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. So if you have any issue about the
    Crystal Reports, I suggest you can ask the issue to the
    SAP Crystal Reports website:
    http://scn.sap.com/community/crystal-reports/content?filterID=contentstatus%5bpublished%5d~objecttype~objecttype%255bthread
    as pvdg42 pervious suggestion, it will be better support.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Crystal report input prompt..for sub report

    Hi All,
    I developed crystal report and retreived the fields from the exsiting Query.Now for  enhancing the report i must creat a sub report for th eexisting one.In this case iam getting 2 input prompts one for the old report and the other one is for the enhanced sub report .But the requirement is tha t, the report must get only one input prompt for both the reports. Is this can be possible from the Query end or the crystal report end?
    YVL

    Hi Vijayalakshmi
    You can apply just one input parameter for the main report and then link your subreport with this parameter.
    Once you link the subreport, you would get only one prompt for inputting parameter values.
    This way you can optimize the performance of the report as well.
    For more information about linking subreports you can refer to the user guide for the respective crystal reports version you are using.
    Hope this helps!!!
    Regards
    Sourashree

  • Sub report linking definition based on result, not on parameter value

    Dear all,
    I have created a report with CR 2008 SP6. The parameters from the referring BI query are period and customer. After the user enter parameter values, the report provides then Customer and product information.
    I have add a sub report with additional information for product. I can transfer the parameter value (user input) for Customer to the sub report, but not for product, due to the fact that in the main report Product is not selected as parameter, but is a result set after the report is executed.
    Is there a way to define in the Sub report linking exactly these result values of Product as new parameter for the sub report.
    In the sub report linking definition I only see the possibility of defining the parameter as linking object, but not the report result set. See also the screenshot.
    Any idea would be great. Best regards,
    Stefanos from Munich/Germany

    Hi Stefanos,
    Where is the Subreport placed on the report?
    Do you have a prompt in the Subreport for 'product'?
    If yes, then here's open the 'Change Subreport Links' window > Move the Product field to the Pane on the right > From the drop down at the bottom left that says 'Subreport parameter field to use', choose the Product prompt.
    If you don't have a prompt for product in the Subreport, then just move the Product field to the Pane on the right > From the drop down at the bottom right that says 'Select data in Subreport based on field', choose the Product field from the drop-down.
    -Abhilash

  • Parameter Prompt, additional line being displayed

    When viewing report in Crystal Report XI, which was developed in earlier version of Crystal Report, an additional Parameter Prompt Text is displayed.  Then opening report in version of Crystal report developed in text is gone. 
    In Crystal Report XI Prompt Text is displayed as:
         Enter desired Ending Cleared Date for report display:
         Please enter date in format u201Cyyy-mm-ddu201D
    In Crystal Report 8.t Prompt Text is displayed as:
         Enter desired Ending Cleared Date for report display:
    Where is this text coming from, and how can it be removed?

    Because this is a date field, the report is looking for data formatted as:  MM-DD-YYYY
    But the Prompt is:
    Enter desired Ending Cleared Date for report display:
    Please enter date in format u201Cyyyy-mm-ddu201D
    This is really confusing our end users.  When they manually enter the data as the prompt is telling them (yyyy-mm-dd), they get a bad date error message.
    Is there a way to make this extra line of prompt text match the date format needed by the report?
    Edited by: Barbara Miller on Jul 16, 2008 12:03 AM

  • Set sub report Logon Info without prompting

    I have a crystal report that i am displaying using a ReportSource from crystal enterprise server 10.
    This report has On Demand Sub Reports in it. When a user clicks on the web viewer to view that sub report it prompts for Database logon information. How do i set this information server side so the user is not prompted?

    I wanted to follow up on this question, since it was not properly answered. If you are using the enterprise SDK, and veing a report Stored on the server you must change the properties of the report on the server itself for what I needed to work.
    Once the report is saved to crystal enterpise go into the report's properties.
    go to Process->Database and set the following setting:
    In Crystal 10 - Make sure 'Prompt the user for database logon when viewing' is
    NOT checked.
    In Crystal XI - under 'When viewing report:' make sure the radio button for
    'Use same database logon as when report is run' is checked.
    Also, the SDK has a 'Prompt on refresh' optoin when scheduling the report programmatically that you can set to false to make this work without having to change the base report in the crystal enterprise server. (This goes for Crysal XI and Crystal 10)

  • Displaying report that contain sub report

    iam using main report that has sub report but when displaying the main report in crystal report viewer the section of the sub report is shiffted to the right.
    what can i do?
    Best Regards,
    Rabab

    David,
    The easiest way to do this would be to build a query in Access that provides this for you. You can do it easily using a two query approach.
    QueryNo1:
    SELECT
    TransactionTable.TransactionID
    FROM TransactionTable
    WHERE TransactionTable.Price < 0 OR TransactionTable.Quantity < 0
    QueryNo2:
    SELECT *
    FROM TransactionTable
    WHERE TransactionTable.TransactionID IN [QueryNo1.TransactionID]
    This will give you all of the TransactionID's that have a negative transaction associated with it.
    Once you have the query completed to your satisfaction and saved, you can use it as your data source in CR. CR will see it as a View. If you make it a parameter query, CR will see it as a Stored Procedure.
    Hope this helps,
    Jason

Maybe you are looking for

  • Ipod Touch 4th gen wont turn on, or install drivers properly...

    I Have an Ipod I had recived from my cousin to try and fix. The Ipod does not turn on but the first time I plugged it in, the drivers installed correclty, but I could not restore it (error 1600) Then I tried DFU mode, that didnt work. So I then unins

  • Imac no longer recognizes external hard drive

    my iMac no longer recognizes my external hard drive. An icon used to be on my desktop, at times it would disappear and come back, but it has remained elusive for the past couple of months and is NOWHERE to be found. It doesn't even show up in the Dis

  • Getting "Low Disk Space" message in ProCamera photo app

    I'm getting "Low Disk Space" message in ProCamera photo app but I have 8 gigs of available storage. What gives and how do I get around it? Thanks.

  • Enable / disable combo box in datagrid cell

    I have a datagrid with 8 columns 2 check boxes a text box and 5 combo boxes. I am trying to disable the combo boxes if the first check box is not checked. So far I am able to disable the entire column with the combo box in it, but what i am trying to

  • Cannot connect to TC, even after factory reset

    I bought a 1TB TC from apple in 08/2008. I don't recall if it was a refurb or not. It worked fine for 4.5 years with more or less no problems. About a month or two ago the Wi-Fi stopped working. I could connect to the SSID, but occasionally could not