Jump to content
TNG Community

Report Parameter


4lexsharpe

Recommended Posts

Does TNG support the user entering a value to run a report e.g. I f I want to list all entries for a census year, rather than writing a query for each census year, can the user be prompted for a value and the report returns all census for that year?

Link to comment
Share on other sites

Natively, you would have to end up with separate reports for say 1850, 1860, 1870, 1880, 1900, 1910, 1920, 1930, 1940, and the soon to be released 1950 census through the report creator.  The primary reason for this is that you would not want someone to be able to inject anything into your query, as that could allow them to change your database to become an admin and do anything they wanted to your site.

From an Advanced Search, you can expand Other Events and choose to enter a year in the census event to get a list of people with that census year.  The resulting output is going to be a list of the people with that event and their birth information and death information if the checkbox is selected.  I am guessing that you are looking for the output to have information about the census event instead though.

If you wanted to make a custom page using the historytemplate that would allow the user to just have a dropdown list of years to pick from which would then run the census report that you would have coded for using the selected year.  This would require some ability to write basic HTML, PHP, and SQL (which the SQL you essentially have already with the report you created) or to have someone create the page for you that knows how to do that.

If you are using Census Plus and the reports you are looking for only need to be accessible to administrators, then a search of that data may be able to get what you are looking for.  This does seem the furthest option and most work from your question though.


So although having your report repeated for each census year may not be ideal, from a report standpoint it is the standard way to go.  Otherwise, it wouldn't be too hard to create a custom page to do what you are looking for and still keep the security checks for the database query.

Brent

Link to comment
Share on other sites

Brent, Thankyou for a prompt & thorough reply. I guess the last para would be the nearest to what I was hoping for. i.e. only one query formatted to produce the same fields of output but different data values depending on what option is selected.

Link to comment
Share on other sites

Yes, my summary paragraph was what I thought you were wanting.  It is the second choice summarized.  Do you need help with building the page?  If so, include the report setup for a census year and I can work on creating a page based on that.  Also what census years you want to have listed to choose from.  It won't be right away that I will get to it.

Brent

Link to comment
Share on other sites

Hi Brent I think I'll use the custom event approach at the moment. Do you happen to know whether its possible to use sql to produce a report which displays only a apart of the getperson page e.g. If I want to check whether I'm missing birth documents I'd like to be able to produce a report which displays id, name, birth fields and any documents linked to the birth.

Steve

Link to comment
Share on other sites

Steve,

It should be possible to do that.  I am not sure if there are any examples on the TNG Wiki - Reports page that would be able to help with that particular report or not.  Birth, death, burial, marriage, and divorce for primary records are different than if you have a secondary event of the same type, so that is something to think of when getting the final report.  The first run getting the primary events though should be more straight forward.

Brent

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...