Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Advanced Crystal Reports: Techniques for compiling Annual Reports & other statistics

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Nächste SlideShare
Pratik Bakane C++
Pratik Bakane C++
Wird geladen in …3
×

Hier ansehen

1 von 58 Anzeige

Advanced Crystal Reports: Techniques for compiling Annual Reports & other statistics

Herunterladen, um offline zu lesen

The interplay between Crystal Reports and TMS can help database administrators streamline reporting needs, and provide powerful statistical updates to museum administrators. This presentation covers some techniques for building such valuable reports. This was presented at Collective Imagination, 3-4 June 2009.

The interplay between Crystal Reports and TMS can help database administrators streamline reporting needs, and provide powerful statistical updates to museum administrators. This presentation covers some techniques for building such valuable reports. This was presented at Collective Imagination, 3-4 June 2009.

Anzeige
Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Ähnlich wie Advanced Crystal Reports: Techniques for compiling Annual Reports & other statistics (20)

Anzeige

Aktuellste (20)

Anzeige

Advanced Crystal Reports: Techniques for compiling Annual Reports & other statistics

  1. 1. ADVANCED CRYSTAL REPORTS Techniques for compiling Annual Reports & other statistics Chad Petrovay Musical Instrument Museum
  2. 2. ADVANCED CRYSTAL REPORTS Report Formula Parameters SQL
  3. 3. ANNUAL REPORT
  4. 4. ANNUAL REPORT
  5. 5. ANNUAL REPORT: CR XI
  6. 6. ANNUAL REPORT: GROUPING
  7. 7. ANNUAL REPORT: FORMULAE
  8. 8. ANNUAL REPORT: FORMULAE @f_artist_prefix if isnull ({OBJECTDESCRIPTION.Prefix}) then "" else {OBJECTDESCRIPTION.Prefix}+" " @f_artist_suffix if isnull ({OBJECTDESCRIPTION.Suffix}) then ", " else " "+{OBJECTDESCRIPTION.Suffix}+", " @f_artist if isnull ({OBJECTDESCRIPTION.DisplayName}) then "" else {@f_artist_prefix}+{OBJECTDESCRIPTION.DisplayName}+{@f_artist_suffix}
  9. 9. ANNUAL REPORT: CR XI
  10. 10. ANNUAL REPORT
  11. 11. ANNUAL REPORT: PARAMETERS
  12. 12. ANNUAL REPORT: RECORD SELECTION
  13. 13. ANNUAL REPORT: PARAMETERS
  14. 14. STATISTICS AT A GLANCE
  15. 15. STATISTICS AT A GLANCE
  16. 16. STATISTICS AT A GLANCE: SQL VIEW CREATE VIEW [plugin_SAG] AS SELECT '_____' AS grouper, '______' AS label, COUNT(*) AS value, '_' AS rank FROM ___________ WHERE _____________________________ UNION SELECT '2. Basic Media' AS grouper, 'Media Count - Approved' AS label, COUNT(*) AS value, '2' AS rank FROM MediaMaster WHERE ApprovedForWeb = 1 UNION SELECT '1. Basic Object' AS grouper, 'Object Count - Total' AS label, COUNT(*) AS value, '1' AS rank FROM Objects UNION SELECT '1. Basic Object' AS grouper, 'Object Count - Virtual Records (excluding Group)' AS label, COUNT(*) AS value, '3' AS rank FROM Objects WHERE isVirtual = 1 AND ObjectNumber NOT LIKE 'Grp%' UNION SELECT '3. Object By Level' AS grouper, 'Management Level - Total' AS label, COUNT(*) AS value, '2' AS rank FROM Objects WHERE ObjectLevelID = 1
  17. 17. STATISTICS AT A GLANCE
  18. 18. STATISTICS AT A GLANCE: CR XI
  19. 19. STATISTICS AT A GLANCE: GROUP/SORT
  20. 20. ECLIPSE REPORT: OVERVIEW Wishlisted
  21. 21. ECLIPSE REPORT
  22. 22. ECLIPSE REPORT
  23. 23. ECLIPSE REPORT: CREATE TABLE CREATE TABLE mim_Eclipse ( [ID] int IDENTITY(1,1) NOT NULL, [virtual] int NOT NULL, [actual] int NOT NULL, [free] int NOT NULL, [TimeStamp] timestamp NULL )
  24. 24. ECLIPSE REPORT
  25. 25. ECLIPSE REPORT: STORED PROCEDURE CREATE PROCEDURE [do_eclipse] AS DECLARE @virtual int, @actual int, @free int /* Find and Record Virtual Records */ SELECT ObjectID FROM Objects WHERE ObjectNumber LIKE 'V%‘ AND ObjectID IN (SELECT ObjectID FROM mim_activeExhObj) SET @virtual = @@ROWCOUNT /* Find and Record Actual Records */ SELECT ObjectID FROM Objects WHERE ObjectNumber NOT LIKE 'V%' SET @actual = @@ROWCOUNT /* Find and Record Unallocated Records */ SELECT ObjectID FROM mim_voReconciliation SET @free = @@ROWCOUNT /* Do SQL INSERT */ INSERT INTO mim_Eclipse ( virtual, actual, free ) VALUES ( @virtual, @actual, @free )
  26. 26. ECLIPSE REPORT
  27. 27. ECLIPSE REPORT: CR XI
  28. 28. ECLIPSE REPORT: RECORD SELECTION
  29. 29. ECLIPSE REPORT: CHART
  30. 30. ECLIPSE REPORT: CHART
  31. 31. ECLIPSE REPORT: CHART
  32. 32. ECLIPSE REPORT: SUBREPORT
  33. 33. ECLIPSE SUBREPORT
  34. 34. ECLIPSE SUBREPORT: FORMULA
  35. 35. ECLIPSE SUBREPORT: GROUP SORT
  36. 36. ECLIPSE SUBREPORT: CHART
  37. 37. EXHIBITION STATUS REPORT
  38. 38. EXHIBITION STATUS REPORT: TMS
  39. 39. EXHIBITION STATUS REPORT
  40. 40. EXHIBITION STATUS REPORT: SQL VIEW SELECT TX.ID AS ExhibitionID, T.Term, 1 AS type FROM ThesXrefs TX INNER JOIN TMSThes.dbo.Terms T ON TX.TermID = T.TermID WHERE TX.TableID = 47 AND TX.ThesXrefTypeID = 29 AND Active = 1 UNION ALL SELECT TX.ID AS ExhibitionID, T.Term, 2 AS type FROM ThesXrefs TX INNER JOIN TMSThes.dbo.Terms T ON TX.TermID = T.TermID WHERE TX.TableID = 47 AND TX.ThesXrefTypeID = 30 AND Active = 1 UNION ALL
  41. 41. EXHIBITION STATUS REPORT: SQL VIEW SELECT ExhibitionID, CONVERT(Varchar,Count(*)) As Term, 3 AS type FROM mim_activeExhObj GROUP BY ExhibitionID UNION ALL SELECT E.ExhibitionID, CONVERT(Varchar,Count(*)) As Term, 4 AS type FROM mim_activeExhObj E INNER JOIN Objects O ON E.ObjectID = O.ObjectID WHERE O.ObjectNumber LIKE 'V%‘ GROUP BY E.ExhibitionID UNION ALL SELECT E.ExhibitionID, CONVERT(Varchar,Count(*)) As Term, 5 AS type FROM mim_activeExhObj E INNER JOIN Objects O ON E.ObjectID = O.ObjectID WHERE O.ObjectNumber NOT LIKE 'V%' GROUP BY E.ExhibitionID
  42. 42. EXHIBITION STATUS REPORT: SQL VIEW CREATE VIEW [ mim_activeExhData ] AS SELECT ExhibitionID, MAX(CASE WHEN type = 2 AND Term = 'yes' THEN 'TRUE' ELSE 'FALSE' END) AS DataSubmission, MAX(CASE WHEN type = 1 THEN Term ELSE NULL END) AS ExhStatus, MAX(CASE WHEN type = 3 THEN Term ELSE 0 END) AS QtyTotal, MAX(CASE WHEN type = 4 THEN Term ELSE 0 END) AS QtyVirtual, MAX(CASE WHEN type = 5 THEN Term ELSE 0 END) AS QtyAcq FROM ( /* Insert UNION ALL statements here */ ) AS Data GROUP BY ExhibitionID
  43. 43. EXHIBITION STATUS REPORT
  44. 44. EXHIBITION STATUS REPORT: CR XI
  45. 45. EXHIBITION STATUS REPORT: FORMULA
  46. 46. EXHIBITION STATUS REPORT: FORMATTING
  47. 47. EXHIBITION STATUS REPORT: FORMULA
  48. 48. EXHIBITION STATUS REPORT: FORMATTING
  49. 49. QUESTION & ANSWER chad.petrovay@themim.org http://petrovay.com/tmsblog

×