Skip to Content

Group Name Formula Editor

I would like the formula created for the Group Name Formula to print some values as bold at print time.

How do we do that, it will work after the report has been printed and then I go back to Design view and then select the Group Name formula and do Preview again , it will bold the data.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

22 Answers

  • Posted on Nov 10, 2020 at 01:36 AM

    This is what i have in the formula

    if {rpAnalysis.Analysis} like "*HPC*" THEN "<B>" + {ROW_SCO_COCDATA.LABNUMBER} + "</B>" ELSE {ROW_SCO_COCDATA.LABNUMBER}

    when i print the report, it shows as below

    When i go back to design view right click Row options->Group Options and then OK, it will do the bolding, why does it not do it on the first print?


    08xds.png (11.1 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Silpa,

      I guess you're trying to print the LABNUMBER in bold if the field Analysis is '*HPC*'.

      Does the crosstab have "Analysis" as one of the row fields? If it does not then this won't work as expect it to.

      There is a workaround, however. Could you please post a screenshot of the design view of the xtab?

      -Abhilash

  • Posted on Nov 16, 2020 at 03:17 AM

    Hi Abhilash,

    Thank you for you response.

    Below is the screenshot of the Design View. No I do not have Analysis as of the fields as I don't want it displayed and cannot find a way to hide it and also will mess up the layout, if any extra rows are added.

    I tried to use the labnumber field and under Cross- tab group options select the Analysis field.

    It would display the analysis field and then did the check by adding a group formula and that didnt work.

    Any help to get this to work will be appreciated as it has been driving me crazy:)

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 16, 2020 at 08:11 PM

    Hi Silpa,

    I don't see the screenshot.

    Anyway, please try these steps:

    1. Make a copy of the existing crosstab and place it beside the original on the same section.

    2. Create a formula from the field explorer called "Row" using this code:

    {rpAnalysis.Analysis} + ">" + {ROW_SCO_COCDATA.LABNUMBER}

    3. Edit the new crosstab you copied in step 1. Use the new formula field "Row" as the row field. You may remove the column and summary fields on this crosstab as we don't need it.

    4. Right-click the blank white space to the top left of the new xtab > crosstab expert > customize style > highlight the Row formula under "Rows" and change the value of "Alias for Formulas" to "Row" (without quotes)

    5. Back in the design view, right-click the Row field on this new xtab > Format field > Click the formula button beside "Suppress" and use this code:

    shared stringvar array row;
    local numbervar i;
    for i := 0 to getnumrows-2 do
    (
        stringvar currRow := GridRowColumnValue("Row", i);
        stringvar rowVal := LEFT(currRow, Instr(currRow, '>')-1);
        If Instr(currRow, 'HPC') > 0 AND NOT(rowVal IN row) THEN
        (
            shared numbervar j;
            j := j + 1;
            redim preserve row[j];
            row[j] := rowVal;
        );
    );
    true;

    6. Now on your original xtab, right-click the row field > format field > font tab > click the formula button beside "Style" and use this code:

    shared stringvar array row;
    IF CurrentFieldValue IN row then
    crBold else crRegular

    7. Right-click the blank white space to the top left of the new xtab > grid options > uncheck "show cell margins"

    8. Right-click all fields on this xtab > format field > ensure that "suppress" is checked

    9. Right-click the blank white space to the top left of the new xtab > Crosstab expert > Customize style tab > Format Gridlines > uncheck "Show Grid lines"

    10. Now all that's left is to reduce the height of the fields on this new xtab. Reduce it the lowest allowed size. The idea is to not print the new xtab.

    11. Move the original crosstab over this new xtab.

    I hope this helps.

    -Abhilash

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 17, 2020 at 07:55 PM

    doc3.pngdoc2.png

    Please find attached the design view screenshot and the formula editor


    doc3.png (76.3 kB)
    doc2.png (73.3 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • What is the datatype of the "LabNumber" field?

      Did you create the formula I specified in Step 2 and change the "Alias" to "Row" as mentioned in Step 4?

      Also, the @Row formula field is the one you need to use as the Row of the crosstab - not the Lab Number field (Step 3).

      You also don't need any other fields on this new xtab - no summaries, no columns.

      -Abhilash

  • Posted on Nov 18, 2020 at 02:09 AM

    LabNumber is string datatype

    Yes i created the formula Row

    The below screenshot is my new crosstab. I placed the new xtab below the original and now instead of 1 page it prints 3 pages.

    It still not bolding.

    I changed the formula to , removed errors. It still not bolding.

    shared stringvar array row; local numbervar i; for i := 0 to Ubound(row) ��do ( stringvar currRow := GridRowColumnValue("Row")��; stringvar rowVal := LEFT(currRow, Instr(currRow, '>')-1); If Instr(currRow, 'HPC') > 0 AND NOT(rowVal IN row) THEN ( shared numbervar j; j := j + 1; redim preserve row[j]; row[j] := rowVal; ); ); true;


    udv5e.png (33.7 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 19, 2020 at 02:08 AM

    When i add the GridRowColumnValue("Row",i); I get the below error

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 19, 2020 at 02:53 AM

    Is there an email you can provide , so I can sent the Rpt file, it will not let me attach?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 19, 2020 at 08:12 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 19, 2020 at 11:26 PM

    Hi Silpa,

    Here's what I had to change on your report to get this to work:

    1. Right-click the new xtab > format crosstab > uncheck "Suppress". If this crosstab is suppressed the variables won't be processed.

    2. Go to the Crosstab Expert > Customize style > highlight the @Row field > uncheck 'Suppress Empty Rows' > uncheck 'Suppress Empty columns' > uncheck 'Suppress Row Grand Totals'

    3. Update the @Row formula to:

    {ROW_SCO_COCDATA.LABNUMBER} + ">" +  {rpAnalysis.Analysis}

    4. Right-click each field on the new xtab > size and position > change the height to: 0.114

    Make sure you update the height of each cell including the "Total" cells. This will help in reducing the overall size of the xtab.

    -Abhilash

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 20, 2020 at 05:32 PM

    Abhilash,

    Hmmm I am not sure what I am doing wrong. I made the above changes and have update in my google drive,Stiil is not working for me!

    https://drive.google.com/file/d/1wHcGnAxv2Sc-7WuADUW2bUc4K0XzlyjW/view?usp=sharing

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.