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.
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?
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:)
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
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;
When i add the GridRowColumnValue("Row",i); I get the below error
Is there an email you can provide , so I can sent the Rpt file, it will not let me attach?
Please find the URL below to the rpt file
https://drive.google.com/file/d/1wHcGnAxv2Sc-7WuADUW2bUc4K0XzlyjW/view?usp=sharing
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
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