My Setup
  • XP SP3 Workstation
  • Business Intelligence Development Studio 2008 (BIDS)
  • SQL Server Reporting Services 2008 R2 (SSRS)
What do I want?
I have a report displaying room bookings. Each row lists the day, date, room name, start/finish times, booking details and the staff contact. I want an empty row to appear between each day in the list, so I have:

The Problem
I've set some tablix headers but when I request the same report in PDF format, the tablix headers only appear once on the first page. Every subsequent page simply displays the report header (which does not include the tablix header... obviously). I right-clicked on the header row of the tablix and checked the box "Repeat header columns on each page.
This is not working!

I have googled, binged and asked but to no avail. Some self-proclaimed IT experts in forums said "why would you want to do that?". Unhelpful Bellends. It's a bit like asking me "Why can't I turn on my computer" and me replying "why would you want to do that?".

Anyway, I was looking for something like the record separator in Oracle SQL*Plus where a row of data (blank or made of symbols) separates two sets of data from within the same select query based on a column that's different. So for example, I have data like the following:
copyraw
SELECT
	DATENAME(dw, StartDate) AS 'Day'
FROM 
	Timetable
ORDER BY
	StartDate ASC, AnotherOrderByCol ASC, AndAnotherOrderByCol ASC

-- Yields
/*
Day              
---------------- 
Monday
Monday
Monday
Tuesday
Tuesday
Wednesday
Thursday
Thursday
Thursday
Thursday
Friday
Friday
*/
  1.  SELECT 
  2.      DATENAME(dw, StartDate) AS 'Day' 
  3.  FROM 
  4.      Timetable 
  5.  ORDER BY 
  6.      StartDate ASC, AnotherOrderByCol ASC, AndAnotherOrderByCol ASC 
  7.   
  8.  -- Yields 
  9.  /* 
  10.  Day 
  11.  ---------------- 
  12.  Monday 
  13.  Monday 
  14.  Monday 
  15.  Tuesday 
  16.  Tuesday 
  17.  Wednesday 
  18.  Thursday 
  19.  Thursday 
  20.  Thursday 
  21.  Thursday 
  22.  Friday 
  23.  Friday 
  24.  */ 

Category: Transact-SQL :: Article: 394

This is for Joomla 1.5.x sites!
Note that this article is for Joomla 1.5.x sites to be converted to Wordpress 3.2.x sites. I started with a Joomla 1.5 as the move from Joomla 1.6 or greater is a lot easier since it uses nested categories like Wordpress.

There are lots of commercial migrators out there and they all seem to have this problem. I'm really keen not to ask all my users to have to change their passwords but that is what the commercial applications are doing.

The Situation
I have a Microsoft Excel 2007 file that connects to a SQL Server 2008 R2 database. The Excel file pulls data using lookup tables and displays the data in an Excel Spreadsheet.

The Problem
We can select all cells and set row height to be 30 for example, but everytime we refresh the data in the Excel spreadsheet, all the rows get re-adjusted to fit the data and lose that consistency.

A Workaround: New line inserted before and after
So this is where I am at the moment without VBCode and other suggestions. Instead I add a newline in front of and after the smallest data value (one that I know will never be two lines (or two words)) within the SQL query itself. We have a DEPT column that is an acronym of the departments so for example:

Well yes you could just use the Unicode version of Autohotkey. If you're looking for some up and down arrows which is all I wanted, then you don't have to use Unicode and you can use the Chr() function:

copyraw
msgbox % Chr(24) ; upwards arrow
msgbox % Chr(25) ; downwards arrow, unstable
  1.  msgbox % Chr(24) ; upwards arrow 
  2.  msgbox % Chr(25) ; downwards arrow, unstable 

Category: AutoHotkey :: Article: 389

Ok so there are more fun things to do out there. If you're the type of AutoHotkey programmer that doesn't like having to use the command prompt to write to an extra text file which your program has to read, then this is for you. DllCall will usually run contained in the program and can be hidden from the end-user.

The one to rule them all:
This is a function I pulled from the Autohotkey forums submitted by SKAN which lists all the functions for a specified Dynamic Link Library (DLL) along with an inputbox for convenience:

