SQL expression in the report title

How can I add SQL expression in the title or in narrative text.
For example I want to say:
"Sales Report for Categories: ?X? (for dates ?Y1? - ?Y2?)"
where ?X?, ?Y1? and ?Y2? are result of SQL statements:
I can query ?X?: 'select category_name from category_table where date > current_date -7'
?Y1? 'select (current_date - 7) from dual'
?Y2? 'select current_date from dual'
Thanks

Hi,
No need to craete any presentation variable if its CURRENT_DATE-7 and CURRENT_DATE
Just pull two columns and change fx of those two columns to CURRENT_DATE-7 and CURRENT_DATE
Add narrative view instead of title view and in narrative give @n and @m where n and m are positions of columns from left starting from 1.(if columns are at 2 and 3 position then @2 and @3).Give rows to display as 1.You can even add some html tags to get color code,bold etc to narrative view.
Dont forget to hide the columns that you pulled.
Regards,
Srikanth
Edited by: Srikanth Mandadi on Oct 10, 2010 8:43 AM

Similar Messages

  • SCCM 2012 R2 reporting error: "The DefaultValue expression for the report parameter 'UserTokenSIDs' contains an error: A specified logon session does not exist. It may already have been terminated. (rsRuntimeErrorInExpression)"

    Hi,
    I have two SCCM environments under same active directory domain and one service account have been used for SCCM configurations on both the environments (QA and PRODUCTION). I am facing similar error as mentioned above while trying to fetch reports on
    PRODUCTION site, but the QA site is working fine, though same service account have been used for configuring both. While looking at the reportserverservice_<date> log on my Production DB server i see the following error
    "processing!ReportServer_0-3!2124!01/02/2015-09:09:30:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: , Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during
    report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot read the next data row for the dataset DataSet1. ---> System.Data.SqlClient.SqlException: Conversion failed when converting the nvarchar value 'Override
    Default' to data type int."
    My DB and SCCM primary site are different and the reorting services point is installed on remote DB server. Please help me resolving the issue.
    Troubleshooting performed:
    1.Disabled the registry key 'EnableRbacReporting' from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\SRSRP to 0 and then restarted SSRS service and the reporting worked for some minutes after that the registry key reverted back to 1 automatically and
    reporting started throwing errors again.
    2. Checked with the permissions on DB whether or not 'sysadmin' role is assigned to the SCCM service account.
    3. re-registered the SQL management Provider WMI class.
    mofcomp.exe “C:\Program Files (x86)\Microsoft SQL Server\110\Shared\sqlmgmproviderxpsp2up.mof”

    Hi All,
    Finally found exact solution to the reporting error.
    Error: while launching SCCM reports (both from Console and web based) an unexpected error occured with error message as "The DefaultValue expression for the report parameter ‘UserTokenSIDs’ contains an error: A specified logon session does not exist.
    It may already have been terminated. (rsRuntimeErrorInExpression)"
    Solution: This is password replication issue for the domain account used to configure reporting services point in SCCM. If your SQL SSRS reporting services instance and databse runs with local default account whereas the reporting services point on SCCM
    primary site is configured with domain account, (As in My case) you need to perform the following in order to get rid of the error.
    Launch 'Reporting Services Configuration Manager' from the SQL SSRS box(either Local or Remote), Connect to Report Server Instance->Go to 'Execution Account' tab->Specify the 'Execution Account' as domain account and password which is used to configure
    Reporting Services Point in SCCM Primary Site, and then click apply.
    Now Lauch the report either way (Web based or from Console), the error will disappear and all your default reports will execute perfectly as before.

  • How to display the sort value in the selection screen in the report title

    Dear All,
    How to display the sort value in the selection screen in the report title? I have selected a value in the selection screen for sorting , but i need that values by which i have sorted with in the report title. Can you please throw some light on this!!
    Good day,
    Thanks and regards
    Arun S

    Hi Arun,
    Try this.
    1, Set one dynamic parameter,
    2, Drag and drop that parameter into  your report title.
    3, Pass the value(sort value) dynamically from your application,
    4, Cheers..
    Other wise Try with Dataset, create a dataset and fill thev alue into that.. Then  set the data source from CR designer. and darg and drop that data column into the report.
    Hope this will work,
    Regards,
    Salah
    Edited by: salahudheen muhammed on Mar 25, 2009 11:13 AM

  • Change the report title to more meaningful title? How to achieve it?

    Hi Guys,
    We have some BI reports which the users runs from BEx analyser. Currently the report title shows the names of the reports. For example a Sales by products reports has the title SALES BY PRODUCT REPORTING.
    What we want to do is these reports have selection screen and based on what the user selects on the selection screen we want the report title to be more meaningful. For example if the report is run for the period 1 and company code ABC selected on the selection screen then the report title must show SALES BY PRODUCT FOR PERIOD 1 AND COMPANY CODE ABC.
    My questions is how to show the variable in the report title? I am new to BI and need help on the same. We are on 7.1 version of BI.
    Cheers
    VJ

    Hi,
    We have done the same but in my case the input Month will display.
    Eg: We have MM reports which will run Period wise, so user wil give 001.2009, in the report title it will display...
    Stocks report for 001.2009.
    Using Text Variable we can do it.
    Steps;
    1. Create a Text Variable with Customer Exit option.
    2. Take the user input value and pass into Custome exit Variable.
    For Sample Code, you can see one blog and some Articles.
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    See the blog "Using Text Variables with Customer Exits in Report Headings" and see Customet Exit articles..
    WHEN 'ZT_C'.   " ZT_C = Text variable with customer Exit
        IF i_step = 2.
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZMONTH'.  " ZMONTH = User input variable on 0CALMONTH
            IF sy-subrc = 0.
              CLEAR: l_s_range.
              zsmy = loc_var_range-low.
              zemy = loc_var_range-high.
              zsmnth = zsmy+4(2).
              zemnth = zemy+4(2).
              zfyear1 = zsmy+0(4).
              zfyear2 = zemy+0(4).
              CONCATENATE zsmnth '.' zfyear1 INTO zsmnyr.
              CONCATENATE zemnth '.' zfyear2 INTO zemnyr.
              l_s_range-low+0(7) = zsmnyr.
              l_s_range-low+9(2) = 'To'.
              l_s_range-low+13(7) = zemnyr.
              l_s_range-sign = 'I'.
              l_s_range-opt = 'BT'.
              APPEND l_s_range TO e_t_range.
            ENDIF.
          ENDLOOP.
        ENDIF.
    Thanks
    Reddy

  • Change the Report Title for XML Publisher, depending on the field value.

    I want to change the Report Title as below.
    if the field_A='B' then the report title as it is defined in report defination
    else the report title is 'XXX"
    Please let me know whether it is possible, if yes please guide me. how can we do it.
    Thanks
    Venkat

    Tim covered the inline if statement, though not specifically regarding a title, in his blog recently:
    http://blogs.oracle.com/xmlpublisher/2007/12/18#a723
    The syntax is:
    xdoxslt:ifelse(.//WM_FLAG='C’,'Canceled','Approved')

  • How to add a filter/selection into the report title?

    Hi experts,
    Currently I try to fugure out how to set up a field into the page header (title) of a report in order to dynamically adapt the title to selected filter criteria. I tried to use the Reprot Filter Summary, but since I do have several sheets in my reports the information given through it is not applicable.
    What I would like to achieve is that the end user can select e.g. a category X and Y and the title says: "Report title - categories: X,Y" Somthg like this. I'd appreciate any tips.
    Best regards

    Hi guys,
    thanks so far. I managed to show prompts in the report. But still my problem is nor 100% solved
    I would like t achieve that the filtered criteria in the report title is separated through a comma like in the report filter summary - e.g.: {001, 002, 003, 004} followed by just 1chart/table that is including the whole information.
    When I however just drag a variable into the report it automatically created different sections, right? Like ........ table, chart, whatever... .......table chart whatever........
    Regards

  • XML Publisher - can we specify multiple SQL statements in the report?

    Hi there,
    can we specify multiple SQL statements in the report with XML Publisher?
    Regards,
    Liviu

    Could we eventually generate with the Wizards available in XML Publisher desktop 5.6.2 an xml file with a structure like the one given below? The reason is to facilitate creation of the two rowsets. Thanks, Liviu.
    <?xml version="1.0" encoding="UTF-8"?>
    <DATA>
         <ROWSET2>
              <ROW2>
                   <FIELD1>Query1</FIELD1>
                   <FIELD2>field2</FIELD2>
                   <FIELD3>field3</FIELD3>
              </ROW2>
         </ROWSET2>
         <ROWSET>
              <ROW>
                   <FIELD1>Query2</FIELD1>
                   <FIELD2>field2</FIELD2>
                   <FIELD3>field3</FIELD3>
              </ROW>
         </ROWSET>
    </DATA>

  • Cant edit sql expression in crystal reports XI

    when i right click on a sql expression it tries to log into the repository (which we dont use)..
    If I actually log into the repository, the sql expression code still isnt there..
    how do I edit my sql expressions..

    Hi Shanon,
    If the report is saved to your Business Objects server then the report would prompt for log on repository.
    If the report is saved to your desktop and your database is available then it wont prompt you.
    Thanks,
    Naveen.

  • Print the report title

    Hello All,
    I have a report page with some search item.When I print the page the title does not appear on the output page.
    How I can print the report and its title on the output page.
    any quick help please

    Hi Mohammad
    I allow users to download reports using the Interactive Reports Region.
    If you use that method then you can insert a title at the top of the report by populating the Report Region > Print Attributes (TAB) > Page Header
    Note: This is available when using APEX coupled with Oracle Business Intelligence Publisher. It does not work with "CSV" output.
    Kind regards
    Simon Gadd

  • Show the SQL query on the report itself

    I'd like to show the entire SQL query in print at the end of a report, say in the Report Footer section so that the user could review it let me know what edits are needed to meet their needs.  Thanks

    Since the query itself doesn't really change (except for parameter values passed to selection criteria), you can just open the Show SQL Query and paste it into a text box.
    Beyond that, there isn't a way to add via a "Special Field".
    HTH,
    Jason

  • Displaying the SQL Query in the report

    How can i display the query used to display a report..
    My query to get the records is as below
    select ename,empno from emp
    where deptno = :p_dept
    When i run the report i want to display the select statement as a message....
    How can we do this?

    One way is to create a column formula which you specifically redefine your query in. However, if you change your query you will need to also change your column formula. So this way could be prone to a mismatch of data. Unfortunately, I don't know of any better way. Hopefully someone else can suggest a better method. Good luck.

  • SQL Express with the WDK DTM?

    With MSDE 2000 you are limited to 8 machines and it is recommended to use SQL Server if you are planning on have more than 8 machines in a machine pool.  Since SQL 2005 Express does not have the workload governor, would it be a valid substitution for the SQL Server 2005 for the purpose of logo testing?

    As I understand (I did not try it), The answer is simply yes, and here is a tutorial of Upgrading MSDE 2000 to SQL Server 2005 Express
    http://technet.microsoft.com/en-us/library/cc966393.aspx
    [Personal Site] [Blog] [Facebook]

  • Where can I put the Pers. Chat database? On SQL Express on the Pers. Chat server?

    I am rolling out a deployment of Lync 2013 with a Standard Edition server.  The Planning tool recommended that I have a separate Persistent Chat server rather than collocated it on the SE server.  If I make a separate PC server, we don't have
    a SQL Backend server to put the DB on since our users will be on a SE server. 
    My question is, can I either put the PC Database on the PC server or the SE server?  Or will I have to provision a backend SQL instance just for PC?
    Thanks,
    Brandon

    Thanks Raju. 
    I think we're going to cram it onto the SE server rather than make a whole SQL backend server just for persistent chat.
    Since this is a small deployment, it recommends a standard edition server in the Planning Tool yet recommends a separate PC and SQL servers.  I now plan on collocating both PC and PC DB on the SE.
    I appreciate your help!
    Brandon

  • SQL Expressions in RAD -Getting error during runtime while generating rpt

    Hi
    We have just migrated from WSAD to RAD Version: 7.0.0.7. 
    The issue is: I am getting the error at the runtime when I am trying to use the SQL expression in my one of the report. The SQL Expression feature is not supported by this version of RAD. I checked the Help contents. It says
    Field Objects: SQL expression fields
    This report contains SQL Expression fields. These fields are not visible in this version of the Crystal Reports designer, but they will be evaluated by the system when the report is executed. New SQL Expression fields cannot be created by the designer. SQL Expression fields will remain in the .rpt file after saving and can be edited by other Crystal Reports designers
    To me it seems you can use the 'SQL Expressions' in the report using some Crystal Reports designers and at the runtime it will be evaluated. So I edited my report with some Crystal Reports Designer and tested it on WSAD. It worked fine. Now since we have migrated to RAD, this is an issue since I am getting the following error:
    ERROR [WebContainer : 0] com.crystaldecisions.reports.formatter.formatter.objectformatter - com.crystaldecisions.reports.dataengine.be: Failed to parse expression.
    [12/17/08 15:12:14:750 EST] 0000001c SystemOut     O 15:12:14,671 ERROR [WebContainer : 0] com.businessobjects.reports.sdk.JRCCommunicationAdapter - Failed to export report
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: Failed to parse expression.
         at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    When I remove the expression fields, it works fine on RAD too.
    I am using following versions:
    RAD Version: 7.0.0.7
    Crystal Reports for Rational Application Developer Version: 11.5.6.v20080304.
    Crystal Report Runtime Support version is 11.8.4.v1094
    Please let me know if somebody has faced the similar issue.
    Any help/suggestions would be appreciated.
    Thanks,
    Kamal

    Hi
    We have just migrated from WSAD to RAD Version: 7.0.0.7. 
    The issue is: I am getting the error at the runtime when I am trying to use the SQL expression in my one of the report. The SQL Expression feature is not supported by this version of RAD. I checked the Help contents. It says
    Field Objects: SQL expression fields
    This report contains SQL Expression fields. These fields are not visible in this version of the Crystal Reports designer, but they will be evaluated by the system when the report is executed. New SQL Expression fields cannot be created by the designer. SQL Expression fields will remain in the .rpt file after saving and can be edited by other Crystal Reports designers
    To me it seems you can use the 'SQL Expressions' in the report using some Crystal Reports designers and at the runtime it will be evaluated. So I edited my report with some Crystal Reports Designer and tested it on WSAD. It worked fine. Now since we have migrated to RAD, this is an issue since I am getting the following error:
    ERROR [WebContainer : 0] com.crystaldecisions.reports.formatter.formatter.objectformatter - com.crystaldecisions.reports.dataengine.be: Failed to parse expression.
    [12/17/08 15:12:14:750 EST] 0000001c SystemOut     O 15:12:14,671 ERROR [WebContainer : 0] com.businessobjects.reports.sdk.JRCCommunicationAdapter - Failed to export report
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: Failed to parse expression.
         at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    When I remove the expression fields, it works fine on RAD too.
    I am using following versions:
    RAD Version: 7.0.0.7
    Crystal Reports for Rational Application Developer Version: 11.5.6.v20080304.
    Crystal Report Runtime Support version is 11.8.4.v1094
    Please let me know if somebody has faced the similar issue.
    Any help/suggestions would be appreciated.
    Thanks,
    Kamal

  • SQL Expressions, commands and more

    Hello:
    I have several reports I need to create in Crystal Reports XI, and I'm not sure of the best methodology.  I have an ASA (Adaptive Server Anywhere) 9.02 database that I am connecting to through ODBC.  The main part of the query is fairly straightforward, but the WHERE clause, I believe, forces me to use a command object.  My query, cut down for sanity's sake, is as follows:
    SELECT bridge.brkey,  
             bridge.bridge_id,
             bridge.struct_num,
             inspevnt.suff_rate,
             inspevnt.nbi_rating,  
             bridge.fips_state,  
             bridge.facility,  
             bridge.location,  
             roadway.on_under
    FROM  bridge,  
             roadway,  
             inspevnt 
    WHERE
              ( bridge.brkey = :as_brkey )  and
              (( ( roadway.brkey = bridge.brkey ) and 
             ( inspevnt.brkey = bridge.brkey ) and 
             ( inspevnt.inspkey = (select max(i.inspkey) from inspevnt i where
                        i.brkey = bridge.brkey and i.inspdate = (select max(j.inspdate) from
                inspevnt j where j.brkey = bridge.brkey))) and
             ( roadway.on_under = (select min(r.on_under) from roadway r where
                        roadway.brkey = r.brkey )) ))
    That's the query as it is used on an old Sybase DW.NET report, which  I have to make work in Crystal.  I am able to use the command object and make it work (is this the best way?), but that makes it so I can't use SQL Expressions in the report, which I think I need to solve my other problem as described below.
    The field "bridge.fips_state" is actually a code such as "06" or "12" that refers to data in an as yet unreferenced table names PARAMTRS.  The PARAMTRS table replaces all of the possible individual lookup tables, and has columns that contain a field for the table name, the field name and the parameter value.  For example, if I have the value "06" in my current record, I need to query from the PARAMTRS table to find out what "06" means for the "bridge" table and the "fips_state" column.  The SQL code for that is as follows:
    SELECT paramtrs.shortdesc FROM paramtrs
    WHERE paramtrs.table_name='bridge' and paramtrs.field_name='fips_state' and paramvalue='06'
    This returns the value in the shortdesc field, "06 California" which is what the users want on their report instead of the value "06" from the bridge table.  If my WHERE statement in the first query forces the use of a command, and negates my abilty to use SQL Expressions, how can I extract values from my PARAMTRS table, which I need to do for several fields in the main query.
    Does anyone have any advice on this?
    Thanks.

    Scott,
    A SQL Command is probably the best way to go. While it's true that you can't use SQL Expressions in conjunction with Commands, you don't need to.
    Just add whatever you would add whatever you would put in the Expression, to the SQL Command.
    For example, just add the PARAMTRS table to the existing SQL script in the FROM clause, link it in your WHERE clause and then add whatever fields you need from that table under the SELECT statement.
    Use the SQL Command...
    Jason

Maybe you are looking for

  • Open PDFs from a CD

    I need to create a cd with a captivate movie that opens several PDF files also on the CD. I can't get it to work and have found some other posts but they are quite old. I have both Cap 3 and Cap 4 available to create with. Can this be done?

  • Calling FBL1N with filter criteria - POINTS WILL BE REWARDED

    <b>POINTS WILL BE REWARDED</b> hi abap gurus..... i have a very unique requirement...i have a alv report which displays vendors and the amount to be paid based on the credit limit... VENDOR ,  TOTAL AMT,   AMT FOR 0-30 DAYS, AMT FOR 31-60 DAYS AND SO

  • How do I connect content in a movie with an action outside of it?

    I have a movie clip of scrolling pictures that moves by way of the user moving a scroll bar. I want to have a row of the same but much smaller pictures underneath the movie that, when one image is clicked, it will make the movie scroll to that image.

  • User Exit for Cost center in ME21N

    Hi,        I have a requirement to validate the cost center with plant.        If Plant is 1001 then only the cost centers defined for 1001 should be selected in ME21N while creating PO, if different cost center is selected error message should be sh

  • Why are the system preferences set to disallow downloading Internet content/applications?

    I just purchased a refurbished iMac from the Apple Store.  I am attempting to install Apache OpenOffice for Mac, but a message appears that says, "open office cannot be opened because it is from an undentified developer.   Your security preferences a