Birthday Week 2018 - Tips and Tricks

This post will be updated throughout the week.  Last year I did 8 tips and tricks at this blog post, and this year I'll be offering 9 new ones.  I'll add 2 each day, Monday thru Thursday, and 1 on Friday:

  1. Check Column Counts - it's important that the number of items in your main select equals the number of column headings in your reports.  It's easy for them to be different though, especially if you've been adding or removing things from one of them but not the other.   As of sqlReports 5.1.1, you can click on the Build Headings link to get a column count and cancel the popup without having to worry about it replacing what you have in the column headings box.
  2. Fixed Column Widths - you can set a column width to a fixed width by adding a width= command to the column heading.  For example, if you have a column that show teacher comments and the heading is <th>Comments</th>, you can set a specific width by using <th width="500">Comments</th>.
  3. Current Time - the following will return the current time of the application server - ~[] - which may come in handy if you have more than one server or are hosted and sysdate is giving you the wrong time.
  4. School Information DAT's - the School Information DAT's found in the Data Access Tags Supplement Guide can be used in sqlReports.  They return information based on the school and term the user is in.  You need to put them in single quotes and use a ~ instead of a ^.  For example, instead of ^(yearname), use '~(yearname)'.
  5. Parameters as Column Headings - you can use the value of a parameter as a column heading like so - <th>~([06]ParamVal#)</th>.  Replace the # after Val with the parameter number.  The free premium Comparison of Grades for a Section report is an example of the approach.  If you export the report, the actual value will be exported instead of the ParamVal coding, so make sure to replace the coding in the export.
  6. Charts - you can create powerful charts with sqlReports without having to do any chart coding (as of 5.4.0, the full version of sqlCharts is available for all users).  Before you check the box to create a chart, make sure you're getting the correct data in a regular sqlReport.  Once the data looks correct, then proceed to turn it into a chart.  The user guide for sqlReports at this site has a section devoted to using sqlCharts.
  7. Row Grouping - the row grouping feature of sqlReports is a powerful feature but is primarily meant for screen viewing.  The row groups do not export and if you're using the HTML buttons, you will need to use the browser print feature or the PS printer icon to see them on a printout.  Also, if you're using the HTML buttons, do not check the box to enable row grouping unless you have a class="ROWGRP" in the column headings.  Having the box checked and not having a class reference will keep drop-down filtering from working.
  8. Student Selection - Option B is the best option to use because it's dynamic.  Option A will only show the original current selection and will not update if you filter the results.  In rare cases you may actually want to use both if you want to be able to click something to use either the current selection using Option B or the original current selection with Option A.  But if you only use Option B, there is no need to fill out the information for Option A.
  9. Site Articles and Documentation - be sure to visit the Resources menu on this site every so often.  New articles are added every so often, such as the new one on troubleshooting cross-site scripting errors.  The documentation area is where you'll find the installation guide and user guide for sqlReports.  I used to include pdf's for them in the downloads, but now they're online only.