So I know it's quite a long title but I'm not sure what I'll be searching next time. It has taken me a lot longer than I thought it would mostly out of frustration and the inability to know exactly what I'm looking for... always difficult. After a cup of tea the solution was glaringly obvious, just do a primary school mathematics table and it all makes sense (see my 10 mod table below).

This article is a quick note (so I never spend as long again) in PHP on how to determine when looping through a loop, which entry was first and which was last. This is incredibly useful for pagination.


What do I want?
Page ID, Title, Content, Category, AccessLevel (note that AccessLevel is extra to your standard MediaWiki setup and one that was customized for my day job).

Thought I already had this somewhere on my site, so it took a while again but I've posted my finished query here:

The base query to list mediawiki articles
Page ID, Title, Content, Category
copyraw
SELECT
		p.page_id AS PageID,
		CONVERT(p.page_title USING latin1) AS PageTitle,
		CONVERT(t.old_text USING latin1) AS PageContent,
		(SELECT GROUP_CONCAT(CONVERT(wikimedia_categorylinks.cl_to USING latin1)) FROM wikimedia_categorylinks WHERE wikimedia_categorylinks.cl_from=p.page_id) AS PageCategory
	FROM
		wikimedia_page p
	LEFT JOIN wikimedia_revision r ON p.page_latest=r.rev_id
	LEFT JOIN wikimedia_text t ON r.rev_text_id=t.old_id
	WHERE
		p.page_namespace=0
		AND t.old_text=''
		AND p.page_is_redirect=0
  1.  SELECT 
  2.          p.page_id AS PageID, 
  3.          CONVERT(p.page_title USING latin1) AS PageTitle, 
  4.          CONVERT(t.old_text USING latin1) AS PageContent, 
  5.          (SELECT GROUP_CONCAT(CONVERT(wikimedia_categorylinks.cl_to USING latin1)) FROM wikimedia_categorylinks WHERE wikimedia_categorylinks.cl_from=p.page_id) AS PageCategory 
  6.      FROM 
  7.          wikimedia_page p 
  8.      LEFT JOIN wikimedia_revision r ON p.page_latest=r.rev_id 
  9.      LEFT JOIN wikimedia_text t ON r.rev_text_id=t.old_id 
  10.      WHERE 
  11.          p.page_namespace=0 
  12.          AND t.old_text='' 
  13.          AND p.page_is_redirect=0 

Category: MediaWiki :: Article: 385

As you can tell these are my messed up functions that convert dates into seconds and vice-versa. They're a little disorganised but they're the ones I copy and paste to my scripts then modify.

In it's straightforward form
copyraw
FormatTime( TimeString, Format )
{
     FormatTime, FormattedTime , TimeString, %Format% 
     return Formattedtime
}
  1.  FormatTime( TimeString, Format ) 
  2.  { 
  3.       FormatTime, FormattedTime , TimeString, %Format% 
  4.       return Formattedtime 
  5.  } 


Category: AutoHotkey :: Article: 384

Just a quick note as I use this function in various scripts. This adds the 1000th separator comma:

    	FormatAddCommas(val) {
    		Result:=val
    		StringLen, OutputVar, Result
    		NumLoop := (OutputVar // 3)
    		DNum = 3
    		Loop, % (NumLoop+1)
    		{
    		   StringRight,Digit,Result,%DNum%
    		   StringReplace, Result, Result, %Digit%,`,%Digit%
    		   DNum += 4
    		}
    		StringLen, OutputVar, Result
    		Loop, %OutputVar%
    		{
    			FirstChar:=Substr(Result, 1, 1)
    			IfEqual, FirstChar, `,
    			{
    				Result:=Substr(Result, 2)
    			} else {
    				break
    			}
    		}
    		Return Result
    	}

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

RSS Feed

Related Articles

Joes Revolver Map

Joes Word Cloud

client   first   function   time   case   added   note   form   source   file   need   report   system   mysql   list   find   would   database   data   error   create   following   order   user   name   license   uploaded   zoho   used   display   using   table   field   creator   page   website   version   deluge   work   value   google   server   joomla   date   parameter   where   code   script   files   windows   JoelLipman.Com

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.