The board has been upgrade to the latest version. Please let me know of any problems.
Also, there is a high probability that the forum will move to a different host, but that will happen in 2018.
Thanks, Doug

Last issue with title

Discuss using and your tips/tricks for BookCAT
User avatar
Alex Ivanovich
Posts: 292
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Last issue with title

Post by Alex Ivanovich » Tue May 09, 2017 9:05 am

This is a code created by Dave

I would like to see the title in the code below

from

Ultimo Numero: { 622 } del mese di Maggio 2017 Aggiorna Query

to

Ultimo Numero: Il Ritorno del Samurai { 622 } del mese di Maggio 2017


Code: Select all

 <xsl:variable name="_seriesno">
          <xsl:value-of select="series/@id"/>
        </xsl:variable>
        <xsl:variable name="LastInSeries">
          <xsl:value-of select="document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/Max_Of_ReleaseNo"/>
        </xsl:variable>
        <xsl:variable name="LastPublishYear">
          <xsl:value-of select="substring(document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/PublishDate,1,4)"/>
        </xsl:variable>
        <xsl:variable name="LastPublishMonth">
          <xsl:value-of select="document('')//month[number(substring(document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/PublishDate,5,2))]"/>
        </xsl:variable>
        <xsl:variable name="_series">
          <xsl:value-of select="document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/LastInSeries.Series.Series"/>
        </xsl:variable>
        <a href="Book.xsl?series={$_series}@releaseno={$LastInSeries}" target="_blank">
          <strong><span style="color:red;"><xsl:value-of select="concat('Ultimo Numero: { ',
                                       $LastInSeries,
                                       ' } del mese di ',
                                       $LastPublishMonth,
                                       ' ',
                                       $LastPublishYear)"/></span></strong>
                                       
                                       <!-- Link al database .mdb per aprirlo -->
		<A HREF="file:E:\==DATABASE==\FNProgramvare\BookCAT\db1Query.mdb"> Aggiorna Query </A>
        <!-- Link al database .mdb per aprirlo -->
        </a>   
</td>		
    <!-- Last Issue (2) numero e data -->
Attachments
Screen Capture #044.png
Screen Capture #044.png (96.06 KiB) Viewed 391 times

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Last issue with title

Post by LotsOCds » Sat May 13, 2017 3:43 pm

Alex Ivanovich wrote:This is a code created by Dave
Yes, that was a long time ago. Sorry, but I do not remember how that all worked.
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 292
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Last issue with title

Post by Alex Ivanovich » Sat May 13, 2017 4:04 pm

Hi Dave,

This code works by extracting data from a database query ".mdb"
I would like to see the title in the query
What code should i use? :|
Attachments
db1Query.rar
database quey
(41.66 KiB) Downloaded 12 times

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Last issue with title

Post by LotsOCds » Sat May 13, 2017 4:59 pm

You will need to modify the Access query to write the title into LastInSeries.xml. Then you must add code like the code above to retrieve it from the LastInSeries.xml file.
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 292
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Last issue with title

Post by Alex Ivanovich » Sat May 13, 2017 5:03 pm

this code right? :|

Code: Select all

/Title"/>
        </xsl:variable>
        <xsl:variable name="Title">
          <xsl:value-of select="substring(document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_title]

User avatar
Alex Ivanovich
Posts: 292
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Last issue with title

Post by Alex Ivanovich » Sat May 13, 2017 5:08 pm

In the query what do I have to write? :|

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Last issue with title

Post by LotsOCds » Sat May 13, 2017 5:18 pm

Alex Ivanovich wrote:this code right? :|

Code: Select all

/Title"/>
        </xsl:variable>
        <xsl:variable name="Title">
          <xsl:value-of select="substring(document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_title]
Looks like it should work.
Cheers,
Dave

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Last issue with title

Post by LotsOCds » Sat May 13, 2017 5:21 pm

Alex Ivanovich wrote:In the query what do I have to write? :|
Sorry, but I don't have the time available these days to set this up and figure it out for you. You'll need to look at the existing query in Access and figure out how to add the title.
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 292
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Last issue with title

Post by Alex Ivanovich » Sat May 13, 2017 5:35 pm

This query does not know how to do it :roll:

This is your post in the old forum :|

--------------------------------------------------------------------------------------------------------------------------------------
LotsOCds wrote:

Now create two new queries.

Name this query "FirstQuery"

Code: Select all

 SELECT Series.SeriesID, Series.Series, Max(Book.ReleaseNo) AS MaxOfReleaseNo
    FROM Book INNER JOIN Series ON Book.SeriesID = Series.SeriesID
    GROUP BY Series.SeriesID, Series.Series;


Name this query "LastInSeries"

Code: Select all

  SELECT DISTINCTROW FirstQuery.SeriesID, Series.Series, Max(Book.ReleaseNo) AS Max_Of_ReleaseNo, Book.PublishDate
    FROM (Book INNER JOIN Series ON Book.SeriesID = Series.SeriesID) INNER JOIN FirstQuery ON (Book.ReleaseNo = FirstQuery.MaxOfReleaseNo) AND (Book.SeriesID = FirstQuery.SeriesID)
    GROUP BY FirstQuery.SeriesID, Series.Series, Book.PublishDate;

User avatar
DougWilliams
Site Admin
Posts: 228
Joined: Thu May 22, 2014 11:36 am
Location: Wisconsin, USA
Contact:

Re: Last issue with title

Post by DougWilliams » Sat May 13, 2017 5:38 pm

Try list for the "LastInSeries" query.

Code: Select all

SELECT DISTINCTROW FirstQuery.SeriesID, Series.Series, Max(Book.ReleaseNo) AS Max_Of_ReleaseNo, Book.PublishDate, Book.Title
FROM (Book INNER JOIN Series ON Book.SeriesID = Series.SeriesID) INNER JOIN FirstQuery ON (Book.ReleaseNo = FirstQuery.MaxOfReleaseNo) AND (Book.SeriesID = FirstQuery.SeriesID)
GROUP BY FirstQuery.SeriesID, Series.Series, Book.PublishDate, Book.Title;
Record Collector
"You Mean I'm Supposed To Listen To 'Em?!?!?!?"

Post Reply